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.gmei...@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);
                etnaviv_gpu_load_clock(gpu, clock);
        }
 }
-- 
2.13.5

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

Reply via email to