summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2004-12-06 06:27:53 +0000
committerMichel Daenzer <michel@daenzer.net>2004-12-06 06:27:53 +0000
commit2b8ab42b05b32710fa4f71a25e2f84192e637fbd (patch)
tree9ca947b192ecd009d6e7a08ccde60d95b931bce8 /src/radeon_driver.c
parent960d15ae3a44efe7c02a3d6d0acbabe63e07be74 (diff)
When direct rendering is enabled, use hostdata blits to transfer data from
system memory to video RAM, which should reduce CPU usage especially with larger videos. Can be disabled via Option "DMAForXv" if there should be any stability issues, but it's been stable for me during a week of testing. Based on a patch by Nikolaus Meine <meine@tnt.uni-hannover.de>. Probably fix endianness issues in some newer XVideo code, untested. Also use hostdata blits to transfer RENDER image data to video RAM to avoid idling the accelerator engine. Increases RENDER performance significantly for me. These changes were only tested on an M9 in a Titanium PowerBook but should work with all Radeons where direct rendering is supported.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r--src/radeon_driver.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 68323caa..f9374646 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -141,6 +141,7 @@ typedef enum {
OPTION_DEPTH_MOVE,
OPTION_PAGE_FLIP,
OPTION_NO_BACKBUFFER,
+ OPTION_XV_DMA,
#endif
OPTION_PANEL_OFF,
OPTION_DDC_MODE,
@@ -192,6 +193,7 @@ static const OptionInfoRec RADEONOptions[] = {
{ OPTION_DEPTH_MOVE, "EnableDepthMoves", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_PAGE_FLIP, "EnablePageFlip", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_NO_BACKBUFFER, "NoBackBuffer", OPTV_BOOLEAN, {0}, FALSE },
+ { OPTION_XV_DMA, "DMAForXv", OPTV_BOOLEAN, {0}, FALSE },
#endif
{ OPTION_PANEL_OFF, "PanelOff", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_DDC_MODE, "DDCMode", OPTV_BOOLEAN, {0}, FALSE },
@@ -3896,6 +3898,7 @@ static Bool RADEONPreInitInt10(ScrnInfoPtr pScrn, xf86Int10InfoPtr *ppInt10)
static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
+ MessageType from;
if (xf86ReturnOptValBool(info->Options, OPTION_CP_PIO, FALSE)) {
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forcing CP into PIO mode\n");
@@ -4032,6 +4035,13 @@ static Bool RADEONPreInitDRI(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Page flipping %sabled\n",
info->allowPageFlip ? "en" : "dis");
+ info->DMAForXv = TRUE;
+ from = xf86GetOptValBool(info->Options, OPTION_XV_DMA, &info->DMAForXv)
+ ? X_CONFIG : X_INFO;
+ xf86DrvMsg(pScrn->scrnIndex, from,
+ "Will %stry to use DMA for Xv image transfers\n",
+ info->DMAForXv ? "" : "not ");
+
return TRUE;
}
#endif