All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 5/6] drm/i915/dp: Kill intel_dp->detect_done flag
Date: Tue, 25 Sep 2018 20:53:20 +0300	[thread overview]
Message-ID: <20180925175320.GL9144@intel.com> (raw)
In-Reply-To: <20180924224528.4744-5-dhinakaran.pandiyan@intel.com>

On Mon, Sep 24, 2018 at 03:45:27PM -0700, Dhinakaran Pandiyan wrote:
> The intel_dp->detect_done flag is no more useful. Pull
> intel_dp_long_pulse() into the lone caller,
> 
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c  | 43 ++++++++------------------------
>  drivers/gpu/drm/i915/intel_drv.h |  1 -
>  2 files changed, 11 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 87a631098a6d..d6ea93e453a2 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5012,15 +5012,18 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
>  }
>  
>  static int
> -intel_dp_long_pulse(struct intel_connector *connector,
> -		    struct drm_modeset_acquire_ctx *ctx)
> +intel_dp_detect(struct drm_connector *connector,
> +		struct drm_modeset_acquire_ctx *ctx,
> +		bool force)
>  {
> -	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> -	struct intel_dp *intel_dp = intel_attached_dp(&connector->base);
> +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> +	struct intel_dp *intel_dp = intel_attached_dp(connector);
>  	struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
> -	enum drm_connector_status status;
> +	int status;

I guess we don't need this change anymore?

Series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Not sure if ci actually found some issue with the series, or
whether it was just having a bad day.

>  	u8 sink_irq_vector = 0;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> +		      connector->base.id, connector->name);
>  	WARN_ON(!drm_modeset_is_locked(&dev_priv->drm.mode_config.connection_mutex));
>  
>  	intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
> @@ -5096,9 +5099,9 @@ intel_dp_long_pulse(struct intel_connector *connector,
>  	intel_dp->aux.i2c_defer_count = 0;
>  
>  	intel_dp_set_edid(intel_dp);
> -	if (intel_dp_is_edp(intel_dp) || connector->detect_edid)
> +	if (intel_dp_is_edp(intel_dp) ||
> +	    to_intel_connector(connector)->detect_edid)
>  		status = connector_status_connected;
> -	intel_dp->detect_done = true;
>  
>  	/* Try to read the source of the interrupt */
>  	if (intel_dp->dpcd[DP_DPCD_REV] >= 0x11 &&
> @@ -5123,26 +5126,6 @@ intel_dp_long_pulse(struct intel_connector *connector,
>  	return status;
>  }
>  
> -static int
> -intel_dp_detect(struct drm_connector *connector,
> -		struct drm_modeset_acquire_ctx *ctx,
> -		bool force)
> -{
> -	struct intel_dp *intel_dp = intel_attached_dp(connector);
> -	int status = connector->status;
> -
> -	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> -		      connector->base.id, connector->name);
> -
> -	/* If full detect is not performed yet, do a full detect */
> -	if (!intel_dp->detect_done)
> -		status = intel_dp_long_pulse(intel_dp->attached_connector, ctx);
> -
> -	intel_dp->detect_done = false;
> -
> -	return status;
> -}
> -
>  static void
>  intel_dp_force(struct drm_connector *connector)
>  {
> @@ -5635,7 +5618,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
>  
>  	if (long_hpd) {
>  		intel_dp->reset_link_params = true;
> -		intel_dp->detect_done = false;
>  		return IRQ_NONE;
>  	}
>  
> @@ -5652,7 +5634,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
>  			intel_dp->is_mst = false;
>  			drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
>  							intel_dp->is_mst);
> -			intel_dp->detect_done = false;
>  			goto put_power;
>  		}
>  	}
> @@ -5665,10 +5646,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
>  		/* Short pulse can signify loss of hdcp authentication */
>  		intel_hdcp_check_link(intel_dp->attached_connector);
>  
> -		if (!handled) {
> -			intel_dp->detect_done = false;
> +		if (!handled)
>  			goto put_power;
> -		}
>  	}
>  
>  	ret = IRQ_HANDLED;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 8073a85d7178..a7c151c40e7d 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1070,7 +1070,6 @@ struct intel_dp {
>  	bool link_mst;
>  	bool link_trained;
>  	bool has_audio;
> -	bool detect_done;
>  	bool reset_link_params;
>  	enum aux_ch aux_ch;
>  	uint8_t dpcd[DP_RECEIVER_CAP_SIZE];
> -- 
> 2.17.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-09-25 17:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 22:45 [PATCH v2 1/6] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse() Dhinakaran Pandiyan
2018-09-24 22:45 ` [PATCH v2 2/6] drm/i915/dp: Restrict link retrain workaround to external monitors Dhinakaran Pandiyan
2018-10-01 19:49   ` Rodrigo Vivi
2018-10-01 22:00     ` Dhinakaran Pandiyan
2018-10-02  0:30     ` Dhinakaran Pandiyan
2018-10-23 11:56       ` Jani Nikula
2018-10-24 10:49         ` Joonas Lahtinen
2018-10-01 22:30   ` Lyude Paul
2018-09-24 22:45 ` [PATCH v2 3/6] drm/i915/dp: Use a local variable for intel_encoder * Dhinakaran Pandiyan
2018-09-25 20:51   ` Souza, Jose
2018-09-24 22:45 ` [PATCH v2 4/6] drm/i915/dp: Do not grab crtc modeset lock in intel_dp_detect() Dhinakaran Pandiyan
2018-09-25 20:58   ` Souza, Jose
2018-09-26  2:54   ` [PATCH v3 " Dhinakaran Pandiyan
2018-10-01 19:48     ` Rodrigo Vivi
2018-10-01 20:10       ` Ville Syrjälä
2018-10-01 22:01         ` Dhinakaran Pandiyan
2018-10-01 23:22           ` Rodrigo Vivi
2018-09-24 22:45 ` [PATCH v2 5/6] drm/i915/dp: Kill intel_dp->detect_done flag Dhinakaran Pandiyan
2018-09-25 17:53   ` Ville Syrjälä [this message]
2018-09-26  2:31     ` Dhinakaran Pandiyan
2018-09-24 22:45 ` [PATCH v2 6/6] drm/i915/dp: Fix duplication of DEVICE_SERVICE_IRQ handling Dhinakaran Pandiyan
2018-09-25 21:01   ` Souza, Jose
2018-09-24 23:47 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/6] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse() Patchwork
2018-09-25  0:08 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-09-25  6:33 ` Patchwork
2018-09-26  2:08 ` [PATCH v3 4/6] drm/i915/dp: Do not grab crtc modeset lock in intel_dp_detect() Dhinakaran Pandiyan
2018-09-26  3:18 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/6] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse() (rev2) Patchwork
2018-09-26  3:41 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-26  4:32 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-01 22:30 ` [PATCH v2 1/6] drm/i915/dp: Fix link retraining comment in intel_dp_long_pulse() Lyude Paul

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=20180925175320.GL9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.