intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/psr: Remove few mod parameters option.
Date: Thu, 12 Jul 2018 00:09:01 -0700	[thread overview]
Message-ID: <1531379341.7606.40.camel@intel.com> (raw)
In-Reply-To: <20180712061710.GF8281@intel.com>

On Wed, 2018-07-11 at 23:17 -0700, Rodrigo Vivi wrote:
> On Wed, Jul 11, 2018 at 11:08:17PM -0700, Dhinakaran Pandiyan wrote:
> > 
> > On Wed, 2018-07-11 at 22:27 -0700, Rodrigo Vivi wrote:
> > > 
> > > Reduce the module parameter to enable or disable.
> > > 
> > > The link stand by vs full link off was used only once.
> > > 
> > > And it was actually masking another bug fixed by commit
> > > '84bb2916a683 ("drm/i915/psr: Check for SET_POWER_CAPABLE
> > > bit at PSR init time.")'
> > > 
> > > So, let's remove these options for now. End goal is to
> > > fully remove the mod param, moving it to a debugfs
> > > interface in upcoming patches.
> > Sounds like a good idea, but I have not had use for this module
> > parameter anyway. 
> > > 
> > > 
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Thanks
> 
> > 
> > 
> > What do you think of using enable_psr=1 to force PSR1 and
> > enable_psr=2
> > to force PSR2 on PSR2 capable panels?
> dam... you are messing up with my next patch that I
> have here hehehe
> 
> my idea here is from the regular path we call intel_psr_enable
> that would check platform defaults and vbt and call
> _intel_psr_enable
> 
> and for debugfs I was creating a toggle function
> 1 - enable
> 0 - disable
> 
> and change _intel_psr_enable to check crtc active.
> 
> If we add psr2 selection to the picture now I have to think
> better ideas on how to handle this flow...
> 
> ------
> 
> hmmm
> 
> maybe change intel_psr_enable signature to receive the type
> 
> enum psr_type
> {
> DEFAULT = 0,
> PSR = 1,
> PSR2 = 2,
> };
> 
Yeah, but I prefer the same mapping as module params - 0 for disable.

Maarten(CC'd) had a patch that did something similar (https://patchwork
.freedesktop.org/patch/210792/). My concern at that time (and now too)
was that our tests were broken and we shouldn't be adding more
complexity to the driver. Having said that, I understand that toggling
PSR via debugfs is something we need to do.


-DK


> so on regular path we would call
> intel_psr_enable(..., DEFAULT);
> 
> on debugfs
> intel_psr_enable(..., val);
> 
> ?!
> 
> Better and/or cleaner ideas?
> 
> Thanks,
> Rodrigo.
> 
> > 
> > 
> > > 
> > > Cc: Tarun Vyas <tarun.vyas@intel.com>
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/i915_params.c |  2 +-
> > >  drivers/gpu/drm/i915/intel_psr.c   | 10 ----------
> > >  2 files changed, 1 insertion(+), 11 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_params.c
> > > b/drivers/gpu/drm/i915/i915_params.c
> > > index 49fcc4679db6..817576701ed7 100644
> > > --- a/drivers/gpu/drm/i915/i915_params.c
> > > +++ b/drivers/gpu/drm/i915/i915_params.c
> > > @@ -92,7 +92,7 @@ i915_param_named_unsafe(enable_ppgtt, int,
> > > 0400,
> > >  
> > >  i915_param_named_unsafe(enable_psr, int, 0600,
> > >  	"Enable PSR "
> > > -	"(0=disabled, 1=enabled - link mode chosen per-platform,
> > > 2=force link-standby mode, 3=force link-off mode) "
> > > +	"(0=disabled, 1=enabled) "
> > >  	"Default: -1 (use per-chip default)");
> > >  
> > >  i915_param_named_unsafe(alpha_support, bool, 0400,
> > > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > > b/drivers/gpu/drm/i915/intel_psr.c
> > > index 23acc9ac8d4d..ea467e2798e2 100644
> > > --- a/drivers/gpu/drm/i915/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > > @@ -966,16 +966,6 @@ void intel_psr_init(struct drm_i915_private
> > > *dev_priv)
> > >  		/* For new platforms let's respect VBT back
> > > again */
> > >  		dev_priv->psr.link_standby = dev_priv-
> > > > 
> > > > vbt.psr.full_link;
> > >  
> > > -	/* Override link_standby x link_off defaults */
> > > -	if (i915_modparams.enable_psr == 2 && !dev_priv-
> > > > 
> > > > psr.link_standby) {
> > > -		DRM_DEBUG_KMS("PSR: Forcing link standby\n");
> > > -		dev_priv->psr.link_standby = true;
> > > -	}
> > > -	if (i915_modparams.enable_psr == 3 && dev_priv-
> > > > 
> > > > psr.link_standby) {
> > > -		DRM_DEBUG_KMS("PSR: Forcing main link off\n");
> > > -		dev_priv->psr.link_standby = false;
> > > -	}
> > > -
> > >  	INIT_WORK(&dev_priv->psr.work, intel_psr_work);
> > >  	mutex_init(&dev_priv->psr.lock);
> > >  }
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-07-12  6:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12  5:27 [PATCH] drm/i915/psr: Remove few mod parameters option Rodrigo Vivi
2018-07-12  6:05 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-07-12  6:08 ` [PATCH] " Dhinakaran Pandiyan
2018-07-12  6:17   ` Rodrigo Vivi
2018-07-12  7:09     ` Dhinakaran Pandiyan [this message]
2018-07-12  7:08       ` Rodrigo Vivi
2018-07-13  6:40   ` Rodrigo Vivi

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=1531379341.7606.40.camel@intel.com \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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).