added a nv.settings switch 'dma_acc'. User can choose method for acceleration. Default is off, selecting (old) PIO mode. DMA still does not work, and is not completed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10842 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
28d9360f57
commit
dd446dd3f3
@ -21,7 +21,7 @@ void SCREEN_TO_SCREEN_BLIT(engine_token *et, blit_params *list, uint32 count)
|
||||
{
|
||||
int i;
|
||||
|
||||
if(si->ps.card_arch < NV40A)
|
||||
if(!si->settings.dma_acc)
|
||||
{
|
||||
/* init acc engine for blit function */
|
||||
nv_acc_setup_blit();
|
||||
@ -114,7 +114,7 @@ void FILL_RECTANGLE(engine_token *et, uint32 colorIndex, fill_rect_params *list,
|
||||
{
|
||||
int i;
|
||||
|
||||
if(si->ps.card_arch < NV40A)
|
||||
if(!si->settings.dma_acc)
|
||||
{
|
||||
/* init acc engine for fill function */
|
||||
nv_acc_setup_rectangle(colorIndex);
|
||||
@ -158,7 +158,7 @@ void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count)
|
||||
{
|
||||
int i;
|
||||
|
||||
if(si->ps.card_arch < NV40A)
|
||||
if(!si->settings.dma_acc)
|
||||
{
|
||||
/* init acc engine for invert function */
|
||||
nv_acc_setup_rect_invert();
|
||||
@ -202,7 +202,7 @@ void FILL_SPAN(engine_token *et, uint32 colorIndex, uint16 *list, uint32 count)
|
||||
{
|
||||
int i;
|
||||
|
||||
if(si->ps.card_arch < NV40A)
|
||||
if(!si->settings.dma_acc)
|
||||
{
|
||||
/* init acc engine for fill function */
|
||||
nv_acc_setup_rectangle(colorIndex);
|
||||
|
@ -35,7 +35,7 @@ status_t ACQUIRE_ENGINE(uint32 capabilities, uint32 max_wait, sync_token *st, en
|
||||
if (st) SYNC_TO_TOKEN(st);
|
||||
|
||||
/* make sure all needed engine cmd's are mapped to the FIFO */
|
||||
if (si->ps.card_arch < NV40A)
|
||||
if (!si->settings.dma_acc)
|
||||
nv_acc_assert_fifo();
|
||||
else
|
||||
nv_acc_assert_fifo_dma();
|
||||
@ -58,7 +58,7 @@ status_t RELEASE_ENGINE(engine_token *et, sync_token *st)
|
||||
void WAIT_ENGINE_IDLE(void)
|
||||
{
|
||||
/*wait for the engine to be totally idle*/
|
||||
if (si->ps.card_arch < NV40A)
|
||||
if (!si->settings.dma_acc)
|
||||
nv_acc_wait_idle();
|
||||
else
|
||||
nv_acc_wait_idle_dma();
|
||||
|
@ -208,9 +208,10 @@ status_t check_acc_capability(uint32 feature)
|
||||
}
|
||||
|
||||
//fixme:
|
||||
if(si->ps.card_arch >= NV40A)
|
||||
if ((si->settings.dma_acc && (feature != B_SCREEN_TO_SCREEN_BLIT)) ||
|
||||
si->ps.card_arch >= NV40A)
|
||||
{
|
||||
LOG(4, ("Acc: Acc not setup yet; not exporting hook %s.\n", msg));
|
||||
LOG(4, ("Acc: Function not setup yet; not exporting hook %s.\n", msg));
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Other authors:
|
||||
Mark Watson,
|
||||
Rudolf Cornelissen 10/2002-7/2004.
|
||||
Rudolf Cornelissen 10/2002-1/2005.
|
||||
*/
|
||||
|
||||
#define MODULE_BIT 0x00800000
|
||||
@ -40,8 +40,8 @@ static status_t init_common(int the_fd) {
|
||||
// LOG is now available, si !NULL
|
||||
LOG(4,("init_common: logmask 0x%08x, memory %dMB, hardcursor %d, usebios %d, switchhead %d, force_pci %d\n",
|
||||
si->settings.logmask, si->settings.memory, si->settings.hardcursor, si->settings.usebios, si->settings.switchhead, si->settings.force_pci));
|
||||
LOG(4,("init_common: dumprom %d, unhide_fw %d, pgm_panel %d\n",
|
||||
si->settings.dumprom, si->settings.unhide_fw, si->settings.pgm_panel));
|
||||
LOG(4,("init_common: dumprom %d, unhide_fw %d, pgm_panel %d, dma_acc %d\n",
|
||||
si->settings.dumprom, si->settings.unhide_fw, si->settings.pgm_panel, si->settings.dma_acc));
|
||||
|
||||
/*Check for R4.5.0 and if it is running, use work around*/
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set)
|
||||
* attempting DMA on NV40 and higher because without it I can't get it going ATM.
|
||||
* Later on this can become a nv.settings switch, and maybe later we can even
|
||||
* forget about non-DMA completely (depends on 3D acceleration attempts). */
|
||||
if (si->ps.card_arch < NV40A)
|
||||
if (!si->settings.dma_acc)
|
||||
nv_acc_init();
|
||||
else
|
||||
nv_acc_init_dma();
|
||||
|
Loading…
Reference in New Issue
Block a user