summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-01-25 16:59:30 +0100
committerMichel Dänzer <michel@daenzer.net>2018-01-25 16:59:30 +0100
commit733f606dd6ca8350e6e7f0858bfff5454ddc98ed (patch)
treebe2ce9686273dbe7f8fb6a4b19a60c3debc9fdeb /src/drmmode_display.c
parent83124426040bc1f2dba74c8eeb5a5a9c7c64e664 (diff)
Always use screen depth/bpp for KMS framebuffers
DRI clients can use depth 32 pixmaps while the screen is depth 24, in which case page flipping would fail. Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-and-Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 21cc3c90..f94f70bf 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -943,9 +943,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
if (!fb)
fb = radeon_pixmap_get_fb(pScreen->GetWindowPixmap(pScreen->root));
if (!fb) {
- fb = radeon_fb_create(pRADEONEnt->fd, pScrn->virtualX,
- pScrn->virtualY, pScrn->depth,
- pScrn->bitsPerPixel,
+ fb = radeon_fb_create(pScrn, pRADEONEnt->fd,
+ pScrn->virtualX, pScrn->virtualY,
pScrn->displayWidth * info->pixel_bytes,
info->front_bo->handle);
/* Prevent refcnt of ad-hoc FBs from reaching 2 */