* [PATCH] i915: Fix HBLANK Expansion Quirk Causing Modeset Failure on Dell WD19TB Dock at 3440x1440@100Hz
@ 2024-09-26 0:25 Benjamin Hoefs
2024-09-26 11:37 ` Imre Deak
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Hoefs @ 2024-09-26 0:25 UTC (permalink / raw)
To: jani.nikula
Cc: rodrigo.vivi, joonas.lahtinen, tursulin, airlied, simona,
intel-gfx, intel-xe, dri-devel, linux-kernel, Benjamin Hoefs
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@100Hz 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@gmail.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;
return true;
--
2.46.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] i915: Fix HBLANK Expansion Quirk Causing Modeset Failure on Dell WD19TB Dock at 3440x1440@100Hz
2024-09-26 0:25 [PATCH] i915: Fix HBLANK Expansion Quirk Causing Modeset Failure on Dell WD19TB Dock at 3440x1440@100Hz Benjamin Hoefs
@ 2024-09-26 11:37 ` Imre Deak
0 siblings, 0 replies; 2+ messages in thread
From: Imre Deak @ 2024-09-26 11:37 UTC (permalink / raw)
To: Benjamin Hoefs
Cc: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin, airlied,
simona, intel-gfx, intel-xe, dri-devel, linux-kernel
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@100Hz 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@gmail.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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-26 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-26 0:25 [PATCH] i915: Fix HBLANK Expansion Quirk Causing Modeset Failure on Dell WD19TB Dock at 3440x1440@100Hz Benjamin Hoefs
2024-09-26 11:37 ` Imre Deak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®