diff mbox series

[2/7] drm/i915/perf: reset pollin when perf stream is enabled

Message ID 20190116153622.32576-3-lionel.g.landwerlin@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/perf: add OA interrupt support | expand

Commit Message

Lionel Landwerlin Jan. 16, 2019, 3:36 p.m. UTC
No issues have been raised about this yet, but this should be reset
every time we enable the stream, otherwise we might have a stale value
from the previous round of enable/disable.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_perf.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Matthew Auld Jan. 16, 2019, 5:13 p.m. UTC | #1
On Wed, 16 Jan 2019 at 15:36, Lionel Landwerlin
<lionel.g.landwerlin@intel.com> wrote:
>
> No issues have been raised about this yet, but this should be reset
> every time we enable the stream, otherwise we might have a stale value
> from the previous round of enable/disable.
>
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 575701e2aabc..4c5d2ee4d6e3 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -1876,6 +1876,8 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream)
>  {
>         struct drm_i915_private *dev_priv = stream->dev_priv;
>
> +       dev_priv->perf.oa.pollin = false;
> +
>         dev_priv->perf.oa.ops.oa_enable(stream);

Don't we fumigate oa.polling way down in ops.oa_enable() ?
Lionel Landwerlin Jan. 16, 2019, 6:14 p.m. UTC | #2
On 16/01/2019 17:13, Matthew Auld wrote:
> On Wed, 16 Jan 2019 at 15:36, Lionel Landwerlin
> <lionel.g.landwerlin@intel.com> wrote:
>> No issues have been raised about this yet, but this should be reset
>> every time we enable the stream, otherwise we might have a stale value
>> from the previous round of enable/disable.
>>
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_perf.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
>> index 575701e2aabc..4c5d2ee4d6e3 100644
>> --- a/drivers/gpu/drm/i915/i915_perf.c
>> +++ b/drivers/gpu/drm/i915/i915_perf.c
>> @@ -1876,6 +1876,8 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream)
>>   {
>>          struct drm_i915_private *dev_priv = stream->dev_priv;
>>
>> +       dev_priv->perf.oa.pollin = false;
>> +
>>          dev_priv->perf.oa.ops.oa_enable(stream);
> Don't we fumigate oa.polling way down in ops.oa_enable() ?
>
Duh! You're right... It's the last step for gen7/8_init_oa_buffer().

I think I would like to move it into the generic setup if that's okay 
and leave the specific stuff to register manipulations.

Will update.


-

Lionel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 575701e2aabc..4c5d2ee4d6e3 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -1876,6 +1876,8 @@  static void i915_oa_stream_enable(struct i915_perf_stream *stream)
 {
 	struct drm_i915_private *dev_priv = stream->dev_priv;
 
+	dev_priv->perf.oa.pollin = false;
+
 	dev_priv->perf.oa.ops.oa_enable(stream);
 
 	if (dev_priv->perf.oa.periodic)