intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Cc: "Vetter, Daniel" <daniel.vetter@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Do not do link training fallback or prune modes for eDP
Date: Thu, 17 Aug 2017 12:42:59 -0700	[thread overview]
Message-ID: <20170817194259.GC26293@intel.com> (raw)
In-Reply-To: <1502999389.21478.65.camel@dk-H97M-D3H>

On Thu, Aug 17, 2017 at 12:28:56PM -0700, Pandiyan, Dhinakaran wrote:
> On Thu, 2017-08-17 at 12:29 -0700, Manasi Navare wrote:
> > On Thu, Aug 17, 2017 at 12:51:27PM +0300, Jani Nikula wrote:
> > > On Wed, 16 Aug 2017, Manasi Navare <manasi.d.navare@intel.com> wrote:
> > > > In case of eDP because the panel has a fixed mode we cannot
> > > > link train fallback and prune modes since this results in
> > > > no modes available for eDP connector.
> > > > Also since its a panel, link training should not fail dynamically
> > > > based on cable conditions like in  case of DP.
> > > >
> > > > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > > > Cc: Jim Bride <jim.bride@linux.intel.com>
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > > > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_dp.c               | 2 +-
> > > >  drivers/gpu/drm/i915/intel_dp_link_training.c | 3 ++-
> > > >  drivers/gpu/drm/i915/intel_drv.h              | 1 +
> > > >  3 files changed, 4 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > > > index 4fd4853..edac0c8 100644
> > > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > > @@ -109,7 +109,7 @@ static const int default_rates[] = { 162000, 270000, 540000 };
> > > >   * If a CPU or PCH DP output is attached to an eDP panel, this function
> > > >   * will return true, and false otherwise.
> > > >   */
> > > > -static bool is_edp(struct intel_dp *intel_dp)
> > > > +bool is_edp(struct intel_dp *intel_dp)
> > > 
> > > Make that intel_dp_is_edp when you expose it outside of intel_dp.c
> > > 
> > > BR,
> > > Jani
> > > 
> > 
> > Yea renaming it as intel_dp_is_edp() makes sense after making it a non static function.
> > So should I make a seperate patch for this change and changing the name at all places
> > that call is_edp() currently?
> > 
> > Regards
> > Manasi
> > 
> 
> Don't we already have a intel_dp_is_edp() that checks VBT? That'll need
> to be renamed if is_edp() is going to become intel_dp_is_edp() 
>

Yes just noticed we do have that intel_dp_is_edp().
But I agree that we need to add intel_dp prefix if we are going
to expose the is_edp() function.
Do you have any suggestions for the name?
 
> Btw I remember seeing Jim's psr patch making this function
> global(non-static?) too.
>

Yes I have looked at it and that patch is still in review, 
so this review comment applies to his patch as well.
So either he makes this change in his or it happens here.
I plan to add this comment to Jim's PSR patch review too.

Regards
Manasi
> 
> > > >  {
> > > >  	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> > > >  
> > > > diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c
> > > > index 05907fa..18ec61f 100644
> > > > --- a/drivers/gpu/drm/i915/intel_dp_link_training.c
> > > > +++ b/drivers/gpu/drm/i915/intel_dp_link_training.c
> > > > @@ -332,7 +332,8 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
> > > >  		      intel_connector->base.base.id,
> > > >  		      intel_connector->base.name,
> > > >  		      intel_dp->link_rate, intel_dp->lane_count);
> > > > -	if (!intel_dp_get_link_train_fallback_values(intel_dp,
> > > > +	/* Dont fallback and prune modes if its eDP */
> > > > +	if (!is_edp(intel_dp) && !intel_dp_get_link_train_fallback_values(intel_dp,
> > > >  						     intel_dp->link_rate,
> > > >  						     intel_dp->lane_count))
> > > >  		/* Schedule a Hotplug Uevent to userspace to start modeset */
> > > > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> > > > index fa47285..9800a15 100644
> > > > --- a/drivers/gpu/drm/i915/intel_drv.h
> > > > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > > > @@ -1548,6 +1548,7 @@ static inline unsigned int intel_dp_unused_lane_mask(int lane_count)
> > > >  }
> > > >  
> > > >  bool intel_dp_read_dpcd(struct intel_dp *intel_dp);
> > > > +bool is_edp(struct intel_dp *intel_dp);
> > > >  int intel_dp_link_required(int pixel_clock, int bpp);
> > > >  int intel_dp_max_data_rate(int max_link_clock, int max_lanes);
> > > >  bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
> > > 
> > > -- 
> > > Jani Nikula, Intel Open Source Technology Center
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2017-08-17 19:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  6:58 [PATCH] drm/i915: Do not do link training fallback or prune modes for eDP Manasi Navare
2017-08-17  7:01 ` Rodrigo Vivi
2017-08-17 19:46   ` Manasi Navare
2017-08-17 20:11     ` Pandiyan, Dhinakaran
2017-08-17 20:44       ` Rodrigo Vivi
2017-08-17 22:10         ` Manasi Navare
2017-08-18  4:00         ` Dhinakaran Pandiyan
2017-08-17 21:01       ` Manasi Navare
2017-08-17 21:16         ` Manasi Navare
2017-08-18  8:08     ` Daniel Vetter
2017-08-17  7:21 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-08-17  9:51 ` [PATCH] " Jani Nikula
2017-08-17 19:29   ` Manasi Navare
2017-08-17 19:28     ` Pandiyan, Dhinakaran
2017-08-17 19:42       ` Manasi Navare [this message]

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=20170817194259.GC26293@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=daniel.vetter@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 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).