Bug#1037144: release-notes: bookworm add #1037142 into section 5.4 regarding AMD 7900XTX GPU issues with kernel 6.1

2023-06-06 Thread AAF
Package: release-notes
Severity: important
X-Debbugs-Cc: and...@posteo.net

Dear Maintainer,

Please add bug #1037142 in the "5.4 Known severe bugs" section for the Debian
Bookworm release.

The bug describes several issues observed specific to kernel 6.1 and
having an AMD 7900XTX/XT GPU.

Thanks.
Andrei



Bug#1037142: linux-image-6.1.0-9-amd64: AMD 7900XTX GPU several issues with Linux 6.1 affecting normal usage

2023-06-06 Thread AAF
Package: src:linux
Version: 6.1.27-1
Severity: important
Tags: upstream
X-Debbugs-Cc: and...@posteo.net

Dear Maintainer,

With Linux 6.1 up to 6.1.31 (problems with framebuffer lag started
around Linux 6.0.2), using an AMD 7900XTX GPU, the following
behaviour is observed:

Multiple Screens, with high refresh rates, ex: HDMI 120Hz and
DisplayPort 144Hz:
- white stripe during Display Manager start
- drm framebuffer console lag, on tty2 for example, when typing the characters 
appear with a
  delay or not at all, clearing the screen with CTRL+L is slow
- mouse cursor appears for SDDM here, but is invisible for the live
  desktop (X11) session then.
- with multiple Monitors idle power usage observed as reported by
  sensors PPT value is ~90W (2 screens, with high refresh rates of 120
  and 144 Hz)
- booting, wait until Display Manager (SDDM) starts, switch to tty2,
  switch back to tty7 then display hangs for a while and kernel log has
  the following, or then recovers and hangs again and a restart of the
  computer is required:

[Sat May 13 12:55:35 2023] [ cut here ]
[Sat May 13 12:55:35 2023] refcount_t: underflow; use-after-free.
[Sat May 13 12:55:35 2023] WARNING: CPU: 15 PID: 1307 at lib/refcount.c:28 
refcount_warn_saturate+0xba/0x110
...
[Sat May 13 12:55:35 2023] CPU: 15 PID: 1307 Comm: InputThread Not tainted 
6.1.0-9-amd64 #1  Debian 6.1.27-1
[Sat May 13 12:55:35 2023] Hardware name: ASUS System Product Name/ROG 
CROSSHAIR VIII DARK HERO, BIOS 4304 12/12/2022
[Sat May 13 12:55:35 2023] RIP: 0010:refcount_warn_saturate+0xba/0x110
[Sat May 13 12:55:35 2023] Code: 01 01 e8 69 ef b6 ff 0f 0b c3 cc cc cc cc 80 
3d 5a 7c 6d 01 00 75 85 48 c7 c7 50 71 b5 8a c6 05 4a 7c 6d 01 01 e8 46 ef b6 
ff <0f> 0b c3 cc cc cc cc 80 3d 35 7c 6d 01 00 0f 85 5e ff ff ff 48 c7
[Sat May 13 12:55:35 2023] RSP: 0018:9a38c596fad8 EFLAGS: 00010286
[Sat May 13 12:55:35 2023] RAX:  RBX: 0001 RCX: 

[Sat May 13 12:55:35 2023] RDX: 0002 RSI: 8ab3fa66 RDI: 

[Sat May 13 12:55:35 2023] RBP: 8c4390e40090 R08:  R09: 
9a38c596f948
[Sat May 13 12:55:35 2023] R10: 0003 R11: 8c4aaf27dc28 R12: 
0002
[Sat May 13 12:55:35 2023] R13: 8c4390e4 R14:  R15: 
0004
[Sat May 13 12:55:35 2023] FS:  7f4e17fff6c0() 
GS:8c4a8edc() knlGS:
[Sat May 13 12:55:35 2023] CS:  0010 DS:  ES:  CR0: 80050033
[Sat May 13 12:55:35 2023] CR2: 560fc0535020 CR3: 00011438 CR4: 
00750ee0
[Sat May 13 12:55:35 2023] PKRU: 5554
[Sat May 13 12:55:35 2023] Call Trace:
[Sat May 13 12:55:35 2023]  
[Sat May 13 12:55:35 2023]  dc_resource_state_destruct+0x34/0x80 [amdgpu]
[Sat May 13 12:55:35 2023]  dc_release_state+0x2a/0x50 [amdgpu]
[Sat May 13 12:55:35 2023]  dm_atomic_destroy_state+0x1c/0x30 [amdgpu]
[Sat May 13 12:55:35 2023]  drm_atomic_state_default_clear+0x236/0x2e0 [drm]
[Sat May 13 12:55:35 2023]  __drm_atomic_state_free+0x66/0xa0 [drm]
[Sat May 13 12:55:35 2023]  drm_atomic_helper_update_plane+0x101/0x150 
[drm_kms_helper]
[Sat May 13 12:55:35 2023]  drm_mode_cursor_universal+0x128/0x240 [drm]
[Sat May 13 12:55:35 2023]  drm_mode_cursor_common+0x102/0x230 [drm]
[Sat May 13 12:55:35 2023]  ? drm_mode_cursor_ioctl+0x70/0x70 [drm]
[Sat May 13 12:55:35 2023]  drm_ioctl_kernel+0xc9/0x170 [drm]
[Sat May 13 12:55:35 2023]  drm_ioctl+0x22f/0x410 [drm]
[Sat May 13 12:55:35 2023]  ? drm_mode_cursor_ioctl+0x70/0x70 [drm]
[Sat May 13 12:55:35 2023]  amdgpu_drm_ioctl+0x4a/0x80 [amdgpu]
[Sat May 13 12:55:35 2023]  __x64_sys_ioctl+0x90/0xd0
[Sat May 13 12:55:35 2023]  do_syscall_64+0x5b/0xc0
[Sat May 13 12:55:35 2023]  ? fpregs_assert_state_consistent+0x22/0x50
[Sat May 13 12:55:35 2023]  ? exit_to_user_mode_prepare+0x139/0x1d0
[Sat May 13 12:55:35 2023]  ? syscall_exit_to_user_mode+0x17/0x40
[Sat May 13 12:55:35 2023]  ? do_syscall_64+0x67/0xc0
[Sat May 13 12:55:35 2023]  ? do_syscall_64+0x67/0xc0
[Sat May 13 12:55:35 2023]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[Sat May 13 12:55:35 2023] RIP: 0033:0x7f4e3cf1cafb
[Sat May 13 12:55:35 2023] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 
24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 
05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[Sat May 13 12:55:35 2023] RSP: 002b:7f4e17ffd1e0 EFLAGS: 0246 
ORIG_RAX: 0010
[Sat May 13 12:55:35 2023] RAX: ffda RBX: 7f4e17ffd270 RCX: 
7f4e3cf1cafb
[Sat May 13 12:55:35 2023] RDX: 7f4e17ffd270 RSI: c02464bb RDI: 
000f
[Sat May 13 12:55:35 2023] RBP: 7f4e17ffd270 R08:  R09: 
0001
[Sat May 13 12:55:35 2023] R10: 0f00 R11: 0246 R12: 
c02464bb
[Sat May 13 12:55:35 2023] R13: 000f R14: 0008 R15: 
55adf2afb000
[Sat May 13 

Bug#1031021: Acknowledgement (xserver-xorg-video-amdgpu: Mouse cursor is invisible with KMS on X11, when using RDNA3 GPU - 7900XTX)

2023-02-10 Thread AAF

Hi again,

Link to issue 
https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/61 
, where patch was provided.




Bug#1031021: xserver-xorg-video-amdgpu: Mouse cursor is invisible with KMS on X11, when using RDNA3 GPU - 7900XTX

2023-02-10 Thread AAF
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  libgbm122.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 
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, ) == 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, ) == 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,
_size, _allocation);
-- 
cgit v1.2.1