intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Sharma, Shashank" <shashank.sharma@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915/lspcon: Add dp_to_lspcon helper()
Date: Tue, 22 Nov 2016 12:25:09 +0200	[thread overview]
Message-ID: <1479810309.1394.10.camel@intel.com> (raw)
In-Reply-To: <b86cba5b-60b6-d81e-a1e6-3c28a196faf8@intel.com>

On ti, 2016-11-22 at 15:49 +0530, Sharma, Shashank wrote:
> Regards
> 
> Shashank
> 
> 
> On 11/22/2016 12:45 AM, Imre Deak wrote:
> > We need to get to LSPCON in the next patch, so factor out the helper for
> > it. While at it also remove the redundant GEN9 check.
> > 
> > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_dp.c  | 7 +++----
> >   drivers/gpu/drm/i915/intel_drv.h | 6 ++++++
> >   2 files changed, 9 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 90283ed..16c19d78 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -4753,14 +4753,13 @@ static void intel_edp_panel_vdd_sanitize(struct intel_dp *intel_dp)
> >   void intel_dp_encoder_reset(struct drm_encoder *encoder)
> >   {
> >   	struct drm_i915_private *dev_priv = to_i915(encoder->dev);
> > -	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
> > -	struct intel_lspcon *lspcon = &intel_dig_port->lspcon;
> > -	struct intel_dp *intel_dp = &intel_dig_port->dp;
> > +	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> > +	struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp);
> >   
> >   	if (!HAS_DDI(dev_priv))
> >   		intel_dp->DP = I915_READ(intel_dp->output_reg);
> >   
> > -	if (IS_GEN9(dev_priv) && lspcon->active)
> > +	if (lspcon->active)
> Shouldn't this be part of next patch itself ? Any reason why we have a 
> separate patch for this ?

Having separate patches for cleanups without side effects makes the
review and bisection easier.

> Apart from this,
> Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
> 
> Regards
> Shashank
> >   		lspcon_resume(lspcon);
> >   
> >   	if (to_intel_encoder(encoder)->type != INTEL_OUTPUT_EDP)
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> > index cd132c2..cf47e8a 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -1089,6 +1089,12 @@ dp_to_dig_port(struct intel_dp *intel_dp)
> >   	return container_of(intel_dp, struct intel_digital_port, dp);
> >   }
> >   
> > +static inline struct intel_lspcon *
> > +dp_to_lspcon(struct intel_dp *intel_dp)
> > +{
> > +	return &dp_to_dig_port(intel_dp)->lspcon;
> > +}
> > +
> >   static inline struct intel_digital_port *
> >   hdmi_to_dig_port(struct intel_hdmi *intel_hdmi)
> >   {
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-22 10:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 19:15 [PATCH 0/4] drm/i915/lspcon: Fix ParadTech PS175 adaptor detection Imre Deak
2016-11-21 19:15 ` [PATCH 1/4] drm/i915/lspcon: Ensure AUX CH is awake while in DP Sleep state Imre Deak
2016-11-22 10:13   ` Sharma, Shashank
2016-11-21 19:15 ` [PATCH 2/4] drm/i915/lspcon: Add dp_to_lspcon helper() Imre Deak
2016-11-22 10:19   ` Sharma, Shashank
2016-11-22 10:25     ` Imre Deak [this message]
2016-11-21 19:15 ` [PATCH 3/4] drm/i915/lspcon: Wait for expected LSPCON mode to settle Imre Deak
2016-11-22 15:36   ` Sharma, Shashank
2016-11-22 16:17     ` Imre Deak
2016-11-23  5:01       ` Sharma, Shashank
2016-11-21 19:15 ` [PATCH 4/4] drm/i915/lspcon: Remove unused force change mode parameter Imre Deak
2016-11-22 15:39   ` Sharma, Shashank
2016-11-22 16:26     ` Imre Deak
2016-11-21 19:45 ` ✓ Fi.CI.BAT: success for drm/i915/lspcon: Fix ParadTech PS175 adaptor detection Patchwork
2016-11-23 11:48   ` Imre Deak

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=1479810309.1394.10.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shashank.sharma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).