[Intel-gfx] [PATCH 05/11] drm/i915: Added debugfs support for PSR Status
Rodrigo Vivi
rodrigo.vivi at gmail.com
Mon Jul 15 22:13:27 CEST 2013
On Mon, Jul 15, 2013 at 11:03 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Thu, Jul 11, 2013 at 06:44:59PM -0300, Rodrigo Vivi wrote:
>> Adding support for PSR Status, PSR entry counter and performance counters.
>> Heavily based on initial work from Shobhit.
>>
>> v2: Fix PSR Status Link bits by Paulo Zanoni.
>> v3: Prefer seq_puts to seq_printf by Paulo Zanoni.
>> v4: Fix identation by Paulo Zanoni.
>> v5: Return earlier if it isn't Haswell in order to avoid reading non-existing
>> registers - by Paulo Zanoni.
>>
>> CC: Paulo Zanoni <paulo.r.zanoni at intel.com>
>> Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
>> Credits-by: Shobhit Kumar <shobhit.kumar at intel.com>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
>> ---
>> drivers/gpu/drm/i915/i915_debugfs.c | 95 +++++++++++++++++++++++++++++++++++++
>> drivers/gpu/drm/i915/i915_reg.h | 24 ++++++++++
>> 2 files changed, 119 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>> index d413812..fe3cd5a 100644
>> --- a/drivers/gpu/drm/i915/i915_debugfs.c
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>> @@ -1943,6 +1943,100 @@ static int i915_dpio_info(struct seq_file *m, void *data)
>> return 0;
>> }
>>
>> +static int i915_edp_psr_status(struct seq_file *m, void *data)
>> +{
>> + struct drm_info_node *node = m->private;
>> + struct drm_device *dev = node->minor->dev;
>> + struct drm_i915_private *dev_priv = dev->dev_private;
>> + u32 psrctl, psrstat, psrperf;
>> +
>> + if (!IS_HASWELL(dev)) {
>
> Introduce a HAS_PSR(dev)
I prefer to stay with HSW check for now because as far as I can
remember the registers on another platforms are different.
After this series is accepted I'm going to integrate psr support for
baytrail and I come up with a more elegant check.
>
>> + seq_puts(m, "PSR not supported on this platform\n");
>> + return 0;
>> + }
>> +
>> + psrctl = I915_READ(EDP_PSR_CTL);
>
> Missing locking.
what lock? that psr exit is on debug_ctl
> -Chris
Thanks,
Rodrigo.
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
More information about the Intel-gfx
mailing list