[Mesa-dev] [PATCH v2 1/2] gallium/hud: temperature is displayed with a percentage symbol, remove it

Benjamin Bellec b.bellec at gmail.com
Fri Sep 4 11:21:04 PDT 2015


Forgot this one.
I will resend correctly, just trying to understand how git-format-patch and
git-send-mail works...

2015-09-04 20:18 GMT+02:00 Benjamin Bellec <b.bellec at gmail.com>:

> Signed-off-by: Benjamin Bellec <b.bellec at gmail.com>
> ---
>  src/gallium/drivers/radeon/r600_pipe_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c
> b/src/gallium/drivers/radeon/r600_pipe_common.c
> index ed5d1da..2a8d906 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -722,7 +722,7 @@ static int r600_get_driver_query_info(struct
> pipe_screen *screen,
>                 {"VRAM-usage", R600_QUERY_VRAM_USAGE,
> {rscreen->info.vram_size}, PIPE_DRIVER_QUERY_TYPE_BYTES},
>                 {"GTT-usage", R600_QUERY_GTT_USAGE,
> {rscreen->info.gart_size}, PIPE_DRIVER_QUERY_TYPE_BYTES},
>                 {"GPU-load", R600_QUERY_GPU_LOAD, {100}},
> -               {"temperature", R600_QUERY_GPU_TEMPERATURE, {100}},
> +               {"temperature", R600_QUERY_GPU_TEMPERATURE, {125}},
>                 {"shader-clock", R600_QUERY_CURRENT_GPU_SCLK, {0},
> PIPE_DRIVER_QUERY_TYPE_HZ},
>                 {"memory-clock", R600_QUERY_CURRENT_GPU_MCLK, {0},
> PIPE_DRIVER_QUERY_TYPE_HZ},
>         };
> --
> 2.4.3
>
>
> From 87a3e9a0fca72facb840d8c450fe9755b41e3b83 Mon Sep 17 00:00:00 2001
> From: Benjamin Bellec <b.bellec at gmail.com>
> Date: Fri, 4 Sep 2015 20:02:23 +0200
> Subject: [PATCH v2 2/2] gallium/hud: display the temperature unit
> To: mesa-dev at lists.freedesktop.org
> Cc: mesa-stable at lists.freedesktop.org
>
> Signed-off-by: Benjamin Bellec <b.bellec at gmail.com>
> ---
>  src/gallium/auxiliary/hud/hud_context.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/auxiliary/hud/hud_context.c
> b/src/gallium/auxiliary/hud/hud_context.c
> index 95eed26..71529bc 100644
> --- a/src/gallium/auxiliary/hud/hud_context.c
> +++ b/src/gallium/auxiliary/hud/hud_context.c
> @@ -243,6 +243,7 @@ number_to_human_readable(uint64_t num, uint64_t
> max_value,
>     static const char *hz_units[] =
>        {" Hz", " KHz", " MHz", " GHz"};
>     static const char *percent_units[] = {"%"};
> +   static const char *temperature_units[] = {"C"};
>
>     const char **units;
>     unsigned max_unit;
> @@ -271,6 +272,9 @@ number_to_human_readable(uint64_t num, uint64_t
> max_value,
>        if (max_value == 100) {
>           max_unit = ARRAY_SIZE(percent_units)-1;
>           units = percent_units;
> +      } else if (max_value == 125) {
> +         max_unit = ARRAY_SIZE(temperature_units)-1;
> +         units = temperature_units;
>        } else {
>           max_unit = ARRAY_SIZE(metric_units)-1;
>           units = metric_units;
> --
> 2.4.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150904/f6f147e4/attachment-0001.html>


More information about the mesa-dev mailing list