All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Gmeiner <christian.gmeiner@gmail.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Chris Healy <cphealy@gmail.com>,
	The etnaviv authors <etnaviv@lists.freedesktop.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	Russell King <linux+etnaviv@armlinux.org.uk>
Subject: Re: [PATCH V4 21/23] drm/etnaviv: need to disable clock gating when doing profiling
Date: Wed, 13 Sep 2017 16:36:32 +0200	[thread overview]
Message-ID: <CAH9NwWe84LhMWUedFeKjYrY1qtWLyN+_UvuvjhASJUf8iDFSSw@mail.gmail.com> (raw)
In-Reply-To: <1505300726.32690.22.camel@pengutronix.de>

Hi Lucas

2017-09-13 13:05 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
> Am Dienstag, den 12.09.2017, 17:11 +0200 schrieb Christian Gmeiner:
>> As done by Vivante kernel driver.
>
> You need to move the VIVS_HI_CLOCK_CONTROL_DISABLE_DEBUG_REGISTERS from
> etnaviv_gpu_update_clock to the GPU init path. Otherwise a thermal
> throttling request may disable the debug registers again, while the
> profiled commandstream is in flight on the GPU.
>

Will be fixed in next version.

> Regards,
> Lucas
>
>> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
>> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
>> ---
>>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
>> index 842b6642dcd6..04acc3a64c3c 100644
>> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
>> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
>> @@ -1341,6 +1341,13 @@ static void sync_point_perfmon_sample(struct etnaviv_gpu *gpu,
>>  static void sync_point_perfmon_sample_pre(struct etnaviv_gpu *gpu,
>>       struct etnaviv_event *event)
>>  {
>> +     u32 val;
>> +
>> +     /* disable clock gating */
>> +     val = gpu_read(gpu, VIVS_PM_POWER_CONTROLS);
>> +     val &= ~VIVS_PM_POWER_CONTROLS_ENABLE_MODULE_CLOCK_GATING;
>> +     gpu_write(gpu, VIVS_PM_POWER_CONTROLS, val);
>> +
>>       sync_point_perfmon_sample(gpu, event, ETNA_PM_PROCESS_PRE);
>>  }
>>
>> @@ -1349,6 +1356,7 @@ static void sync_point_perfmon_sample_post(struct etnaviv_gpu *gpu,
>>  {
>>       const struct etnaviv_cmdbuf *cmdbuf = event->cmdbuf;
>>       unsigned int i;
>> +     u32 val;
>>
>>       sync_point_perfmon_sample(gpu, event, ETNA_PM_PROCESS_POST);
>>
>> @@ -1357,6 +1365,11 @@ static void sync_point_perfmon_sample_post(struct etnaviv_gpu *gpu,
>>
>>               *pmr->bo_vma = pmr->sequence;
>>       }
>> +
>> +     /* enable clock gating */
>> +     val = gpu_read(gpu, VIVS_PM_POWER_CONTROLS);
>> +     val |= VIVS_PM_POWER_CONTROLS_ENABLE_MODULE_CLOCK_GATING;
>> +     gpu_write(gpu, VIVS_PM_POWER_CONTROLS, val);
>>  }
>>
>>
>
>

greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-09-13 14:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 15:11 [PATCH 00/23] drm/etnaviv: support performance counters Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 01/23] drm/etnaviv: use bitmap to keep track of events Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 02/23] drm/etnaviv: make it possible to allocate multiple events Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 03/23] drm/etnaviv: add infrastructure to query perf counter Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 04/23] drm/etnaviv: add uapi for perfmon feature Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 05/23] drm/etnaviv: add internal representation of perfmon_request Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 06/23] drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_pmrs Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 07/23] drm/etnaviv: add performance monitor request validation Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 08/23] drm/etnaviv: copy pmrs from userspace Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 09/23] drm/etnaviv: add performance monitor request processing Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 10/23] drm/etnaviv: add 'sync point' support Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 11/23] drm/etnaviv: clear alloced event Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 12/23] drm/etnaviv: use 'sync points' for performance monitor requests Christian Gmeiner
2017-09-13 11:03   ` Lucas Stach
2017-09-13 14:35     ` Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 13/23] drm/etnaviv: add HI perf domain Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 14/23] drm/etnaviv: add PE " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 15/23] drm/etnaviv: add SH " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 16/23] drm/etnaviv: add PA " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 17/23] drm/etnaviv: add SE " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 18/23] drm/etnaviv: add RA " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 19/23] drm/etnaviv: add TX " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 20/23] drm/etnaviv: add MC " Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 21/23] drm/etnaviv: need to disable clock gating when doing profiling Christian Gmeiner
2017-09-13 11:05   ` Lucas Stach
2017-09-13 14:36     ` Christian Gmeiner [this message]
2017-09-12 15:11 ` [PATCH V4 22/23] drm/etnaviv: enable debug registers on demand Christian Gmeiner
2017-09-12 15:11 ` [PATCH V4 23/23] drm/etnaviv: submit supports performance monitor requests Christian Gmeiner
2017-09-13 11:01 ` [PATCH 00/23] drm/etnaviv: support performance counters Lucas Stach
2017-09-13 14:32   ` Christian Gmeiner

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=CAH9NwWe84LhMWUedFeKjYrY1qtWLyN+_UvuvjhASJUf8iDFSSw@mail.gmail.com \
    --to=christian.gmeiner@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux+etnaviv@armlinux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.