summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-10-10 17:28:35 +0200
committerMichel Dänzer <michel@daenzer.net>2018-10-10 17:28:35 +0200
commitaa572683d86174be2bfc09d4e173ae2a9907d40e (patch)
tree3964fc00d21d9fe255927679419e1222f559cdd9 /src/drmmode_display.c
parent05a1ba9abc941dec616ef7f836f4c54ac93ff9be (diff)
Fix condition for calling set_pixmap_bo in drmmode_xf86crtc_resize
This matches CreateScreenResources_KMS. Fixes crash when resizing the screen (e.g. using xrandr) with depth < 24. Bugzilla: https://bugs.freedesktop.org/104914 Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 5315747..9065e0f 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2881,8 +2881,7 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
if (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
goto fail;
- if (info->use_glamor ||
- (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) {
+ if (info->use_glamor || info->dri2.enabled) {
if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer))
goto fail;
}