All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Christian Gmeiner <christian.gmeiner@gmail.com>,
	dri-devel@lists.freedesktop.org
Cc: etnaviv@lists.freedesktop.org, cphealy@gmail.com,
	linux+etnaviv@armlinux.org.uk
Subject: Re: [PATCH V5 23/25] drm/etnaviv: do not enable debug registers unconditionally
Date: Thu, 28 Sep 2017 11:05:32 +0200	[thread overview]
Message-ID: <1506589532.2283.5.camel@pengutronix.de> (raw)
In-Reply-To: <20170924131543.4066-24-christian.gmeiner@gmail.com>

Am Sonntag, den 24.09.2017, 15:15 +0200 schrieb Christian Gmeiner:
> Everytime etnaviv_gpu_update_clock(..) gets call it overwrittes
> the the complete VIVS_HI_CLOCK_CONTROL register. Instead read
> the register, change scaling value and write the new value.
> 
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index cfe6c76d077e..10a6485a2401 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -421,8 +421,9 @@ static void etnaviv_gpu_update_clock(struct
> etnaviv_gpu *gpu)
>  			     gpu->base_rate_shader >> gpu-
> >freq_scale);
>  	} else {
>  		unsigned int fscale = 1 << (6 - gpu->freq_scale);
> -		u32 clock =
> VIVS_HI_CLOCK_CONTROL_FSCALE_VAL(fscale);
> +		u32 clock = gpu_read(gpu, VIVS_HI_CLOCK_CONTROL);
>  
> +		clock |= VIVS_HI_CLOCK_CONTROL_FSCALE_VAL(fscale);

So now you keep the old FSCALE value and additionally set the new one.
This needs to mask out the old value first.

If you don't mind I'll fix this up while applying.

Regards,
Lucas
>  		etnaviv_gpu_load_clock(gpu, clock);
>  	}
>  }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-09-28  9:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-24 13:15 [PATCH V5 00/25] drm/etnaviv: support performance counters Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 01/25] drm/etnaviv: use bitmap to keep track of events Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 02/25] drm/etnaviv: make it possible to allocate multiple events Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 03/25] drm/etnaviv: add infrastructure to query perf counter Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 04/25] drm/etnaviv: add uapi for perfmon feature Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 05/25] drm/etnaviv: add internal representation of perfmon_request Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 06/25] drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_pmrs Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 07/25] drm/etnaviv: add performance monitor request validation Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 08/25] drm/etnaviv: copy pmrs from userspace Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 09/25] drm/etnaviv: add performance monitor request processing Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 10/25] drm/etnaviv: add 'sync point' support Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 11/25] drm/etnaviv: clear alloced event Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 12/25] drm/etnaviv: use 'sync points' for performance monitor requests Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 13/25] drm/etnaviv: add HI perf domain Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 14/25] drm/etnaviv: add PE " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 15/25] drm/etnaviv: add SH " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 16/25] drm/etnaviv: add PA " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 17/25] drm/etnaviv: add SE " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 18/25] drm/etnaviv: add RA " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 19/25] drm/etnaviv: add TX " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 20/25] drm/etnaviv: add MC " Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 21/25] drm/etnaviv: need to disable clock gating when doing profiling Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 22/25] drm/etnaviv: move disabling of debug registers to the GPU init path Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 23/25] drm/etnaviv: do not enable debug registers unconditionally Christian Gmeiner
2017-09-28  9:05   ` Lucas Stach [this message]
2017-09-28  9:16     ` Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 24/25] drm/etnaviv: enable debug registers on demand Christian Gmeiner
2017-09-24 13:15 ` [PATCH V5 25/25] drm/etnaviv: submit supports performance monitor requests 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=1506589532.2283.5.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=christian.gmeiner@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --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.