From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Allow more varied alternate fixed modes for panels
Date: Wed, 31 Aug 2022 14:14:56 +0300 [thread overview]
Message-ID: <87wnaod5qn.fsf@intel.com> (raw)
In-Reply-To: <20220830212436.2021-1-ville.syrjala@linux.intel.com>
On Wed, 31 Aug 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> On some systems the panel reports alternate modes with
> different blanking periods. If the EDID reports them and VBT
> doesn't tell us otherwise then I can't really see why they
> should be rejected. So allow their use for the purposes of
> static DRRS.
>
> For seamless DRRS we still require a much more exact match
> of course. But that logic only kicks in when selecting the
> downclock mode (or in the future when determining whether
> we can do a seamless refresh rate change due to a user
> modeset).
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6374
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_panel.c | 25 ++++++----------------
> 1 file changed, 6 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 237a40623dd7..cb44984bb9a2 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -81,15 +81,14 @@ static bool is_alt_drrs_mode(const struct drm_display_mode *mode,
> mode->clock != preferred_mode->clock;
> }
>
> -static bool is_alt_vrr_mode(const struct drm_display_mode *mode,
> - const struct drm_display_mode *preferred_mode)
> +static bool is_alt_fixed_mode(const struct drm_display_mode *mode,
> + const struct drm_display_mode *preferred_mode)
> {
> return drm_mode_match(mode, preferred_mode,
> DRM_MODE_MATCH_FLAGS |
> DRM_MODE_MATCH_3D_FLAGS) &&
> mode->hdisplay == preferred_mode->hdisplay &&
> - mode->vdisplay == preferred_mode->vdisplay &&
> - mode->clock != preferred_mode->clock;
> + mode->vdisplay == preferred_mode->vdisplay;
> }
>
> const struct drm_display_mode *
> @@ -172,19 +171,7 @@ int intel_panel_compute_config(struct intel_connector *connector,
> return 0;
> }
>
> -static bool is_alt_fixed_mode(const struct drm_display_mode *mode,
> - const struct drm_display_mode *preferred_mode,
> - bool has_vrr)
> -{
> - /* is_alt_drrs_mode() is a subset of is_alt_vrr_mode() */
> - if (has_vrr)
> - return is_alt_vrr_mode(mode, preferred_mode);
> - else
> - return is_alt_drrs_mode(mode, preferred_mode);
> -}
> -
> -static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connector,
> - bool has_vrr)
> +static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connector)
> {
> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> const struct drm_display_mode *preferred_mode =
> @@ -192,7 +179,7 @@ static void intel_panel_add_edid_alt_fixed_modes(struct intel_connector *connect
> struct drm_display_mode *mode, *next;
>
> list_for_each_entry_safe(mode, next, &connector->base.probed_modes, head) {
> - if (!is_alt_fixed_mode(mode, preferred_mode, has_vrr))
> + if (!is_alt_fixed_mode(mode, preferred_mode))
> continue;
>
> drm_dbg_kms(&dev_priv->drm,
> @@ -255,7 +242,7 @@ void intel_panel_add_edid_fixed_modes(struct intel_connector *connector,
> {
> intel_panel_add_edid_preferred_mode(connector);
> if (intel_panel_preferred_fixed_mode(connector) && (has_drrs || has_vrr))
> - intel_panel_add_edid_alt_fixed_modes(connector, has_vrr);
> + intel_panel_add_edid_alt_fixed_modes(connector);
> intel_panel_destroy_probed_modes(connector);
> }
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-08-31 11:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 21:24 [Intel-gfx] [PATCH] drm/i915: Allow more varied alternate fixed modes for panels Ville Syrjala
2022-08-30 22:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-31 11:14 ` Jani Nikula [this message]
2022-08-31 16:36 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnaod5qn.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox