summaryrefslogtreecommitdiff
path: root/src/smilynx_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/smilynx_output.c')
-rw-r--r--src/smilynx_output.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/smilynx_output.c b/src/smilynx_output.c
index aba6db5..fefa8c5 100644
--- a/src/smilynx_output.c
+++ b/src/smilynx_output.c
@@ -82,17 +82,25 @@ SMILynx_OutputDPMS_lcd(xf86OutputPtr output, int mode)
ScrnInfoPtr pScrn = output->scrn;
SMIPtr pSmi = SMIPTR(pScrn);
SMIRegPtr reg = pSmi->mode;
+ xf86CrtcConfigPtr crtcConf = XF86_CRTC_CONFIG_PTR(pScrn);
ENTER();
switch (mode) {
case DPMSModeOn:
- if(pSmi->lcd == 2 /* LCD is DSTN */
- || pSmi->Dualhead /* Virtual Refresh is enabled */)
+ if(pSmi->Dualhead &&
+ output->crtc == crtcConf->crtc[1]){
+ /* Virtual Refresh is enabled */
+
reg->SR21 &= ~0x10; /* Enable LCD framebuffer read operation and DSTN dithering engine */
- if(pSmi->lcd == 2 /* LCD is DSTN */
- && !pSmi->Dualhead /* Virtual Refresh is disabled */)
- reg->SR21 &= ~0x20; /* Enable LCD framebuffer write operation */
+ }else{
+ if(pSmi->lcd == 2){
+ /* LCD is DSTN */
+
+ reg->SR21 &= ~0x10; /* Enable LCD framebuffer read operation and DSTN dithering engine */
+ reg->SR21 &= ~0x20; /* Enable LCD framebuffer write operation */
+ }
+ }
reg->SR31 |= 0x01; /* Enable LCD display*/
break;
@@ -269,13 +277,10 @@ SMILynx_OutputPreInit(ScrnInfoPtr pScrn)
output->interlaceAllowed = FALSE;
output->doubleScanAllowed = FALSE;
- output->possible_crtcs = 1 << 0;
- if(pSmi->Dualhead)
- output->possible_clones = 0;
- else
- output->possible_clones = 1 << 1;
+ output->possible_crtcs = (1 << 0) | (1 << 1);
+ output->possible_clones = 1 << 1;
- if(!pSmi->useBIOS){
+ if(pSmi->Dualhead){
/* Output 1 is CRT */
SMI_OutputFuncsInit_base(&outputFuncs);
outputFuncs->dpms = SMILynx_OutputDPMS_crt;
@@ -288,13 +293,8 @@ SMILynx_OutputPreInit(ScrnInfoPtr pScrn)
output->interlaceAllowed = FALSE;
output->doubleScanAllowed = FALSE;
- if(pSmi->Dualhead){
- output->possible_crtcs = 1 << 1;
- output->possible_clones = 0;
- }else{
- output->possible_crtcs = 1 << 0;
- output->possible_clones = 1 << 0;
- }
+ output->possible_crtcs = 1 << 0;
+ output->possible_clones = 1 << 0;
}
}