diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-07-19 14:38:19 +0200 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-07-25 14:30:01 -0400 |
commit | d625e16918ef9104863709eb108346464767c444 (patch) | |
tree | 9714ee4eb52ffa48bf15b8f6849eb46234e2c31f | |
parent | cdec2b3c195d1d080207ef01c55ff14b45370010 (diff) |
modesetting: Fix cirrus 24bpp breakage
The recent rewrite of modesetting driver broke the 24bpp support.
As typically found on cirrus KMS, it leads to a blank screen, spewing
the error like:
failed to add fb -22
(EE) modeset(0): failed to set mode: Invalid argument
The culript is that the wrong bpp value of the front buffer is passed
to drmModeAddFB(). Fix it by replacing with the back buffer bpp,
drmmode->kbpp.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Stefan Dirsch <sndirsch@suse.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | hw/xfree86/drivers/modesetting/drmmode_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 87814b9c8..12a919fc0 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -995,7 +995,7 @@ drmmode_bo_import(drmmode_ptr drmmode, drmmode_bo *bo, } #endif return drmModeAddFB(drmmode->fd, bo->width, bo->height, - drmmode->scrn->depth, drmmode->scrn->bitsPerPixel, + drmmode->scrn->depth, drmmode->kbpp, drmmode_bo_get_pitch(bo), drmmode_bo_get_handle(bo), fb_id); } |