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: <ZvVHXbK2Swxpjehy@ideak-desk.fi.intel.com>
Date: Thu, 26 Sep 2024 14:37:01 +0300
From: Imre Deak <imre.deak@...el.com>
To: Benjamin Hoefs <bendhoefs@...il.com>
Cc: jani.nikula@...ux.intel.com, rodrigo.vivi@...el.com,
	joonas.lahtinen@...ux.intel.com, tursulin@...ulin.net,
	airlied@...il.com, simona@...ll.ch, intel-gfx@...ts.freedesktop.org,
	intel-xe@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i915: Fix HBLANK Expansion Quirk Causing Modeset Failure
 on Dell WD19TB Dock at 3440x1440@...Hz

On Wed, Sep 25, 2024 at 07:25:34PM -0500, Benjamin Hoefs wrote:
> Hello,
> 
> I am using a Dell WD19TB dock with a 3440x1440 monitor. Using it at
> 100Hz used to work but recently I tried it again and discovered it no longer
> did, specifically the modeset seems to silently fail with no error message in
> userspace utilities like kscreen-doctor and xrandr and no output in dmesg.
> I found the problematic commit using git bisect to be
> 55eaef164174480df6827edeac15620f3cbcd52b "Handle the Synaptics HBlank
> expansion quirk".
> 
> I found the issue to be the hblank_expasion_quirk_needs_dsc function which uses
> the following comparison in the current kernel tree:
> 
> if (mode_hblank_period_ns(adjusted_mode) > hblank_limit)
> 	return false;
> 
> with hblank_limit being earlier set as
> 
> int hblank_limit = is_uhbr_sink ? 500 : 300;
> 
> However, my monitor's HBLANK period in the 3440x1440@...Hz mode is
> exactly 300 ns as verified by this printk immediately before the
> problematic comparison.
> 
> printk(KERN_INFO "Hello, kernel world! %i\n",
> 	mode_hblank_period_ns(adjusted_mode));
> [   38.429839] Hello, kernel world! 300
> 
> With the attached change the modeset works as expected at 100Hz. Would it be
> acceptable to modify the comparison from > to >= here?
> 
> I'll do my best to provide any additional details you may need although
> that printk and '=' sign is the only kernel code I've written, so my best may
> not be great :).
> 
> Signed-off-by: Benjamin D. Hoefs <bendhoefs@...il.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 15541932b809..052c5a67df93 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -446,7 +446,7 @@ hblank_expansion_quirk_needs_dsc(const struct intel_connector *connector,
>  	if (is_uhbr_sink && !drm_dp_is_uhbr_rate(limits->max_rate))
>  		return false;
>  
> -	if (mode_hblank_period_ns(adjusted_mode) > hblank_limit)
> +	if (mode_hblank_period_ns(adjusted_mode) >= hblank_limit)
>  		return false;

Disabling DSC this way could make another mode with the same hblank
period not work. This mode would require DSC in any case if there is a
link BW limitation, so would need to check why DSC is failing. Could you
open a ticket at:

https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/new

attaching a dmesg log booting with drm.debug=0x15e?

Thanks,
Imre

>  
>  	return true;
> -- 
> 2.46.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ