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 v2 10/11] drm/i915: Allow static DRRS on all eDP ports
Date: Thu, 31 Mar 2022 16:57:10 +0300 [thread overview]
Message-ID: <87sfqy8bt5.fsf@intel.com> (raw)
In-Reply-To: <20220331112822.11462-11-ville.syrjala@linux.intel.com>
On Thu, 31 Mar 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Only seamless DRRS has specific hardware requirements so
> we can allow static DRRS on any eDP port.
>
> And we can replace these port checks and whatnot with
> a simple check to make sure the transcoder(s) we're
> about to use are capable of seamless DRRS.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
I don't know why it's so hard for me to map the conditions. It all looks
legit, but...
Let's say,
Acked-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 54 +++++++++----------------
> 1 file changed, 20 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index da1fd626c3fb..b0b4bdaf3b9d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1769,10 +1769,22 @@ intel_dp_compute_hdr_metadata_infoframe_sdp(struct intel_dp *intel_dp,
> intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GAMUT_METADATA);
> }
>
> +static bool cpu_transcoder_has_drrs(struct drm_i915_private *i915,
> + enum transcoder cpu_transcoder)
> +{
> + /* M1/N1 is double buffered */
> + if (DISPLAY_VER(i915) >= 9 || IS_BROADWELL(i915))
> + return true;
> +
> + return intel_cpu_transcoder_has_m2_n2(i915, cpu_transcoder);
> +}
> +
> static bool can_enable_drrs(struct intel_connector *connector,
> const struct intel_crtc_state *pipe_config,
> const struct drm_display_mode *downclock_mode)
> {
> + struct drm_i915_private *i915 = to_i915(connector->base.dev);
> +
> if (pipe_config->vrr.enable)
> return false;
>
> @@ -1785,6 +1797,13 @@ static bool can_enable_drrs(struct intel_connector *connector,
> if (pipe_config->has_psr)
> return false;
>
> + /* FIXME missing FDI M2/N2 etc. */
> + if (pipe_config->has_pch_encoder)
> + return false;
> +
> + if (!cpu_transcoder_has_drrs(i915, pipe_config->cpu_transcoder))
> + return false;
> +
> return downclock_mode &&
> intel_panel_drrs_type(connector) == DRRS_TYPE_SEAMLESS;
> }
> @@ -5029,39 +5048,6 @@ intel_edp_add_properties(struct intel_dp *intel_dp)
> fixed_mode->vdisplay);
> }
>
> -static bool
> -intel_edp_has_drrs(struct intel_dp *intel_dp)
> -{
> - struct intel_connector *connector = intel_dp->attached_connector;
> - struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
> - struct drm_i915_private *i915 = to_i915(connector->base.dev);
> -
> - if (DISPLAY_VER(i915) < 5) {
> - drm_dbg_kms(&i915->drm,
> - "[CONNECTOR:%d:%s] DRRS not supported on platform\n",
> - connector->base.base.id, connector->base.name);
> - return false;
> - }
> -
> - if ((DISPLAY_VER(i915) < 8 && !HAS_GMCH(i915)) &&
> - encoder->port != PORT_A) {
> - drm_dbg_kms(&i915->drm,
> - "[CONNECTOR:%d:%s] DRRS not supported on [ENCODER:%d:%s]\n",
> - connector->base.base.id, connector->base.name,
> - encoder->base.base.id, encoder->base.name);
> - return false;
> - }
> -
> - if (i915->vbt.drrs_type == DRRS_TYPE_NONE) {
> - drm_dbg_kms(&i915->drm,
> - "[CONNECTOR:%d:%s] DRRS not supported according to VBT\n",
> - connector->base.base.id, connector->base.name);
> - return false;
> - }
> -
> - return true;
> -}
> -
> static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> struct intel_connector *intel_connector)
> {
> @@ -5126,7 +5112,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> intel_connector->edid = edid;
>
> intel_panel_add_edid_fixed_modes(intel_connector,
> - intel_edp_has_drrs(intel_dp));
> + dev_priv->vbt.drrs_type != DRRS_TYPE_NONE);
>
> /* MSO requires information from the EDID */
> intel_edp_mso_init(intel_dp);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-03-31 13:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 11:28 [Intel-gfx] [PATCH v2 00/11] drm/i915: Finish off static DRRS Ville Syrjala
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 01/11] drm/i915: Extract intel_edp_has_drrs() Ville Syrjala
2022-04-04 12:24 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 02/11] drm/i915: Put fixed modes directly onto the panel's fixed_modes list Ville Syrjala
2022-03-31 13:04 ` Jani Nikula
2022-03-31 13:15 ` Jani Nikula
2022-03-31 13:16 ` Ville Syrjälä
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 03/11] drm/i915: Refactor non-EDID fixed mode duplication Ville Syrjala
2022-03-31 13:23 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 04/11] drm/i915: Nuke intel_drrs_init() Ville Syrjala
2022-03-31 13:25 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 05/11] drm/i915: Combine the EDID fixed_mode+downclock_mode lookup into one Ville Syrjala
2022-03-31 13:26 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 06/11] drm/i915: Stop duplicating the EDID fixed/downclock modes Ville Syrjala
2022-03-31 13:34 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 07/11] drm/i915: Allow an arbitrary number of downclock modes Ville Syrjala
2022-03-31 13:37 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 08/11] drm/i915: Allow higher refresh rate alternate fixed modes Ville Syrjala
2022-03-31 13:43 ` Jani Nikula
2022-03-31 16:55 ` Ville Syrjälä
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 09/11] drm/i915: Move intel_drrs_compute_config() into intel_dp.c Ville Syrjala
2022-03-31 13:46 ` Jani Nikula
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 10/11] drm/i915: Allow static DRRS on all eDP ports Ville Syrjala
2022-03-31 13:57 ` Jani Nikula [this message]
2022-03-31 11:28 ` [Intel-gfx] [PATCH v2 11/11] drm/i915: Allow static DRRS on LVDS Ville Syrjala
2022-03-31 13:59 ` Jani Nikula
2022-03-31 14:05 ` Ville Syrjälä
2022-04-01 15:09 ` Ville Syrjälä
2022-03-31 14:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Finish off static DRRS (rev2) Patchwork
2022-03-31 17:38 ` [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=87sfqy8bt5.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.