All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 02/10] drm/i915: Eliminate some encoder->crtc usage from DSI code
Date: Thu, 9 Nov 2017 16:43:49 +0200	[thread overview]
Message-ID: <20171109144349.GR10981@intel.com> (raw)
In-Reply-To: <1510192591.8287.23.camel@dk-H97M-D3H>

On Thu, Nov 09, 2017 at 01:36:03AM +0000, Pandiyan, Dhinakaran wrote:
> 
> On Tue, 2017-10-31 at 22:51 +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Extract the current crtc from the crtc state rather than via
> > the legacy encoder->crtc pointer whenever possible.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dsi.c | 17 ++++++++---------
> >  1 file changed, 8 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> > index 2bff7ab25bf3..f09474b0c4d3 100644
> > --- a/drivers/gpu/drm/i915/intel_dsi.c
> > +++ b/drivers/gpu/drm/i915/intel_dsi.c
> > @@ -662,11 +662,11 @@ static void vlv_dsi_clear_device_ready(struct intel_encoder *encoder)
> >  	}
> >  }
> >  
> > -static void intel_dsi_port_enable(struct intel_encoder *encoder)
> > +static void intel_dsi_port_enable(struct intel_encoder *encoder,
> > +				  const struct intel_crtc_state *crtc_state)
> >  {
> > -	struct drm_device *dev = encoder->base.dev;
> > -	struct drm_i915_private *dev_priv = to_i915(dev);
> > -	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
> > +	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> > +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
> 
> 
> Hmm. the crtc v/s intel_crtc usage isn't consistent, perhaps another
> clean-up with coccinelle.

Yeah, theres' tons of that to be cleaned up all over the place. And
silimarly for intel_encoder vs. encoder. And we're even worse when it
comes to naming various atomic state objects.

> 
> 
> >  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
> >  	enum port port;
> >  
> > @@ -705,7 +705,7 @@ static void intel_dsi_port_enable(struct intel_encoder *encoder)
> >  			if (IS_BROXTON(dev_priv))
> >  				temp |= LANE_CONFIGURATION_DUAL_LINK_A;
> >  			else
> > -				temp |= intel_crtc->pipe ?
> > +				temp |= crtc->pipe ?
> >  					LANE_CONFIGURATION_DUAL_LINK_B :
> >  					LANE_CONFIGURATION_DUAL_LINK_A;
> >  		}
> > @@ -875,7 +875,7 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
> >  
> >  		intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
> >  
> > -		intel_dsi_port_enable(encoder);
> > +		intel_dsi_port_enable(encoder, pipe_config);
> >  	}
> >  
> >  	intel_panel_enable_backlight(pipe_config, conn_state);
> > @@ -1082,7 +1082,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
> >  	struct drm_display_mode *adjusted_mode =
> >  					&pipe_config->base.adjusted_mode;
> >  	struct drm_display_mode *adjusted_mode_sw;
> > -	struct intel_crtc *intel_crtc;
> > +	struct intel_crtc *crtc = to_intel_crtc(pipe_config->base.crtc);
> >  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
> >  	unsigned int lane_count = intel_dsi->lane_count;
> >  	unsigned int bpp, fmt;
> > @@ -1093,8 +1093,7 @@ static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
> >  				crtc_hblank_start_sw, crtc_hblank_end_sw;
> >  
> >  	/* FIXME: hw readout should not depend on SW state */
> > -	intel_crtc = to_intel_crtc(encoder->base.crtc);
> > -	adjusted_mode_sw = &intel_crtc->config->base.adjusted_mode;
> > +	adjusted_mode_sw = &crtc->config->base.adjusted_mode;
> >  
> >  	/*
> >  	 * Atleast one port is active as encoder->get_config called only if

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

  reply	other threads:[~2017-11-09 14:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 20:51 [PATCH 00/10] drm/i915: Nuke dig_port->port and assorted cleanups Ville Syrjala
2017-10-31 20:51 ` [PATCH 01/10] drm/i915: Eliminate some encoder->crtc usage from DP code Ville Syrjala
2017-11-09  1:35   ` Pandiyan, Dhinakaran
2017-11-09 14:36     ` Ville Syrjälä
2017-10-31 20:51 ` [PATCH 02/10] drm/i915: Eliminate some encoder->crtc usage from DSI code Ville Syrjala
2017-11-09  1:36   ` Pandiyan, Dhinakaran
2017-11-09 14:43     ` Ville Syrjälä [this message]
2017-10-31 20:51 ` [PATCH 03/10] drm/i915: Eliminate some encoder->crtc usage from SDVO code Ville Syrjala
2017-10-31 20:51 ` [PATCH 04/10] drm/i915: Eliminate some encoder->crtc usage from TV code Ville Syrjala
2017-10-31 20:51 ` [PATCH 05/10] drm/i915: Pass crtc state to DPIO PHY functions Ville Syrjala
2017-10-31 20:51 ` [PATCH 06/10] drm/i915: Eliminate crtc->config usage from CRT code Ville Syrjala
2017-10-31 20:51 ` [PATCH 07/10] drm/i915: Replace dig_port->port with encoder port for BXT DPLL selection Ville Syrjala
2017-10-31 20:51 ` [PATCH 08/10] drm/i915: Nuke intel_digital_port->port Ville Syrjala
2017-11-09  1:37   ` Pandiyan, Dhinakaran
2017-11-09 13:50     ` Ville Syrjälä
2017-11-09 15:24   ` [PATCH v2 " Ville Syrjala
2017-10-31 20:51 ` [PATCH 09/10] drm/i915: Clean up PPS code calling conventions Ville Syrjala
2017-10-31 20:51 ` [PATCH 10/10] drm/i915: Clean up DP code local variables and " Ville Syrjala
2017-11-09  3:01   ` Pandiyan, Dhinakaran
2017-11-09 15:27     ` Ville Syrjälä
2017-11-09 15:27   ` [PATCH v2 " Ville Syrjala
2017-10-31 22:31 ` ✗ Fi.CI.BAT: warning for drm/i915: Nuke dig_port->port and assorted cleanups Patchwork
2017-11-01  9:55 ` [PATCH 00/10] " Jani Nikula
2017-11-09  3:08   ` Pandiyan, Dhinakaran
2017-11-09 18:26     ` Ville Syrjälä
2017-11-09 16:01 ` ✓ Fi.CI.BAT: success for drm/i915: Nuke dig_port->port and assorted cleanups (rev3) Patchwork
2017-11-09 16:59 ` ✓ 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=20171109144349.GR10981@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.