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 v3 5/6] drm/i915: Tighten DRRS capability reporting
Date: Tue, 04 Oct 2022 11:59:18 +0300 [thread overview]
Message-ID: <875yh0ufq1.fsf@intel.com> (raw)
In-Reply-To: <20221003113249.16213-6-ville.syrjala@linux.intel.com>
On Mon, 03 Oct 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Only report DRRS capability for the connector if its fixed_modes
> list contains at least two modes capable of seamless DRRS switch
> between them.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Makes sense,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_panel.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 41cec9dc4223..d18c56cf957d 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -147,10 +147,25 @@ int intel_panel_get_modes(struct intel_connector *connector)
> return num_modes;
> }
>
> +static bool has_drrs_modes(struct intel_connector *connector)
> +{
> + const struct drm_display_mode *mode1;
> +
> + list_for_each_entry(mode1, &connector->panel.fixed_modes, head) {
> + const struct drm_display_mode *mode2 = mode1;
> +
> + list_for_each_entry_continue(mode2, &connector->panel.fixed_modes, head) {
> + if (is_alt_drrs_mode(mode1, mode2))
> + return true;
> + }
> + }
> +
> + return false;
> +}
> +
> enum drrs_type intel_panel_drrs_type(struct intel_connector *connector)
> {
> - if (list_empty(&connector->panel.fixed_modes) ||
> - list_is_singular(&connector->panel.fixed_modes))
> + if (!has_drrs_modes(connector))
> return DRRS_TYPE_NONE;
>
> return connector->panel.vbt.drrs_type;
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-10-04 8:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 11:32 [Intel-gfx] [PATCH v3 0/6] drm/i915: Per-crtc/connector DRRS debugfs Ville Syrjala
2022-10-03 11:32 ` [Intel-gfx] [PATCH v3 1/6] drm/i915: Move DRRS debugfs next to the implementation Ville Syrjala
2022-10-03 11:32 ` [Intel-gfx] [PATCH v3 2/6] drm/i915: Make the DRRS debugfs contents more consistent Ville Syrjala
2022-10-03 11:32 ` [Intel-gfx] [PATCH v3 3/6] drm/i915: Make DRRS debugfs per-crtc/connector Ville Syrjala
2022-10-03 11:32 ` [Intel-gfx] [PATCH v3 4/6] drm/i915: Fix locking in DRRS debugfs Ville Syrjala
2022-10-03 11:32 ` [Intel-gfx] [PATCH v3 5/6] drm/i915: Tighten DRRS capability reporting Ville Syrjala
2022-10-04 8:59 ` Jani Nikula [this message]
2022-10-03 11:32 ` [Intel-gfx] [PATCH v3 6/6] drm/i915: Setup final panel drrs_type already during init Ville Syrjala
2022-10-04 9:00 ` Jani Nikula
2022-10-03 12:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Per-crtc/connector DRRS debugfs (rev3) Patchwork
2022-10-03 13:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-03 15:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=875yh0ufq1.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