<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 09/04/2015 08:57 PM, Benjamin Bellec
wrote:<br>
</div>
<blockquote
cite="mid:CANzfOV+rRRowS1izatkdEhFtDQYM_L6199HG0KbLbMYY8zWNEQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>Currently, the temperature is displayed with a "%"
symbol in gallium/hud, which is quite odd.<br>
</div>
Marek suggested to only change the value "100" to another
value so that this symbol is no more displayed. That works
very well. This is the patch #1. I choose "125" because it
can be divided nicely by 5, then the threshold displayed on
the hud graph are 25/50/75/100/etc. And also because with
this, the actual temperature value is generally in the
middle of the graph.<br>
<br>
</div>
This second patch is totally optional. It "catch" the value
"125" in order to display a "C" instead of nothing.<br>
<br>
</div>
Ref. your suggestion on PIPE_DRIVER_QUERY_TYPE_TEMPERATURE, I'm
not skilled enough to answer.</div>
<div class="gmail_extra"><br>
</div>
</blockquote>
Your first attempt at writing this patch introduced this
PIPE_DRIVER_QUERY_TYPE_TEMPERATURE.<br>
Please, re-introduce it correctly. :)<br>
<br>
<blockquote
cite="mid:CANzfOV+rRRowS1izatkdEhFtDQYM_L6199HG0KbLbMYY8zWNEQ@mail.gmail.com"
type="cite">
<div class="gmail_extra">
<div class="gmail_quote">2015-09-04 20:42 GMT+02:00 Brian Paul <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb">
<div class="h5">On 09/04/2015 12:30 PM, Benjamin Bellec
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Signed-off-by: Benjamin Bellec <<a
moz-do-not-send="true"
href="mailto:b.bellec@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:b.bellec@gmail.com">b.bellec@gmail.com</a></a>><br>
---<br>
src/gallium/auxiliary/hud/hud_context.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/gallium/auxiliary/hud/hud_context.c
b/src/gallium/auxiliary/hud/hud_context.c<br>
index 95eed26..71529bc 100644<br>
--- a/src/gallium/auxiliary/hud/hud_context.c<br>
+++ b/src/gallium/auxiliary/hud/hud_context.c<br>
@@ -243,6 +243,7 @@ number_to_human_readable(uint64_t
num, uint64_t max_value,<br>
static const char *hz_units[] =<br>
{" Hz", " KHz", " MHz", " GHz"};<br>
static const char *percent_units[] = {"%"};<br>
+ static const char *temperature_units[] = {"C"};<br>
<br>
const char **units;<br>
unsigned max_unit;<br>
@@ -271,6 +272,9 @@ number_to_human_readable(uint64_t
num, uint64_t max_value,<br>
if (max_value == 100) {<br>
max_unit = ARRAY_SIZE(percent_units)-1;<br>
units = percent_units;<br>
+ } else if (max_value == 125) {<br>
+ max_unit = ARRAY_SIZE(temperature_units)-1;<br>
+ units = temperature_units;<br>
} else {<br>
max_unit = ARRAY_SIZE(metric_units)-1;<br>
units = metric_units;<br>
<br>
</blockquote>
<br>
<br>
</div>
</div>
This seems like a bit of a magic number approach here. At
the very least, this magic value should be documented
somewhere. PIPE_DRIVER_QUERY_TYPE_TEMPERATURE seems better
to me, actually.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Brian<br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mesa-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>