overlay: Print min/max GPU frequencies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-08-18 18:27:47 +01:00
parent 3f5129471f
commit 7d950fa6f2
3 changed files with 8 additions and 1 deletions

View File

@ -43,6 +43,7 @@ int gpu_freq_init(struct gpu_freq *gf)
if (s == NULL)
return EIO;
sscanf(s, "Max overclocked frequency: %dMHz", &gf->max);
gf->min = gf->rpn;
return 0;
}

View File

@ -1,5 +1,6 @@
struct gpu_freq {
int rpn, rp1, rp0, max;
int min, max;
int rpn, rp1, rp0;
int request;
int current;
};

View File

@ -432,6 +432,11 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq *
cairo_show_text(ctx->cr, buf);
y += 14;
sprintf(buf, "min: %dMHz, max: %dMHz", gf->gpu_freq.min, gf->gpu_freq.max);
cairo_move_to(ctx->cr, 12, y);
cairo_show_text(ctx->cr, buf);
y += 14;
ctx->last_y += 112;
}