diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-09-19 18:00:16 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-09-19 18:00:16 -0300 |
commit | 9ae840a358959615020fa4adb76c1487231927f3 (patch) | |
tree | b8be2243288eda87cd738ce3a8d59dd3644f8cab /src/smi_501.c | |
parent | f4339a6a7aa077cb355dd23b77ea568ad2a481e3 (diff) |
Add MSOC palette support to run at 8 bpp.
Colors should be correctly set, but most output using Render is not
properly drawn, i.e. anti aliased fonts, etc. Need to investigate
further, but it should be a general problem, not exclusive to the
driver.
Diffstat (limited to 'src/smi_501.c')
-rw-r--r-- | src/smi_501.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/smi_501.c b/src/smi_501.c index 725ab7a..1cd765c 100644 --- a/src/smi_501.c +++ b/src/smi_501.c @@ -491,8 +491,6 @@ SMI501_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr xf86mode) WRITE_SCR(pSmi, SYSTEM_CTL, mode->system_ctl.value); } - /* FIXME update pallete here if running at 8 bpp */ - SMI_AdjustFrame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, VERBLEV, @@ -502,6 +500,21 @@ SMI501_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr xf86mode) return (TRUE); } +void +SMI501_LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, + LOCO *colors, VisualPtr pVisual) +{ + SMIPtr pSmi = SMIPTR(pScrn); + int i, port; + + port = pSmi->IsSecondary ? CRT_PALETTE : PANEL_PALETTE; + for (i = 0; i < numColors; i++) + WRITE_SCR(pSmi, port + (indices[i] << 2), + (colors[indices[i]].red << 16) | + (colors[indices[i]].green << 8) | + colors[indices[i]].blue); +} + static char * format_integer_base2(int32_t word) { |