[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251016001038.13611-2-iam@lach.pw>
Date: Thu, 16 Oct 2025 02:10:37 +0200
From: Yaroslav Bolyukin <iam@...h.pw>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>
Cc: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Rodrigo Siqueira <siqueira@...lia.com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
Wayne Lin <Wayne.Lin@....com>,
amd-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
Yaroslav Bolyukin <iam@...h.pw>
Subject: [PATCH v4 0/2] DisplayID DSC passthrough timing support
VESA DisplayID spec allows the device to force its DSC bits per pixel
value.
For example, the HTC Vive Pro 2 VR headset uses this value in
high-resolution modes (3680x1836@...120, 4896x2448@...120), and when the
kernel doesn't respect this parameter, garbage is displayed on the HMD
instead.
Me and other users have successfully tested the old (v3) version of this
patch (which was applying DSC BPP value unconditionally, thus incorrect:
https://lkml.org/lkml/2023/2/26/116) on Vive Pro 2 and
Bigscreen Beyond VR headsets, and have been using it daily, it is known
to work and doesn't seem to break anything else since 2022.
Previously, I didn't have enough dedication to get it merged, I hope
this time I will manage to get it to v6.19 :D
Regarding driver support - I have looked at amdgpu and Nvidia's
open-gpu-kernel-modules, and both seem to have some indication for this
value; however, in Linux, it is unused in both.
First patch implements parsing of DSC BPP values and display mode VII
timings flag which mandates that the DSC BPP value should actually be
used for this display mode.
The second patch implements handling of this value for AMDGPU driver.
The only thing that I don't like in the current implementation, is how
the value of `dsc_passthrough_timings_support` flag is propagated from
the connector display modes to the mode created in `DRM_IOCTL_MODE_SETCRTC`
handler (which is used for VR display initialization in Monado and
StreamVR), it feels like this flag should be initialized by the kernel
itself, but as far as I can see there is no correct way to do this, as
the timing constraints calculation belongs to the individual drivers.
Another problem with how this flag is set, is that there is no hard
connection between modes creaded in `SETCRTC` and the modes actually
defined by connector, so I implement an assumption that this flag should
be the same between choosen mode and the preferred display mode. Given
that previously due to the missing support for this flag displays
were only showing garbage, I believe this assumption won't break
anything.
Both of those downsides are due to the fact my understanding of DRM
subsystem is not that high. If another implementation would be proposed
by AMDGPU maintainers - I will gladly implement it here.
v3->v4:
* This patch now parses timings support flag on type VII block, instead
of applying it unconditionally. Previously I didn't understand the
spec properly.
* Now it also is not being applied for non-supported and/or non-VII
blocks in amdgpu driver.
Regards,
Lach
Yaroslav Bolyukin (2):
drm/edid: parse DRM VESA dsc bpp target
drm/amd: use fixed dsc bits-per-pixel from edid
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++-
drivers/gpu/drm/drm_displayid_internal.h | 8 +++
drivers/gpu/drm/drm_edid.c | 61 ++++++++++++-------
include/drm/drm_connector.h | 6 ++
include/drm/drm_modes.h | 10 +++
5 files changed, 77 insertions(+), 22 deletions(-)
--
2.51.0
Powered by blists - more mailing lists