From: Michel Dänzer <[email protected]> This ensures the scanout pixmaps used for Option "TearFree" and Option "ShadowPrimary" have been initialized when their initial mode is set.
(Ported from radeon commit a4a8cdbcc10c1c5f07485a2af9e9e81e490c3e1d) Signed-off-by: Michel Dänzer <[email protected]> --- src/amdgpu_drv.h | 4 ++++ src/amdgpu_kms.c | 2 +- src/drmmode_display.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h index f91b6e8..c7bc4f3 100644 --- a/src/amdgpu_drv.h +++ b/src/amdgpu_drv.h @@ -270,6 +270,10 @@ typedef struct { /* amdgpu_dri3.c */ Bool amdgpu_dri3_screen_init(ScreenPtr screen); +/* amdgpu_kms.c */ +void amdgpu_scanout_update_handler(ScrnInfoPtr scrn, uint32_t frame, + uint64_t usec, void *event_data); + /* amdgpu_present.c */ Bool amdgpu_present_screen_init(ScreenPtr screen); diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index d3fa916..cc88e2c 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -282,7 +282,7 @@ amdgpu_scanout_update_abort(ScrnInfoPtr scrn, void *event_data) drmmode_crtc->scanout_update_pending = FALSE; } -static void +void amdgpu_scanout_update_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec, void *event_data) { diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 32d75e4..3c8e231 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -594,6 +594,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, drmmode_crtc->scanout_id = 0; fb_id = drmmode_crtc->scanout[0].fb_id; x = y = 0; + + amdgpu_scanout_update_handler(pScrn, 0, 0, crtc); } } ret = -- 2.5.0 _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
