All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/9] drm/i915: Use intel_attached_encoder()
Date: Mon, 9 Dec 2019 17:52:53 +0200	[thread overview]
Message-ID: <20191209155253.GT1208@intel.com> (raw)
In-Reply-To: <20191205105937.GD25793@intel.com>

On Thu, Dec 05, 2019 at 04:29:37PM +0530, Ramalingam C wrote:
> On 2019-12-04 at 20:05:45 +0200, Ville Syrjala wrote:
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > index af7f6d670e07..1a7d69843c12 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > @@ -503,9 +503,9 @@ static const struct drm_encoder_funcs intel_dp_mst_enc_funcs = {
> >  
> >  static bool intel_dp_mst_get_hw_state(struct intel_connector *connector)
> >  {
> > -	if (connector->encoder && connector->base.state->crtc) {
> > +	if (intel_attached_encoder(connector) && connector->base.state->crtc) {
> >  		enum pipe pipe;
> > -		if (!connector->encoder->get_hw_state(connector->encoder, &pipe))
> > +		if (!intel_attached_encoder(connector)->get_hw_state(intel_attached_encoder(connector), &pipe))
> Do we prefer this way or with local var for attached encoder restricting
> line to 80char?

Can't be bothered too much about this half baked code. One day we
need to write a proper implementation of this.

> >  			return false;
> >  		return true;
> >  	}
> > diff --git a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
> > index c87838843d0b..ac3eff26df12 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
> > @@ -45,7 +45,7 @@
> >  
> >  static u32 dcs_get_backlight(struct intel_connector *connector)
> >  {
> > -	struct intel_encoder *encoder = connector->encoder;
> > +	struct intel_encoder *encoder = intel_attached_encoder(connector);
> >  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> >  	struct mipi_dsi_device *dsi_device;
> >  	u8 data = 0;
> > @@ -160,7 +160,7 @@ int intel_dsi_dcs_init_backlight_funcs(struct intel_connector *intel_connector)
> >  {
> >  	struct drm_device *dev = intel_connector->base.dev;
> >  	struct drm_i915_private *dev_priv = to_i915(dev);
> > -	struct intel_encoder *encoder = intel_connector->encoder;
> > +	struct intel_encoder *encoder = intel_attached_encoder(intel_connector);
> s/intel_connector/connector ?
> >  	struct intel_panel *panel = &intel_connector->panel;
> >  
> >  	if (dev_priv->vbt.backlight.type != INTEL_BACKLIGHT_DSI_DCS)
> > diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> > index 0fdbd39f6641..2859230671ae 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> > @@ -1527,7 +1527,7 @@ static int hdcp2_enable_encryption(struct intel_connector *connector)
> >  	struct intel_digital_port *intel_dig_port = conn_to_dig_port(connector);
> >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> >  	struct intel_hdcp *hdcp = &connector->hdcp;
> > -	enum port port = connector->encoder->port;
> > +	enum port port = intel_attached_encoder(connector)->port;
> >  	enum transcoder cpu_transcoder = hdcp->cpu_transcoder;
> >  	int ret;
> >  
> > @@ -1565,7 +1565,7 @@ static int hdcp2_disable_encryption(struct intel_connector *connector)
> >  	struct intel_digital_port *intel_dig_port = conn_to_dig_port(connector);
> >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> >  	struct intel_hdcp *hdcp = &connector->hdcp;
> > -	enum port port = connector->encoder->port;
> > +	enum port port = intel_attached_encoder(connector)->port;
> >  	enum transcoder cpu_transcoder = hdcp->cpu_transcoder;
> >  	int ret;
> >  
> > @@ -1676,7 +1676,7 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
> >  	struct intel_digital_port *intel_dig_port = conn_to_dig_port(connector);
> >  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> >  	struct intel_hdcp *hdcp = &connector->hdcp;
> > -	enum port port = connector->encoder->port;
> > +	enum port port = intel_attached_encoder(connector)->port;
> >  	enum transcoder cpu_transcoder;
> >  	int ret = 0;
> >  
> > @@ -1830,7 +1830,7 @@ static inline int initialize_hdcp_port_data(struct intel_connector *connector,
> >  
> >  	if (INTEL_GEN(dev_priv) < 12)
> >  		data->fw_ddi =
> > -			intel_get_mei_fw_ddi_index(connector->encoder->port);
> > +			intel_get_mei_fw_ddi_index(intel_attached_encoder(connector)->port);
> could we wrap at 80char with var encoder?

Not in a cocci patch.

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

  parent reply	other threads:[~2019-12-09 15:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 18:05 [Intel-gfx] [PATCH 0/9] drm/i915: Cleanups around intel_attached_encoder() & co Ville Syrjala
2019-12-04 18:05 ` [Intel-gfx] [PATCH 1/9] drm/i915/hdcp: Nuke intel_hdcp_transcoder_config() Ville Syrjala
2019-12-05  9:33   ` Ramalingam C
2019-12-04 18:05 ` [Intel-gfx] [PATCH 2/9] drm/i915: Pass intel_connector to intel_attached_*() Ville Syrjala
2020-01-09  7:28   ` Kahola, Mika
2019-12-04 18:05 ` [Intel-gfx] [PATCH 3/9] drm/i915: Pass intel_encoder to enc_to_*() Ville Syrjala
2019-12-18 20:41   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 4/9] drm/i915: Use the passed in encoder Ville Syrjala
2019-12-05 10:24   ` Ramalingam C
2019-12-04 18:05 ` [Intel-gfx] [PATCH 5/9] drm/i915: Use intel_attached_encoder() Ville Syrjala
2019-12-05 10:59   ` Ramalingam C
2019-12-05 11:04     ` Ramalingam C
2019-12-09 15:52     ` Ville Syrjälä [this message]
2020-01-21 15:49   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 6/9] drm/i915: Relocate intel_attached_dp() Ville Syrjala
2020-01-13 13:53   ` Kahola, Mika
2019-12-04 18:05 ` [Intel-gfx] [PATCH 7/9] drm/i915: Use intel_attached_dp() instead of hand rolling it Ville Syrjala
2020-01-21 14:46   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 8/9] drm/i915: Rename conn_to_dig_port() to intel_attached_dig_port() Ville Syrjala
2020-01-21 14:46   ` Juha-Pekka Heikkila
2019-12-04 18:05 ` [Intel-gfx] [PATCH 9/9] drm/i915/hdcp: Clean up local variables Ville Syrjala
2019-12-05 10:22   ` Ramalingam C
2019-12-04 23:48 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Cleanups around intel_attached_encoder() & co Patchwork
2019-12-05  0:15 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2019-12-05 11:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Cleanups around intel_attached_encoder() & co. (rev2) Patchwork
2019-12-05 12:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-05 15:06 ` [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=20191209155253.GT1208@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ramalingam.c@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.