Diagonal tearing in OpenGL output on Aruba r600 GPU (Radeon HD 7660D) since Linux 5.16
I have a Radeon HD 7660D GPU and for some time I observe diagonal tearing when playing a video using OpenGL (e.g. with "mpv --video=gpu"). Other displaying methods (Xv, VDPAU, plain X11) are not affected. It happens in current Linux 5.17.2, 5.17.1, 5.17.0 and I have been experiencing it for a few months.
Today I bisected it to v5.15-rc1-369-g0597ca7b43e4:
commit 0597ca7b43e41c509bd0feb143bdfb7278496397 (refs/bisect/bad)
Author: Christian König <christian.koenig@amd.com>
Date: Wed Jun 16 09:23:50 2021 +0200
drm/radeon: use new iterator in radeon_sync_resv
Simplifying the code a bit.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20211005113742.1101-16-christian.koenig@amd.com
Reverting the commit from 5.17.2 tree helps for me.
I'm using xorg-server-21.1.3, xf86-video-ati-19.1.0, mesa-22.0.1, mpv-0.33.1. My xorg.conf:
Section "Device"
Identifier "Radeon"
Driver "radeon"
Option "AccelMethod" "glamor"
Option "AccelDFS" "True"
EndSection
An excerpt from Xorg.0.log:
[ 47.619] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 47.619] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/drm/card0
[ 47.620] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 10 paused 0
[ 47.625] (--) PCI:*(0@0:1:0) 1002:9901:1043:8526 rev 0, Mem @ 0xc0000000/268435456, 0xfef00000/262144, I/O @ 0x0000f000/256, BIOS @ 0x????????/131072
[ 47.625] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[ 47.625] (II) LoadModule: "dbe"
[ 47.625] (II) Module "dbe" already built-in
[ 47.625] (II) LoadModule: "extmod"
[ 47.625] (II) Module "extmod" already built-in
[ 47.625] (II) LoadModule: "dri3"
[ 47.625] (II) Module "dri3" already built-in
[ 47.625] (II) LoadModule: "glamoregl"
[ 47.641] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[ 47.789] (II) Module glamoregl: vendor="X.Org Foundation"
[ 47.789] compiled for 1.21.1.3, module version = 1.0.1
[ 47.789] ABI class: X.Org ANSI C Emulation, version 0.4
[ 47.789] (II) LoadModule: "glx"
[ 47.789] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 47.881] (II) Module glx: vendor="X.Org Foundation"
[ 47.881] compiled for 1.21.1.3, module version = 1.0.0
[ 47.881] ABI class: X.Org Server Extension, version 10.0
[ 47.881] (II) LoadModule: "radeon"
[ 47.881] (II) Loading /usr/lib64/xorg/modules/drivers/radeon_drv.so
[ 47.929] (II) Module radeon: vendor="X.Org Foundation"
[ 47.929] compiled for 1.21.1.3, module version = 19.1.0
[ 47.929] Module class: X.Org Video Driver
[ 47.929] ABI class: X.Org Video Driver, version 25.2
[...]
[ 48.047] (II) RADEON: Driver for ATI/AMD Radeon chipsets:
[...]
[ 48.050] (II) [KMS] Kernel modesetting enabled.
[ 48.050] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 48.050] (II) RADEON(0): Creating default Display subsection in Screen section
"Screen 1" for depth/fbbpp 24/32
[ 48.050] (**) RADEON(0): Depth 24, (--) framebuffer bpp 32
[ 48.050] (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[ 48.050] (==) RADEON(0): Default visual is TrueColor
[ 48.050] (**) RADEON(0): Option "AccelMethod" "glamor"
[ 48.050] (==) RADEON(0): RGB weight 888
[ 48.050] (II) RADEON(0): Using 8 bits per RGB (8 bit DAC)
[ 48.050] (--) RADEON(0): Chipset: "ARUBA" (ChipID = 0x9901)
[ 48.050] (II) Loading sub module "fb"
[ 48.050] (II) LoadModule: "fb"
[ 48.050] (II) Module "fb" already built-in
[ 48.051] (II) Loading sub module "dri2"
[ 48.051] (II) LoadModule: "dri2"
[ 48.051] (II) Module "dri2" already built-in
[ 49.889] (II) Loading sub module "glamoregl"
[ 49.889] (II) LoadModule: "glamoregl"
[ 49.889] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[ 49.889] (II) Module glamoregl: vendor="X.Org Foundation"
[ 49.889] compiled for 1.21.1.3, module version = 1.0.1
[ 49.889] ABI class: X.Org ANSI C Emulation, version 0.4
[ 50.124] (II) RADEON(0): glamor X acceleration enabled on AMD ARUBA (DRM 2.50.0 / 5.17.2, LLVM 13.0.1)
[ 50.124] (II) RADEON(0): glamor detected, initialising EGL layer.
[ 50.124] (II) RADEON(0): KMS Color Tiling: enabled
[ 50.124] (II) RADEON(0): KMS Color Tiling 2D: enabled
[ 50.124] (==) RADEON(0): TearFree property default: auto
[ 50.124] (II) RADEON(0): KMS Pageflipping: enabled
[ 50.126] (II) RADEON(0): Output HDMI-0 using monitor section DVI-0
[ 50.167] (II) RADEON(0): Output VGA-0 using monitor section VGA-0
[ 50.167] (**) RADEON(0): Option "DefaultModes" "false"
[ 50.198] (II) RADEON(0): Output DVI-0 using monitor section DVI-0
[ 50.200] (II) RADEON(0): EDID for output HDMI-0
[ 50.241] (II) RADEON(0): EDID for output VGA-0
[ 50.273] (II) RADEON(0): EDID for output DVI-0
[ 50.273] (II) RADEON(0): Manufacturer: DEL Model: 407e Serial#: 1096111955
[ 50.273] (II) RADEON(0): Year: 2014 Week: 21
[ 50.273] (II) RADEON(0): EDID Version: 1.3
[ 50.273] (II) RADEON(0): Digital Display Input
[ 50.273] (II) RADEON(0): Max Image Size [cm]: horiz.: 60 vert.: 34
[ 50.273] (II) RADEON(0): Gamma: 2.20
[ 50.273] (II) RADEON(0): DPMS capabilities: StandBy Suspend Off
[ 50.273] (II) RADEON(0): Supported color encodings: RGB 4:4:4 YCrCb 4:4:4
[ 50.273] (II) RADEON(0): First detailed timing is preferred mode
[...]
[ 50.274] (II) RADEON(0): [DRI2] Setup complete
[ 50.274] (II) RADEON(0): [DRI2] DRI driver: r600
[ 50.274] (II) RADEON(0): [DRI2] VDPAU driver: r600
[ 50.274] (II) RADEON(0): Front buffer size: 14400K
[ 50.274] (II) RADEON(0): VRAM usage limit set to 206402K
[ 50.311] (II) RADEON(0): SYNC extension fences enabled
[ 50.311] (II) RADEON(0): Present extension enabled
[ 50.311] (==) RADEON(0): DRI3 enabled
[ 50.311] (==) RADEON(0): Backing store disabled
[ 50.311] (II) RADEON(0): Direct rendering enabled
[ 50.570] (II) RADEON(0): Use GLAMOR acceleration.
[ 50.570] (II) RADEON(0): Acceleration enabled
[ 50.570] (**) RADEON(0): DPMS enabled
[ 50.570] (==) RADEON(0): Silken mouse enabled
[ 50.570] (II) RADEON(0): Set up textured video (glamor)
[ 50.570] (II) RADEON(0): [XvMC] Associated with GLAMOR Textured Video.
[ 50.570] (II) RADEON(0): [XvMC] Extension initialized.
[ 50.583] (WW) RADEON(0): Option "AccelDFS" is not used
[ 50.583] (II) Initializing extension Generic Event Extension
[ 50.583] (II) Initializing extension SHAPE
[ 50.583] (II) Initializing extension MIT-SHM
[ 50.583] (II) Initializing extension XInputExtension
[ 50.608] (II) Initializing extension XTEST
[ 50.608] (II) Initializing extension BIG-REQUESTS
[ 50.608] (II) Initializing extension SYNC
[ 50.608] (II) Initializing extension XKEYBOARD
[ 50.608] (II) Initializing extension XC-MISC
[ 50.608] (II) Initializing extension XFIXES
[ 50.608] (II) Initializing extension RENDER
[ 50.608] (II) Initializing extension RANDR
[ 50.608] (II) Initializing extension DAMAGE
[ 50.608] (II) Initializing extension MIT-SCREEN-SAVER
[ 50.608] (II) Initializing extension DOUBLE-BUFFER
[ 50.608] (II) Initializing extension RECORD
[ 50.608] (II) Initializing extension DPMS
[ 50.608] (II) Initializing extension Present
[ 50.608] (II) Initializing extension DRI3
[ 50.608] (II) Initializing extension X-Resource
[ 50.608] (II) Initializing extension XVideo
[ 50.608] (II) Initializing extension XVideo-MotionCompensation
[ 50.608] (II) Initializing extension GLX
[ 50.618] (II) AIGLX: Loaded and initialized r600
[ 50.618] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 50.618] (II) Initializing extension XFree86-VidModeExtension
[ 50.618] (II) Initializing extension XFree86-DGA
[ 50.618] (II) Initializing extension XFree86-DRI
[ 50.618] (II) Initializing extension DRI2
[ 50.618] (II) RADEON(0): Setting screen physical size to 596 x 334
Edited by Petr Pisar