Package: xserver-xorg-video-amdgpu Version: 22.0.0-3 Severity: important Tags: patch X-Debbugs-Cc: and...@posteo.net
Dear Maintainer, Using the new Radeon RX 7900XTX GPU, the mouse cursor is invisible in X11 sessions, with xserver-xorg-video-amdgpu. The patch found here, fixes it: https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/patch/?id=9c959fac3af28d191105f63236096ad456dca614 I confirm the patch applies cleanly on current xserver-xorg-video-amdgpu in Debian Bookworm. Maybe you could include it please? VGA-compatible devices on PCI bus: ---------------------------------- 0a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX] [1002:744c] (rev c8) Kernel version (/proc/version): ------------------------------- Linux version 6.1.0-3-amd64 (debian-ker...@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.8-1 (2023-01-29) DRM Information from dmesg: --------------------------- -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-3-amd64 (SMP w/32 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages xserver-xorg-video-amdgpu depends on: ii libc6 2.36-8 ii libdrm-amdgpu1 2.4.114-1 ii libgbm1 22.3.3-1 ii libudev1 252.5-2 ii xserver-xorg-core [xorg-video-abi-25] 2:21.1.6-1 xserver-xorg-video-amdgpu recommends no packages. Versions of packages xserver-xorg-video-amdgpu suggests: ii firmware-amd-graphics 20221214-5 -- no debconf information
>From 9c959fac3af28d191105f63236096ad456dca614 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> 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. --- src/amdgpu_kms.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 9364d17..1f049c9 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -1501,6 +1501,25 @@ static Bool AMDGPUCreateWindow_oneshot(WindowPtr pWin) 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 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags) 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); -- cgit v1.2.1