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] [day] [month] [year] [list]
Message-ID: <8734rdtrir.fsf@intel.com>
Date: Mon, 22 Apr 2024 17:13:00 +0300
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Michael Olbrich <m.olbrich@...gutronix.de>,
 dri-devel@...ts.freedesktop.org, David Airlie <airlied@...il.com>, Daniel
 Vetter <daniel@...ll.ch>, Maarten Lankhorst
 <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
 Thomas Zimmermann <tzimmermann@...e.de>, Ville Syrjälä
 <ville.syrjala@...ux.intel.com>, Rodrigo Vivi <rodrigo.vivi@...el.com>,
 Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>, Tvrtko Ursulin
 <tursulin@...ulin.net>, intel-gfx@...ts.freedesktop.org,
 intel-xe@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: graphics@...gutronix.de
Subject: Re: Reliably selecting non-CEA modes on Intel graphics (and maybe
 others)

On Mon, 22 Apr 2024, Michael Olbrich <m.olbrich@...gutronix.de> wrote:
> Hi,
>
> In short: I have a HDMI monitor attached to Intel graphics. I'm trying to
> set a non-CEA mode but the driver always maps it to the corresponding CEA
> mode.

Please file a bug as described at [1], and attach dmesg with debugs
enabled, so we can see what's going on and what kernel and hardware
you're using exactly, and so on.

BR,
Jani.



[1] https://drm.pages.freedesktop.org/intel-docs/how-to-file-i915-bugs.html


>
> More specifically, the monitor has two 1920x1080@60 modes in the EDID:
> 1. The CEA mode with VIC 16
> 2. A custom DTD mode with exactly the same timings (this is the preferred
>    mode).
>
> From a userspace perspective, the two modes are mostly identical, except
> for the 16:9 aspect ratio flag in the CEA mode and the preferred type in
> the other.
>
> I want to select the second (preferred) mode, but that does not seem
> possible:
> intel_hdmi_compute_avi_infoframe() tries to determine which VIC should be
> added to the avi infoframe and if limited or full range is used.
> It uses various DRM helpers here but in the end drm_match_cea_mode() is
> called. And here lies the problem:
> The mode provided by the userspace has explicitly no aspect ratio. But
> here, it is interpreted as "the aspect ration is undefined". So matching
> ignored the aspect ratio and the CEA mode with VIC 16 is found and limited
> range is used.
>
> The commit that introduces this fuzzy matching
> 357768cc9e3fdacf6551da0ae1483bc87dbcb4e8 ("drm/edid: Fix cea mode aspect
> ratio handling") made sense at the time. The capability
> DRM_CLIENT_CAP_ASPECT_RATIO that exposes aspect ratios to userspace was
> introduced later in the same merge request, from what I can tell
> 7595bda2fb4378ccbb8db1d0e8de56d15ea7f7fa ("drm: Add DRM client cap for
> aspect-ratio").
>
> Am I missing something here, or is it just not possible to select the
> non-CEA mode right now? In my specific example, the selected CEA mode is
> actually supported by the monitor, but as far as I can tell, the CEA mode
> is used even if the monitor does not support it at all.
>
> I've only tested this on Intel, but I assume that other drivers that use
> the same helpers have the same problem.
>
> So how can this be fixed? I've considered matching the aspect ratio based
> on the DRM_CLIENT_CAP_ASPECT_RATIO capability, but I'm not sure if that is
> valid. The documentation is limited and I found nothing that describes what
> the userspace should do here.
> Or would a new capability make sense here? Or something entirely different?
> I'm not sure how I should proceed here. Any help would be appreciated.
>
> Regards,
> Michael

-- 
Jani Nikula, Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ