diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-04 15:57:12 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-04 15:57:12 -0200 |
commit | 1d7b9547e1d37601f14410857c22f256e5c74f14 (patch) | |
tree | 435e5494c22952c20843eb6282ccf0f67df18fc3 /src/smi_driver.c | |
parent | 93308d067c93126dd0aba9b718d9e0ba28dde9f4 (diff) |
Add CSCVideo option to smi 501/502.
This code is an adaptation of SMI sample implementation.
CSCVideo is an alternate way to render video, that should reduce memory
bandwidth usage, and uses the color space conversion hardware to render
video directly to the framebuffer memory.
When using randr dual head mode, currently only XAA is supported. As it
has a fixed format framebuffer (when using the Virtual xorg.conf option).
This patch also ensures that pScrn->displayWidth, pScrn->virtualX and
pScrn->virtualY are only changed by the driver when using EXA.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r-- | src/smi_driver.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index 299772a..9bfc712 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -166,6 +166,7 @@ typedef enum OPTION_ACCELMETHOD, OPTION_PANEL_SIZE, OPTION_USE_FBDEV, + OPTION_CSCVIDEO, NUMBER_OF_OPTIONS } SMIOpts; @@ -191,6 +192,7 @@ static const OptionInfoRec SMIOptions[] = { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE }, { OPTION_PANEL_SIZE, "PanelSize", OPTV_ANYSTR, {0}, FALSE }, { OPTION_USE_FBDEV, "UseFBDev", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_CSCVIDEO, "CSCVideo", OPTV_BOOLEAN, {0}, TRUE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -884,6 +886,24 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) pSmi->useEXA ? "EXA" : "XAA"); } + if (IS_MSOC(pSmi)) { + pSmi->CSCVideo = !pSmi->useEXA || !pSmi->Dualhead; + from = X_DEFAULT; + if (xf86GetOptValBool(pSmi->Options, OPTION_CSCVIDEO, &pSmi->CSCVideo)) { + from = X_CONFIG; + + /* FIXME */ + if (pSmi->CSCVideo && pSmi->useEXA && pSmi->Dualhead) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "CSCVideo requires XAA or EXA in single head mode.\n"); + pSmi->CSCVideo = FALSE; + } + } + + xf86DrvMsg(pScrn->scrnIndex, from, "CSC Video %sabled\n", + pSmi->CSCVideo ? "en" : "dis"); + } + SMI_MapMmio(pScrn); SMI_DetectMem(pScrn); SMI_MapMem(pScrn); |