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:
@@ -21,7 +21,7 @@ void SCREEN_TO_SCREEN_BLIT(engine_token *et, blit_params *list, uint32 count)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(si->ps.card_arch < NV40A)
|
if(!si->settings.dma_acc)
|
||||||
{
|
{
|
||||||
/* init acc engine for blit function */
|
/* init acc engine for blit function */
|
||||||
nv_acc_setup_blit();
|
nv_acc_setup_blit();
|
||||||
@@ -114,7 +114,7 @@ void FILL_RECTANGLE(engine_token *et, uint32 colorIndex, fill_rect_params *list,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(si->ps.card_arch < NV40A)
|
if(!si->settings.dma_acc)
|
||||||
{
|
{
|
||||||
/* init acc engine for fill function */
|
/* init acc engine for fill function */
|
||||||
nv_acc_setup_rectangle(colorIndex);
|
nv_acc_setup_rectangle(colorIndex);
|
||||||
@@ -158,7 +158,7 @@ void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(si->ps.card_arch < NV40A)
|
if(!si->settings.dma_acc)
|
||||||
{
|
{
|
||||||
/* init acc engine for invert function */
|
/* init acc engine for invert function */
|
||||||
nv_acc_setup_rect_invert();
|
nv_acc_setup_rect_invert();
|
||||||
@@ -202,7 +202,7 @@ void FILL_SPAN(engine_token *et, uint32 colorIndex, uint16 *list, uint32 count)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(si->ps.card_arch < NV40A)
|
if(!si->settings.dma_acc)
|
||||||
{
|
{
|
||||||
/* init acc engine for fill function */
|
/* init acc engine for fill function */
|
||||||
nv_acc_setup_rectangle(colorIndex);
|
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);
|
if (st) SYNC_TO_TOKEN(st);
|
||||||
|
|
||||||
/* make sure all needed engine cmd's are mapped to the FIFO */
|
/* 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();
|
nv_acc_assert_fifo();
|
||||||
else
|
else
|
||||||
nv_acc_assert_fifo_dma();
|
nv_acc_assert_fifo_dma();
|
||||||
@@ -58,7 +58,7 @@ status_t RELEASE_ENGINE(engine_token *et, sync_token *st)
|
|||||||
void WAIT_ENGINE_IDLE(void)
|
void WAIT_ENGINE_IDLE(void)
|
||||||
{
|
{
|
||||||
/*wait for the engine to be totally idle*/
|
/*wait for the engine to be totally idle*/
|
||||||
if (si->ps.card_arch < NV40A)
|
if (!si->settings.dma_acc)
|
||||||
nv_acc_wait_idle();
|
nv_acc_wait_idle();
|
||||||
else
|
else
|
||||||
nv_acc_wait_idle_dma();
|
nv_acc_wait_idle_dma();
|
||||||
|
|||||||
@@ -208,9 +208,10 @@ status_t check_acc_capability(uint32 feature)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//fixme:
|
//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;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Other authors:
|
Other authors:
|
||||||
Mark Watson,
|
Mark Watson,
|
||||||
Rudolf Cornelissen 10/2002-7/2004.
|
Rudolf Cornelissen 10/2002-1/2005.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_BIT 0x00800000
|
#define MODULE_BIT 0x00800000
|
||||||
@@ -40,8 +40,8 @@ static status_t init_common(int the_fd) {
|
|||||||
// LOG is now available, si !NULL
|
// 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",
|
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));
|
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",
|
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.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*/
|
/*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.
|
* 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
|
* 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). */
|
* forget about non-DMA completely (depends on 3D acceleration attempts). */
|
||||||
if (si->ps.card_arch < NV40A)
|
if (!si->settings.dma_acc)
|
||||||
nv_acc_init();
|
nv_acc_init();
|
||||||
else
|
else
|
||||||
nv_acc_init_dma();
|
nv_acc_init_dma();
|
||||||
|
|||||||
Reference in New Issue
Block a user