fbdevhw: Only deal with RGB weight if default visual is True- or DirectColor.
This commit is contained in:
parent
27a01e100b
commit
14d6a9b327
|
@ -187,9 +187,16 @@ xfree2fbdev_fblayout(ScrnInfoPtr pScrn, struct fb_var_screeninfo *var)
|
||||||
pScrn->virtualX;
|
pScrn->virtualX;
|
||||||
var->yres_virtual = pScrn->virtualY;
|
var->yres_virtual = pScrn->virtualY;
|
||||||
var->bits_per_pixel = pScrn->bitsPerPixel;
|
var->bits_per_pixel = pScrn->bitsPerPixel;
|
||||||
var->red.length = pScrn->weight.red;
|
if (pScrn->defaultVisual == TrueColor ||
|
||||||
var->green.length = pScrn->weight.green;
|
pScrn->defaultVisual == DirectColor) {
|
||||||
var->blue.length = pScrn->weight.blue;
|
var->red.length = pScrn->weight.red;
|
||||||
|
var->green.length = pScrn->weight.green;
|
||||||
|
var->blue.length = pScrn->weight.blue;
|
||||||
|
} else {
|
||||||
|
var->red.length = 8;
|
||||||
|
var->green.length = 8;
|
||||||
|
var->blue.length = 8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -746,15 +753,18 @@ fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: This is a hack, but it should be a NOP for all the setups that
|
if (pScrn->defaultVisual == TrueColor ||
|
||||||
* worked before and actually seems to fix some others...
|
pScrn->defaultVisual == DirectColor) {
|
||||||
*/
|
/* XXX: This is a hack, but it should be a NOP for all the setups that
|
||||||
pScrn->offset.red = fPtr->var.red.offset;
|
* worked before and actually seems to fix some others...
|
||||||
pScrn->offset.green = fPtr->var.green.offset;
|
*/
|
||||||
pScrn->offset.blue = fPtr->var.blue.offset;
|
pScrn->offset.red = fPtr->var.red.offset;
|
||||||
pScrn->mask.red = ((1 << fPtr->var.red.length) - 1) << fPtr->var.red.offset;
|
pScrn->offset.green = fPtr->var.green.offset;
|
||||||
pScrn->mask.green = ((1 << fPtr->var.green.length) - 1) << fPtr->var.green.offset;
|
pScrn->offset.blue = fPtr->var.blue.offset;
|
||||||
pScrn->mask.blue = ((1 << fPtr->var.blue.length) - 1) << fPtr->var.blue.offset;
|
pScrn->mask.red = ((1 << fPtr->var.red.length) - 1) << fPtr->var.red.offset;
|
||||||
|
pScrn->mask.green = ((1 << fPtr->var.green.length) - 1) << fPtr->var.green.offset;
|
||||||
|
pScrn->mask.blue = ((1 << fPtr->var.blue.length) - 1) << fPtr->var.blue.offset;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue