[PATCH xserver v2] xfree86: Refine drm modes on continuous freq panel

Adam Jackson ajax at nwnk.net
Tue Apr 14 20:01:40 UTC 2020


On Tue, 2020-04-14 at 17:28 +0800, Aaron Ma wrote:
> EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display.

There's a lot that's weird about this patch but:

> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 8e6b697c4..031e5efea 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -2459,7 +2459,7 @@ drmmode_output_add_gtf_modes(xf86OutputPtr output, DisplayModePtr Modes)
>      int max_x = 0, max_y = 0;
>      float max_vrefresh = 0.0;
>  
> -    if (mon && GTF_SUPPORTED(mon->features.msc))
> +    if (mon && gtf_supported(output->scrn->scrnIndex, mon))
>          return Modes;
>  
>      if (!has_panel_fitter(output))

This, to me, is the weirdest bit. If the monitor does support GTF
modes, then don't add them? I think you might be able to replace this
whole patch by changing just this one line thus:

-    if (mon && GTF_SUPPORTED(mon->features.msc))
+    if (mon && !GTF_SUPPORTED(mon->features.msc))

- ajax



More information about the xorg-devel mailing list