dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add "pixel_encoding" to switch between RGB & YUV color modes
@ 2025-08-25 18:39 Shengyu Qu
  2025-08-26  7:24 ` Marius Vlad
  0 siblings, 1 reply; 12+ messages in thread
From: Shengyu Qu @ 2025-08-25 18:39 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, airlied, simona,
	harry.wentland, sunpeng.li, siqueira, maarten.lankhorst, mripard,
	tzimmermann, contact, lijo.lazar, jesse.zhang, tim.huang,
	dark_sylinc, mario.limonciello, alex.hung, aurabindo.pillai,
	sunil.khatri, chiahsuan.chung, mwen, Roman.Li, Wayne.Lin,
	dominik.kaszewski, alvin.lee2, Aric.Cyr, Austin.Zheng, Sung.Lee,
	PeiChen.Huang, dillon.varone, Richard.Chiang, ryanseto, linux,
	haoping.liu, Relja.Vojvodic, Yihan.Zhu, Samson.Tam, amd-gfx,
	dri-devel, linux-kernel, wayland-devel
  Cc: Shengyu Qu

Usage:
 - X11: xrandr --output <output name> --set "pixel encoding" <encoding>
 - Wayland: proptest -M amdgpu -D <card path> <connector ID> connector
   <pixel encoding ID> <encoding (ID)>
 - Kernel Param: amdgpu.pixel_encoding=<encoding>
   or amdgpu.pixel_encoding=<monitor>:<encoding>,<monitor>:<encoding>

Supported encodings are: "auto" (0) (Default and original behavior), "rgb"
(1), "ycbcr444" (2), "ycbcr422" (4), and "ycbcr420" (8).

This patch series allow users to switch between pixel encodings, which is
specially important when auto gets it wrong (probably because of monitor's
manufacturer mistake) and needs user intervention.

Changes since v1:
 - Some cleanup and rebase
 - Added YUV422 support

Full discussion:
https://gitlab.freedesktop.org/drm/amd/-/issues/476#note_2628536

Original patch by Yassine Imounachen, current version is modified based on
this patch(was rebased by Rafael Carvalho):
https://lists.freedesktop.org/archives/amd-gfx/2024-October/116195.html

Shengyu Qu (2):
  drm/connector: Add "pixel_encoding" to switch between RGB & YUV color
    output modes
  drm/amdgpu: Add "pixel_encoding" DRM connector property support for
    amdgpu

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |  36 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.h   |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h      |   2 +
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 273 +++++++++++++++++-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |   1 +
 drivers/gpu/drm/amd/display/dc/core/dc.c      |   8 +
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |   2 +
 drivers/gpu/drm/drm_modes.c                   |  32 ++
 include/drm/drm_connector.h                   |   7 +
 9 files changed, 353 insertions(+), 11 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-09-01 21:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 18:39 [PATCH v2 0/2] Add "pixel_encoding" to switch between RGB & YUV color modes Shengyu Qu
2025-08-26  7:24 ` Marius Vlad
2025-08-26 16:26   ` Shengyu Qu
2025-08-27  8:21     ` Marius Vlad
2025-08-27  9:41     ` Maxime Ripard
2025-08-27 10:39       ` Daniel Stone
2025-08-27 11:08         ` Sebastian Wick
2025-09-01 21:32           ` Sebastian Wick
2025-08-27 11:21         ` Maxime Ripard
2025-08-27 11:36           ` Daniel Stone
2025-08-27 11:40             ` Maxime Ripard
2025-08-27 15:36             ` Shengyu Qu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).