lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aK7AFbD7LWw_SiJh@xpredator>
Date: Wed, 27 Aug 2025 11:21:41 +0300
From: Marius Vlad <marius.vlad@...labora.com>
To: Shengyu Qu <wiagn233@...look.com>
Cc: alexander.deucher@....com, christian.koenig@....com, airlied@...il.com,
	simona@...ll.ch, harry.wentland@....com, sunpeng.li@....com,
	siqueira@...lia.com, maarten.lankhorst@...ux.intel.com,
	mripard@...nel.org, tzimmermann@...e.de, contact@...aelrc.com,
	lijo.lazar@....com, jesse.zhang@....com, tim.huang@....com,
	dark_sylinc@...oo.com.ar, mario.limonciello@....com,
	alex.hung@....com, aurabindo.pillai@....com, sunil.khatri@....com,
	chiahsuan.chung@....com, mwen@...lia.com, Roman.Li@....com,
	Wayne.Lin@....com, dominik.kaszewski@....com, alvin.lee2@....com,
	Aric.Cyr@....com, Austin.Zheng@....com, Sung.Lee@....com,
	PeiChen.Huang@....com, dillon.varone@....com,
	Richard.Chiang@....com, ryanseto@....com, linux@...blig.org,
	haoping.liu@....com, Relja.Vojvodic@....com, Yihan.Zhu@....com,
	Samson.Tam@....com, amd-gfx@...ts.freedesktop.org,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	wayland-devel@...ts.freedesktop.org
Subject: Re: [PATCH v2 0/2] Add "pixel_encoding" to switch between RGB & YUV
 color modes

Hello,
On Wed, Aug 27, 2025 at 12:26:56AM +0800, Shengyu Qu wrote:
> Hi Marius,
> 
> Thanks for reply.I have some questions:
> 
> 1.Can you send patch with only i915/amdgpu first? It's a long-needed feature
> to deal with some monitors/TVs with broken EDID.
I plan on doing that soon, but I don't have a date. I'm in between
holidays atm. Note that I just picked these changes from Andri a few
weeks ago.
> 
> 2.Is there any method to get the list of supported pixel format by current
> driver? Also maybe we need to take display port's maximum speed rate/target
> refresh rate/resolution into account.
Drivers should figure out that what pixel color formats it supports and
use the drm helpers (being added with the patchset) to advertise the
available pixel color formats.  For i915/amdgpu, for the time being, I
plan on just OR'ing the known ones working into a list.

User-space will use this information together with the one it is getting
from EDID to perform a intersection between them. 

"auto" will be the preferred driver choice from those advertised pixel
formats, but most likely (fallback) to RGB as all panels support that.

If EDID is broken it depends on user-space if it presents all the
advertised color formats from the driver. There isn't a way to discern
between panels that do not support YUV formats and panels that do support 
YUV formats but they don't expose that in the EDID.
> 
> Best regards,
> Shengyu
> 
> 在 2025/8/26 15:24, Marius Vlad 写道:
> > Hi,
> > 
> > Prior work towards this is/was: https://lore.kernel.org/dri-devel/20240115160554.720247-1-andri@yngvason.is/
> > 
> > I have slightly modified version of that, but still working on
> > getting another driver (besides amd/i915) working with it.
> > 
> > On Tue, Aug 26, 2025 at 02:39:59AM +0800, Shengyu Qu wrote:
> > > 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
> > > 
> 






Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ