diff -u xserver-xorg-video-amdgpu-22.0.0/debian/changelog xserver-xorg-video-amdgpu-22.0.0/debian/changelog --- xserver-xorg-video-amdgpu-22.0.0/debian/changelog +++ xserver-xorg-video-amdgpu-22.0.0/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-video-amdgpu (22.0.0-1ubuntu0.2) jammy; urgency=medium + + * Use DRM_CAP_CURSOR_WIDTH/HEIGHT if possible (LP: #2034105) + + -- Kai-Chuan Hsieh Wed, 06 Sep 2023 14:43:28 +0800 + xserver-xorg-video-amdgpu (22.0.0-1ubuntu0.1) jammy; urgency=medium * Added patch from git to fix slow refresh rate with AMD GPU Screen diff -u xserver-xorg-video-amdgpu-22.0.0/debian/control xserver-xorg-video-amdgpu-22.0.0/debian/control --- xserver-xorg-video-amdgpu-22.0.0/debian/control +++ xserver-xorg-video-amdgpu-22.0.0/debian/control @@ -1,7 +1,8 @@ Source: xserver-xorg-video-amdgpu Section: x11 Priority: optional -Maintainer: Debian X Strike Force +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian X Strike Force Uploaders: Timo Aaltonen Build-Depends: debhelper (>= 11), diff -u xserver-xorg-video-amdgpu-22.0.0/debian/patches/series xserver-xorg-video-amdgpu-22.0.0/debian/patches/series --- xserver-xorg-video-amdgpu-22.0.0/debian/patches/series +++ xserver-xorg-video-amdgpu-22.0.0/debian/patches/series @@ -5,0 +6 @@ +0006-Use-DRM_CAP_CURSOR_WIDTH-HEIGHT-if-possible.patch only in patch2: unchanged: --- xserver-xorg-video-amdgpu-22.0.0.orig/debian/patches/0006-Use-DRM_CAP_CURSOR_WIDTH-HEIGHT-if-possible.patch +++ xserver-xorg-video-amdgpu-22.0.0/debian/patches/0006-Use-DRM_CAP_CURSOR_WIDTH-HEIGHT-if-possible.patch @@ -0,0 +1,56 @@ +From: Pierre-Eric Pelloux-Prayer +Date: Thu, 29 Sep 2022 16:42:09 +0200 +Subject: Use DRM_CAP_CURSOR_WIDTH/HEIGHT if possible + +There's no need to hardcode the cursor size if the kernel can +report the value it wants. + +Origin: https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/commit/?id=9c959fac3af28d191105f63236096ad456dca614 +Bug: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-amdgpu/+bug/2034105 +--- + src/amdgpu_kms.c | 27 ++++++++++++++++++++------- + 1 file changed, 20 insertions(+), 7 deletions(-) + +--- a/src/amdgpu_kms.c ++++ b/src/amdgpu_kms.c +@@ -1501,6 +1501,25 @@ + return ret; + } + ++static void amdgpu_determine_cursor_size(int fd, AMDGPUInfoPtr info) ++{ ++ uint64_t value; ++ ++ if (drmGetCap(fd, DRM_CAP_CURSOR_WIDTH, &value) == 0) ++ info->cursor_w = value; ++ else if (info->family < AMDGPU_FAMILY_CI) ++ info->cursor_w = CURSOR_WIDTH; ++ else ++ info->cursor_w = CURSOR_WIDTH_CIK; ++ ++ if (drmGetCap(fd, DRM_CAP_CURSOR_HEIGHT, &value) == 0) ++ info->cursor_h = value; ++ else if (info->family < AMDGPU_FAMILY_CI) ++ info->cursor_h = CURSOR_HEIGHT; ++ else ++ info->cursor_h = CURSOR_HEIGHT_CIK; ++} ++ + /* When the root window is mapped, set the initial modes */ + void AMDGPUWindowExposures_oneshot(WindowPtr pWin, RegionPtr pRegion + #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,16,99,901,0) +@@ -1684,13 +1703,7 @@ + else + pAMDGPUEnt->HasCRTC2 = TRUE; + +- if (info->family < AMDGPU_FAMILY_CI) { +- info->cursor_w = CURSOR_WIDTH; +- info->cursor_h = CURSOR_HEIGHT; +- } else { +- info->cursor_w = CURSOR_WIDTH_CIK; +- info->cursor_h = CURSOR_HEIGHT_CIK; +- } ++ amdgpu_determine_cursor_size(pAMDGPUEnt->fd, info); + + amdgpu_query_heap_size(pAMDGPUEnt->pDev, AMDGPU_GEM_DOMAIN_GTT, + &heap_size, &max_allocation);