On Thu, Sep 9, 2010 at 3:25 AM, Auke Kok <[email protected]> wrote:
> On 08/13/10 00:25, Amit Arora wrote:
>>
>> Currently, PowerTOP has hard coded values for the number of C and P
>> states supported. Hence it doesn't work well on systems which may have
>> more states than these hard coded ones. This is specially true for some
>> of the ARM SoCs which may have as many as 8 to 9 C-states.
>>
>> Suggested fix:
>> This patch defines MAX values of C and P states for allocating enough
>> memory for data structures statically. But, uses actual values of the
>> MAX C and P states for display (using, maxcstate and maxpstate
>> variables).
>>
>> Testing done:
>> This patch has been tested on a few x86 desktops, x86_64 servers, a
>> laptop and a couple of ARM boards (OMAP3 and imx53).
>>
>> Signed-off-by: Amit Arora<[email protected]>
>
> merged, thanks.

Hello Auke,

With reference to commit id 0a8620213f, I just noticed that there was
a slight change in the patch that got committed, from what I had
posted.

Please see following portion of the patch that I had posted
(http://www.bughost.org/pipermail/power/2010-August/001961.html)  :

diff --git a/display.c b/display.c
index 79732ab..df23622 100644
--- a/display.c
+++ b/display.c
@@ -164,20 +169,25 @@ void show_title_bar(void)
 void show_cstates(void)
 {
        int i, count = 0;
  :
  :
-       for (i=0; i<6; i++) {
+       for (i = 0; i <= (maxpstate+1); i++) {
                if (i == topfreq+1)
                        wattron(cstate_window, A_BOLD);



But, when I see the git log, I see that above portion was committed as :
-       for (i=0; i<6; i++) {
+       for (i = 0; i < (maxpstate+1); i++) {


This (missing of "=" in above condition) is resulting in PowerTOP to
not display the last P-state.

Attached patch fixes this. Please accept. Thanks!

Output before the patch is applied : http://paste.ubuntu.com/503174/
And, after the patch gets applied : http://paste.ubuntu.com/503175/

Regards,
Amit Arora
Show all P-states.

Signed-off-by: Amit Arora <[email protected]>
--
diff --git a/display.c b/display.c
index f9b6e56..d43fb95 100644
--- a/display.c
+++ b/display.c
@@ -193,7 +193,7 @@ void show_cstates(void)
 		}
 	}
 
-	for (i = 0; i < (maxpstate+1); i++) {
+	for (i = 0; i <= (maxpstate+1); i++) {
 		if (i == topfreq+1)
 			p_wattron(cstate_window, A_BOLD);
 		else
_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to