All of lore.kernel.org
 help / color / mirror / Atom feed
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 04/11] drm/i915: Nuke intel_drrs_init()
Date: Thu, 31 Mar 2022 16:25:34 +0300	[thread overview]
Message-ID: <87a6d69ru9.fsf@intel.com> (raw)
In-Reply-To: <20220331112822.11462-5-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>
>
> intel_drrs_init() is a mostly pointless wrapper around
> intel_panel_add_edid_downclock_mode(), get rid of it.
>
> The only really useful thing left in there is the debug
> print regarding the DRRS type supported by the connector.
> Let's just move that into intel_panel_init().
>
> 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_dp.c    |  2 +-
>  drivers/gpu/drm/i915/display/intel_drrs.c  | 24 ----------------------
>  drivers/gpu/drm/i915/display/intel_drrs.h  |  1 -
>  drivers/gpu/drm/i915/display/intel_panel.c |  6 ++++++
>  4 files changed, 7 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 67472555211d..e539bc315d7b 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5075,7 +5075,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>  	intel_panel_add_edid_fixed_mode(intel_connector);
>  	if (intel_panel_preferred_fixed_mode(intel_connector) &&
>  	    intel_edp_has_drrs(intel_dp))
> -		intel_drrs_init(intel_connector);
> +		intel_panel_add_edid_downclock_mode(intel_connector);
>  
>  	/* MSO requires information from the EDID */
>  	intel_edp_mso_init(intel_dp);
> diff --git a/drivers/gpu/drm/i915/display/intel_drrs.c b/drivers/gpu/drm/i915/display/intel_drrs.c
> index 8fd280c7c83f..3ebea697f77a 100644
> --- a/drivers/gpu/drm/i915/display/intel_drrs.c
> +++ b/drivers/gpu/drm/i915/display/intel_drrs.c
> @@ -354,27 +354,3 @@ void intel_crtc_drrs_init(struct intel_crtc *crtc)
>  	mutex_init(&crtc->drrs.mutex);
>  	crtc->drrs.cpu_transcoder = INVALID_TRANSCODER;
>  }
> -
> -/**
> - * intel_drrs_init - Init DRRS for eDP connector
> - * @connector: eDP connector
> - *
> - * This function is called only once at driver load to initialize
> - * DRRS support for the connector.
> - *
> - * Returns:
> - * Downclock mode if panel supports it, else return NULL.
> - * DRRS support is determined by the presence of downclock mode (apart
> - * from VBT setting).
> - */
> -void intel_drrs_init(struct intel_connector *connector)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> -
> -	intel_panel_add_edid_downclock_mode(connector);
> -
> -	drm_dbg_kms(&dev_priv->drm,
> -		    "[CONNECTOR:%d:%s] DRRS type: %s\n",
> -		    connector->base.base.id, connector->base.name,
> -		    intel_drrs_type_str(dev_priv->vbt.drrs_type));
> -}
> diff --git a/drivers/gpu/drm/i915/display/intel_drrs.h b/drivers/gpu/drm/i915/display/intel_drrs.h
> index 3ea52220cd69..084c3f4f8403 100644
> --- a/drivers/gpu/drm/i915/display/intel_drrs.h
> +++ b/drivers/gpu/drm/i915/display/intel_drrs.h
> @@ -27,6 +27,5 @@ void intel_drrs_compute_config(struct intel_connector *connector,
>  			       struct intel_crtc_state *pipe_config,
>  			       int output_bpp, bool constant_n);
>  void intel_crtc_drrs_init(struct intel_crtc *crtc);
> -void intel_drrs_init(struct intel_connector *connector);
>  
>  #endif /* __INTEL_DRRS_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 1e56ca9033e0..5ecc6fc80588 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -35,6 +35,7 @@
>  #include "intel_connector.h"
>  #include "intel_de.h"
>  #include "intel_display_types.h"
> +#include "intel_drrs.h"
>  #include "intel_panel.h"
>  
>  bool intel_panel_use_ssc(struct drm_i915_private *i915)
> @@ -634,6 +635,11 @@ int intel_panel_init(struct intel_connector *connector)
>  
>  	intel_backlight_init_funcs(panel);
>  
> +	drm_dbg_kms(connector->base.dev,
> +		    "[CONNECTOR:%d:%s] DRRS type: %s\n",
> +		    connector->base.base.id, connector->base.name,
> +		    intel_drrs_type_str(intel_panel_drrs_type(connector)));
> +
>  	return 0;
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-03-31 13:25 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 [this message]
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
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=87a6d69ru9.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.