xf86-video-amdgpu: Branch 'master' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 7 16:30:47 UTC 2019
src/amdgpu_present.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
New commits:
commit e6fce59a071220967fcd4e2c9e4a262c72870761
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Jul 24 16:05:05 2019 +0200
present: Don't check pixmap pitch in check_flip with non-DC >= 3.34
The current non-DC kernel driver also handles flipping between different
pitches correctly.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index 7d46d52..cc3d113 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -260,6 +260,7 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
int num_crtcs_on;
+ Bool dc_enabled;
int i;
if (!scrn->vtSema)
@@ -294,14 +295,20 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
/* Only DC supports advanced color management features, so we can use
* drmmode_cm_enabled as a proxy for "Is DC enabled?"
*/
- if (info->dri2.pKernelDRMVersion->version_minor < 31 ||
- !drmmode_cm_enabled(&info->drmmode)) {
+ dc_enabled = drmmode_cm_enabled(&info->drmmode);
+
+ if (info->dri2.pKernelDRMVersion->version_minor < (dc_enabled ? 31 : 34)) {
/* The kernel driver doesn't handle flipping between BOs with
- * different pitch / tiling parameters correctly
+ * different pitch correctly
*/
if (pixmap->devKind != screen_pixmap->devKind)
return FALSE;
+ }
+ if (!dc_enabled || info->dri2.pKernelDRMVersion->version_minor < 31) {
+ /* The kernel driver doesn't handle flipping between BOs with
+ * different tiling parameters correctly
+ */
if (amdgpu_pixmap_get_tiling_info(pixmap) !=
amdgpu_pixmap_get_tiling_info(screen_pixmap))
return FALSE;
commit 5bb2580b266468f87843b5585ae64e056b63bb88
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Jul 24 15:55:19 2019 +0200
present: Don't check pixmap pitch in check_flip with current DC
Current DC handles flipping between different pitches correctly.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index 45a969d..7d46d52 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -274,9 +274,6 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->drmmode.dri2_flipping)
return FALSE;
- if (pixmap->devKind != screen_pixmap->devKind)
- return FALSE;
-
if (priv && priv->fb_failed)
return FALSE;
@@ -300,8 +297,11 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->dri2.pKernelDRMVersion->version_minor < 31 ||
!drmmode_cm_enabled(&info->drmmode)) {
/* The kernel driver doesn't handle flipping between BOs with
- * different tiling parameters correctly
+ * different pitch / tiling parameters correctly
*/
+ if (pixmap->devKind != screen_pixmap->devKind)
+ return FALSE;
+
if (amdgpu_pixmap_get_tiling_info(pixmap) !=
amdgpu_pixmap_get_tiling_info(screen_pixmap))
return FALSE;
commit ac66086613cbd0974b421cd5eda872adc15242ed
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Jul 24 15:45:21 2019 +0200
present: Also check pixmap pitch in check_flip with current xserver
The corresponding check in the xserver Present code was removed again,
because flipping between different pitches can work in some cases.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index 83a0517..45a969d 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -274,10 +274,8 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->drmmode.dri2_flipping)
return FALSE;
-#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1, 20, 99, 1, 0)
if (pixmap->devKind != screen_pixmap->devKind)
return FALSE;
-#endif
if (priv && priv->fb_failed)
return FALSE;
More information about the xorg-commit
mailing list