diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-14 16:56:46 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-14 16:56:46 -0200 |
commit | be226bfaad76e7b48e006fe55ebae09b044ba4b7 (patch) | |
tree | a4b933fa031dd48a0a78c369f6152127727d24c9 /src/smi501_crtc.c | |
parent | 5b8583fc2e5626ed98877858158d9687d7c94469 (diff) |
MSOC: Hide cursor on mode setup when using software cursor.
The kernel framebuffer module uses the hw cursor for the console cursor,
so the driver must ensure it is hidden when setting a video mode.
Diffstat (limited to 'src/smi501_crtc.c')
-rw-r--r-- | src/smi501_crtc.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/smi501_crtc.c b/src/smi501_crtc.c index 3fc0912..70f3b12 100644 --- a/src/smi501_crtc.c +++ b/src/smi501_crtc.c @@ -39,6 +39,14 @@ authorization from The XFree86 Project or Silicon Motion. #undef VERBLEV #define VERBLEV 1 +/* + * Prototypes + */ +static void SMI501_CrtcHideCursor(xf86CrtcPtr crtc); + +/* + * Implementation + */ static void SMI501_CrtcVideoInit_lcd(xf86CrtcPtr crtc) { @@ -49,10 +57,12 @@ SMI501_CrtcVideoInit_lcd(xf86CrtcPtr crtc) ENTER(); + if (!pSmi->HwCursor) + SMI501_CrtcHideCursor(crtc); + mode->panel_display_ctl.value = READ_SCR(pSmi, PANEL_DISPLAY_CTL); mode->panel_fb_width.value = READ_SCR(pSmi, PANEL_FB_WIDTH); - mode->panel_display_ctl.f.format = pScrn->bitsPerPixel == 8 ? 0 : pScrn->bitsPerPixel == 16 ? 1 : 2; @@ -83,10 +93,12 @@ SMI501_CrtcVideoInit_crt(xf86CrtcPtr crtc) ENTER(); + if (!pSmi->HwCursor) + SMI501_CrtcHideCursor(crtc); + mode->crt_display_ctl.value = READ_SCR(pSmi, CRT_DISPLAY_CTL); mode->crt_fb_width.value = READ_SCR(pSmi, CRT_FB_WIDTH); - mode->crt_display_ctl.f.format = pScrn->bitsPerPixel == 8 ? 0 : pScrn->bitsPerPixel == 16 ? 1 : 2; |