Don't call scanout_flip/update with a legacy RandR scanout buffer
PATCH 1/2 Don't call scanout_flip/update with a legacy RandR scanout buffer
From: Michel Dänzer <[email protected]>
It means we are not using our own scanout buffers.
Fixes crash when TearFree is supposed to be enabled, but drmmode_handle_transform doesn't set crtc->driverIsPerformingTransform.
Bugzilla: https://bugs.freedesktop.org/105736
--- src/amdgpu_kms.c | 3 +++ 1 file changed, 3 insertions(+)
src/amdgpu_kms.c +3 -0
@@ -1055,6 +1055,9 @@ static void AMDGPUBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)xf86CrtcPtr crtc = xf86_config->crtc[c];drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; +if (drmmode_crtc->rotate.pixmap) +continue ; +if (drmmode_crtc->tear_free)amdgpu_scanout_flip (pScreen, info, crtc);else if (drmmode_crtc->scanout[drmmode_crtc->scanout_id].pixmap)
Signature · 6 lines
2.17.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180424100747.6386-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH 2/2 Simplify drmmode_handle_transform
From: Michel Dänzer <[email protected]>
Set crtc->driverIsPerformingTransform for any case we can handle before calling xf86CrtcRotate. We already clear it afterwards when the latter clears crtc->transform_in_use.
This should allow our separate scanout buffer mechanism to be used in more cases.
--- src/drmmode_display.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
src/drmmode_display.c +1 -5
@@ -631,13 +631,9 @@ drmmode_handle_transform(xf86CrtcPtr crtc)Bool ret;#if XORG_VERSION_CURRENT >=XORG_VERSION_NUMERIC (1 ,15 ,99 ,903 ,0 ) -if (crtc->transformPresent || crtc->rotation != RR_Rotate_0) - crtc->driverIsPerformingTransform = XF86DriverTransformOutput; -else - crtc->driverIsPerformingTransform = XF86DriverTransformNone; + crtc->driverIsPerformingTransform = XF86DriverTransformOutput;#else crtc->driverIsPerformingTransform = !crtc->transformPresent && - crtc->rotation != RR_Rotate_0 && (crtc->rotation &0xf ) == RR_Rotate_0;#endif
Signature · 6 lines
2.17.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180424100747.6386-2-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Acked-byRe: [PATCH xf86-video-amdgpu 2/2] Simplify drmmode_handle_transform
Quoted 10 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
Set
crtc->driverIsPerformingTransformfor any case we can handle before calling xf86CrtcRotate. We already clear it afterwards when the latter clearscrtc->transform_in_use.This should allow our separate scanout buffer mechanism to be used in more cases.
Signed-off-by Michel Dänzer <[email protected]>
Quoted 26 lines
--- src/drmmode_display.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)src/drmmode_display.c +1
-6@@ -631,13 +631,9 @@ drmmode_handle_transform(xf86CrtcPtr crtc)Bool ret;#if XORG_VERSION_CURRENT >=XORG_VERSION_NUMERIC (1 ,15 ,99 ,903 ,0 ) -if (crtc->transformPresent || crtc->rotation != RR_Rotate_0) - crtc->driverIsPerformingTransform = XF86DriverTransformOutput; -else - crtc->driverIsPerformingTransform = XF86DriverTransformNone; + crtc->driverIsPerformingTransform = XF86DriverTransformOutput;#else crtc->driverIsPerformingTransform = !crtc->transformPresent && - crtc->rotation != RR_Rotate_0 && (crtc->rotation &0xf ) == RR_Rotate_0;#endif --2.17.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byQuoted 9 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
It means we are not using our own scanout buffers.
Fixes crash when TearFree is supposed to be enabled, but
drmmode_handle_transformdoesn't setcrtc->driverIsPerformingTransform.Bugzilla: https://bugs.freedesktop.org/105736
Signed-off-by Michel Dänzer <[email protected]>
Quoted 21 lines
--- src/amdgpu_kms.c | 3 +++ 1 file changed, 3 insertions(+)src/amdgpu_kms.c +3
-1@@ -1055,6 +1055,9 @@ static void AMDGPUBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)xf86CrtcPtr crtc = xf86_config->crtc[c];drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; +if (drmmode_crtc->rotate.pixmap) +continue ; +if (drmmode_crtc->tear_free)amdgpu_scanout_flip (pScreen, info, crtc);else if (drmmode_crtc->scanout[drmmode_crtc->scanout_id].pixmap) --2.17.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx