diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-06-22 19:01:03 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-06-23 10:54:28 +0900 |
commit | 0d42082108c264568e2aadd15ace70e72388bc65 (patch) | |
tree | 297c766a91c159e9878ba292634424f14dc95a97 | |
parent | e7e71eabbbccdeabcae1bc6fffabc27c272090ab (diff) |
Call amdgpu_glamor_create_screen_resources after ModifyPixmapHeader
Otherwise, glamor doesn't pick up the new screen pixmap size and
continues using the old size, leaving garbage in some areas after
enlarging the screen.
Fixes regression from commit c315c00e44afc91a7c8e2eab5af836d9643ebb88
("Propagate failure from amdgpu_set_pixmap_bo").
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/drmmode_display.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 7a41294..5d08b49 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1952,14 +1952,8 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) goto fail; } - if (!amdgpu_glamor_create_screen_resources(scrn->pScreen)) - goto fail; - if (info->use_glamor || (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) { - if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer)) - goto fail; - screen->ModifyPixmapHeader(ppix, width, height, -1, -1, pitch, info->front_buffer->cpu_ptr); } else { @@ -1976,6 +1970,15 @@ static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr; #endif + if (!amdgpu_glamor_create_screen_resources(scrn->pScreen)) + goto fail; + + if (info->use_glamor || + (info->front_buffer->flags & AMDGPU_BO_FLAGS_GBM)) { + if (!amdgpu_set_pixmap_bo(ppix, info->front_buffer)) + goto fail; + } + /* Clear new buffer */ gc = GetScratchGC(ppix->drawable.depth, scrn->pScreen); ValidateGC(&ppix->drawable, gc); |