mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 18:06:13 +00:00
overlay: Tweak label locations to include baseline offset.
Still approximately, too lazy to query the metrics. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
34e4780c8e
commit
3df8300e23
@ -165,7 +165,7 @@ static void show_gpu_top(struct overlay_context *ctx, struct overlay_gpu_top *gt
|
|||||||
|
|
||||||
cairo_set_source_rgb(ctx->cr, 1, 1, 1);
|
cairo_set_source_rgb(ctx->cr, 1, 1, 1);
|
||||||
|
|
||||||
y = 12;
|
y = 12 + 12 - 2;
|
||||||
cairo_set_source_rgba(ctx->cr, 0.75, 0.25, 0.75, 1.);
|
cairo_set_source_rgba(ctx->cr, 0.75, 0.25, 0.75, 1.);
|
||||||
cairo_move_to(ctx->cr, 12, y);
|
cairo_move_to(ctx->cr, 12, y);
|
||||||
sprintf(txt, "CPU: %d%% busy", gt->cpu_top.busy);
|
sprintf(txt, "CPU: %d%% busy", gt->cpu_top.busy);
|
||||||
@ -242,7 +242,7 @@ static void show_gpu_perf(struct overlay_context *ctx, struct overlay_gpu_perf *
|
|||||||
|
|
||||||
gpu_perf_update(&gp->gpu_perf);
|
gpu_perf_update(&gp->gpu_perf);
|
||||||
|
|
||||||
y = 12;
|
y = 12 + 12 - 2;
|
||||||
x = ctx->width/2 + 12;
|
x = ctx->width/2 + 12;
|
||||||
|
|
||||||
for (comm = gp->gpu_perf.comm; comm; comm = comm->next) {
|
for (comm = gp->gpu_perf.comm; comm; comm = comm->next) {
|
||||||
@ -423,7 +423,7 @@ static void show_gpu_freq(struct overlay_context *ctx, struct overlay_gpu_freq *
|
|||||||
chart_draw(&gf->request, ctx->cr);
|
chart_draw(&gf->request, ctx->cr);
|
||||||
chart_draw(&gf->current, ctx->cr);
|
chart_draw(&gf->current, ctx->cr);
|
||||||
|
|
||||||
y = ctx->height/2 + 6;
|
y = ctx->height/2 + 6 + 12 - 2;
|
||||||
len = sprintf(buf, "Frequency: %dMHz", gf->gpu_freq.current);
|
len = sprintf(buf, "Frequency: %dMHz", gf->gpu_freq.current);
|
||||||
if (gf->gpu_freq.request)
|
if (gf->gpu_freq.request)
|
||||||
sprintf(buf + len, " (requested %dMHz)", gf->gpu_freq.request);
|
sprintf(buf + len, " (requested %dMHz)", gf->gpu_freq.request);
|
||||||
@ -477,7 +477,7 @@ static void show_gem_objects(struct overlay_context *ctx, struct overlay_gem_obj
|
|||||||
chart_draw(&go->gtt, ctx->cr);
|
chart_draw(&go->gtt, ctx->cr);
|
||||||
chart_draw(&go->aperture, ctx->cr);
|
chart_draw(&go->aperture, ctx->cr);
|
||||||
|
|
||||||
y = ctx->height/2 + 6;
|
y = ctx->height/2 + 6 + 12 - 2;
|
||||||
x = ctx->width/2 + 12;
|
x = ctx->width/2 + 12;
|
||||||
sprintf(buf, "Total: %ldMB, %d objects",
|
sprintf(buf, "Total: %ldMB, %d objects",
|
||||||
go->gem_objects.total_bytes >> 20, go->gem_objects.total_count);
|
go->gem_objects.total_bytes >> 20, go->gem_objects.total_count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user