From 9b73ce43fecc71533603849f35dd3bd1233a0eea Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 16 Aug 2015 12:12:53 +0100 Subject: overlay: Fix min frequency detection on BYT/BSW Signed-off-by: Chris Wilson --- overlay/gpu-freq.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'overlay') diff --git a/overlay/gpu-freq.c b/overlay/gpu-freq.c index a2d8f084..321c9388 100644 --- a/overlay/gpu-freq.c +++ b/overlay/gpu-freq.c @@ -91,11 +91,14 @@ int gpu_freq_init(struct gpu_freq *gf) if (strstr(buf, "PUNIT_REG_GPU_FREQ_STS")) { /* Baytrail is special, ofc. */ gf->is_byt = 1; + s = strstr(buf, "max"); - if (s == NULL) - goto err; - sscanf(s, "max GPU freq: %d MHz", &gf->max); - sscanf(s, "min GPU freq: %d MHz", &gf->min); + if (s != NULL) + sscanf(s, "max GPU freq: %d MHz", &gf->max); + + s = strstr(buf, "min"); + if (s != NULL) + sscanf(s, "min GPU freq: %d MHz", &gf->min); gf->rp0 = gf->rp1 = gf->max; gf->rpn = gf->min; -- cgit v1.2.3