diff mbox

[v2,2/2] i915/drrs/debugfs: crtc id and psr status

Message ID 1510080008-29513-1-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C Nov. 7, 2017, 6:40 p.m. UTC
From: "C, Ramalingam" <ramalingam.c@intel.com>

Existing debugfs entry i915_drrs_status is updated with crtc id and
if PSR is cause for DRRS disabled state.

[v2]: Dropped the module parameter details as ctl moved from module
      parameter to debugfs. [Rodrigo]

Signed-off-by: C, Ramalingam <ramalingam.c@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Rodrigo Vivi Nov. 17, 2017, 6:56 p.m. UTC | #1
On Tue, Nov 07, 2017 at 06:40:08PM +0000, Ramalingam C wrote:
> From: "C, Ramalingam" <ramalingam.c@intel.com>
> 
> Existing debugfs entry i915_drrs_status is updated with crtc id and
> if PSR is cause for DRRS disabled state.
> 
> [v2]: Dropped the module parameter details as ctl moved from module
>       parameter to debugfs. [Rodrigo]
> 
> Signed-off-by: C, Ramalingam <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 0c1501fe4c9f..6c2e8346b9a7 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -3567,7 +3567,10 @@ static void drrs_status_per_crtc(struct seq_file *m,
>  
>  		/* disable_drrs() will make drrs->dp NULL */
>  		if (!drrs->dp) {
> -			seq_puts(m, "Idleness DRRS: Disabled");
> +			seq_puts(m, "Idleness DRRS: Disabled\n");
> +			if (dev_priv->psr.enabled)
> +				seq_puts(m,
> +				"\tAs PSR is enabled, DRRS is not enabled\n");

this seems good...

>  			mutex_unlock(&drrs->mutex);
>  			return;
>  		}
> @@ -3611,7 +3614,7 @@ static int i915_drrs_status(struct seq_file *m, void *unused)
>  	for_each_intel_crtc(dev, intel_crtc) {
>  		if (intel_crtc->base.state->active) {
>  			active_crtc_cnt++;
> -			seq_printf(m, "\nCRTC %d:  ", active_crtc_cnt);
> +			seq_printf(m, "\nCRTC %d: ", intel_crtc->base.base.id);

this seems for a separated patch...
or at least missing an explanation why...

>  
>  			drrs_status_per_crtc(m, dev, intel_crtc);
>  		}
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ramalingam C Nov. 20, 2017, 3:39 a.m. UTC | #2
> -----Original Message-----
> From: Vivi, Rodrigo
> Sent: Saturday, November 18, 2017 12:26 AM
> To: C, Ramalingam <ramalingam.c@intel.com>
> Cc: Zanoni, Paulo R <paulo.r.zanoni@intel.com>; chris@chris-wilson.co.uk;
> intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH v2 2/2] i915/drrs/debugfs: crtc id and psr status
> 
> On Tue, Nov 07, 2017 at 06:40:08PM +0000, Ramalingam C wrote:
> > From: "C, Ramalingam" <ramalingam.c@intel.com>
> >
> > Existing debugfs entry i915_drrs_status is updated with crtc id and if
> > PSR is cause for DRRS disabled state.
> >
> > [v2]: Dropped the module parameter details as ctl moved from module
> >       parameter to debugfs. [Rodrigo]
> >
> > Signed-off-by: C, Ramalingam <ramalingam.c@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c
> > b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 0c1501fe4c9f..6c2e8346b9a7 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -3567,7 +3567,10 @@ static void drrs_status_per_crtc(struct
> > seq_file *m,
> >
> >  		/* disable_drrs() will make drrs->dp NULL */
> >  		if (!drrs->dp) {
> > -			seq_puts(m, "Idleness DRRS: Disabled");
> > +			seq_puts(m, "Idleness DRRS: Disabled\n");
> > +			if (dev_priv->psr.enabled)
> > +				seq_puts(m,
> > +				"\tAs PSR is enabled, DRRS is not enabled\n");
> 
> this seems good...
> 
> >  			mutex_unlock(&drrs->mutex);
> >  			return;
> >  		}
> > @@ -3611,7 +3614,7 @@ static int i915_drrs_status(struct seq_file *m, void
> *unused)
> >  	for_each_intel_crtc(dev, intel_crtc) {
> >  		if (intel_crtc->base.state->active) {
> >  			active_crtc_cnt++;
> > -			seq_printf(m, "\nCRTC %d:  ", active_crtc_cnt);
> > +			seq_printf(m, "\nCRTC %d: ", intel_crtc->base.base.id);
> 
> this seems for a separated patch...
> or at least missing an explanation why...
This changes not needed for debugfs control of drrs. As of now debugfs provides the crtc index in the active crtc list. Instead providing the crtc id might help to identify the crtc, that the debuginfo is associated to.

Anyway as there is no usecase that need this change, I will remove it from this patch.

Thanks
-Ram
> 
> >
> >  			drrs_status_per_crtc(m, dev, intel_crtc);
> >  		}
> > --
> > 2.7.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0c1501fe4c9f..6c2e8346b9a7 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3567,7 +3567,10 @@  static void drrs_status_per_crtc(struct seq_file *m,
 
 		/* disable_drrs() will make drrs->dp NULL */
 		if (!drrs->dp) {
-			seq_puts(m, "Idleness DRRS: Disabled");
+			seq_puts(m, "Idleness DRRS: Disabled\n");
+			if (dev_priv->psr.enabled)
+				seq_puts(m,
+				"\tAs PSR is enabled, DRRS is not enabled\n");
 			mutex_unlock(&drrs->mutex);
 			return;
 		}
@@ -3611,7 +3614,7 @@  static int i915_drrs_status(struct seq_file *m, void *unused)
 	for_each_intel_crtc(dev, intel_crtc) {
 		if (intel_crtc->base.state->active) {
 			active_crtc_cnt++;
-			seq_printf(m, "\nCRTC %d:  ", active_crtc_cnt);
+			seq_printf(m, "\nCRTC %d: ", intel_crtc->base.base.id);
 
 			drrs_status_per_crtc(m, dev, intel_crtc);
 		}