Announcement

Collapse
No announcement yet.

Radeon DPM Is Fantastic For Power Use, Thermal Performance

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by 0xBADCODE View Post
    And btw, I can monitor GPU frequencies like this:
    Code:
     while (true) do cat /sys/kernel/debug/dri/0/radeon_pm_info; sleep 1; done
    That's way too complex, just do:
    Code:
    watch cat /sys/kernel/debug/dri/0/radeon_pm_info

    Comment


    • #32
      Originally posted by GreatEmerald View Post
      That's way too complex, just do:
      Code:
      watch cat /sys/kernel/debug/dri/0/radeon_pm_info
      At last check, radeon_pm_info changed on Linux 3.11 and no longer was showing the core/memory frequencies. PTS already supports monitoring radeon_pm_info on supported kernels but with the configurations I had tried it wasn't working. But I'll see if it's working again with latest Git...
      Michael Larabel
      http://www.michaellarabel.com/

      Comment


      • #33
        Micheal. I've looked at the code and I noticed something.

        In setting the values for $config['color']['paint']
        #e12128 and #E00022 are visually identical.
        and
        757575 is nearly the same as 79776 and 555555 (79776 and 555555 are different from each other)

        Unless there is a reason to have a certain length to $config['color']['paint'], removing #e12128 and 757575 would get rid of some confusing colors.


        I am also a bit confused about color_cache.
        In color_cache I can tell that you are assigning colors to sets of data. I'm not sure if I understand what you are trying to do with this bit of code
        Code:
        if(empty($colors))  
        				{
        					return false;  // 
        				}
        		
        				$hsl = self::color_rgb_to_hsl($colors[0]);
        				$hsl = self::shift_hsl($hsl, $color_shift % 360);
        				$color = self::color_hsl_to_hex($hsl);
        
        				$color_shift += $color_shift_size;
        				if($color_shift == ($color_shift_size * 3))
        				{
        					$color_shift_size *= 0.3;
        					$colors[0] = self::color_shade($colors[0], 0.9, 1);
        				}
        				else if($color_shift > 630)
        				{
        					// We have already exhausted the cache pool once
        					array_shift($colors);  
        					$color_shift = 0;
        				}
        			}
        			while(in_array($color, $cache[$ns]));
        			
        			$cache[$ns][$id] = $color;
        		}
        I hope I'm not too noobish. I've programed allot before in other languages, but this is the first time I've seriously looked at php.
        Last edited by ua=42; 08-01-2013, 03:11 PM. Reason: grammer fix

        Comment


        • #34
          Originally posted by Michael View Post
          At last check, radeon_pm_info changed on Linux 3.11 and no longer was showing the core/memory frequencies. PTS already supports monitoring radeon_pm_info on supported kernels but with the configurations I had tried it wasn't working. But I'll see if it's working again with latest Git...
          The format of the debugfs information is different if DPM is enabled because the two pm methods don't really align exactly.

          Comment


          • #35
            And it's still in debugfs (ie: under a debug option, thus not available in production builds)...

            Comment


            • #36
              Originally posted by 0xBADCODE View Post
              I can also confirm power management is very good for me on 5750 and 5770 cards.
              Could you test with two monitors? It doesn't work with a second monitor attached on my 5770! ( https://bugzilla.kernel.org/show_bug.cgi?id=60523 )

              Comment


              • #37
                Ok. After doing some research I know what needs to be changed for the color chart picker

                According to some papers, you can get to about 22 colors before they become really hard to visually distinguish from each other.
                If you have 12 colors or less, there is a set of colors that are very distinguished from one another (unless you are color blind)

                So I propose the code be changed in the following ways.

                if there is less than 12 different lines use the following 11 colors (since we can't use white).
                Code:
                array('#000000', '#0000FF', '#FF0000', '#00FF00', '#FFFF00', '#FF00FF', '#FF8080', '#808080', '#800000', '#FF8000');
                if there is less than 22 different lines, use the following 21 colors (since we can't use white)
                Code:
                array('#000000', '#FFB300', '#803E75', '#FF6800', '#A6BDD7', '#C10020', '#CEA262', '#817066', '#007D34', '#F6768E', '#00538A', '#FF7A5C', '#53377A', '#FF8E00', '#B32851', '#F4C800', '#7F180D', '#93AA00', '#593315', '#F13A13', '#232C16');
                If you have 22 or more lines, then there will be visibility issues. Not sure if it would be better to fail and tell the user split the data sets, or try to fill in colors, by picking colors in-between the ones already being used.

                Comment


                • #38
                  I get a totally unstable system when booting on 3.11 rc3.

                  At the instant i run folding@home or firefox, system hangs but my mouse is still moving around, just doesen't click on stuff.
                  When choosing 3.10.3 and doing the same thing it works fine.

                  AMD Athlon II x4 630
                  ATI 4850


                  I did download the updated firmware RV770_smc.bin from http://people.freedesktop.org/~agd5f/radeon_ucode/

                  Now on /lib/firmware/radeon i have 3 firmware files for my card:

                  RV770_me.bin
                  RV770_pfp.bin
                  RV770_smc.bin

                  On the link theres only the _smc.bin file, so maybe i only need smc and not the me and pfp?


                  This is all on openSUSE 12.3, kernel 3.11-rc3 from kernel:HEAD repository, Mesa 9.2 git.

                  Comment


                  • #39
                    I get a totally unstable system when booting on 3.11 rc3.

                    At the instant i run folding@home, system hangs but my mouse is still alive.
                    When choosing 3.10.3 and doing the same thing it works fine.

                    AMD Athlon II x4 630
                    ATI 4850


                    I did download the updated firmware RV770_smc.bin from http://people.freedesktop.org/~agd5f/radeon_ucode/

                    Now on /lib/firmware/radeon i have 3 firmware files for my card:

                    RV770_me.bin
                    RV770_pfp.bin
                    RV770_smc.bin

                    On the link theres only the _smc.bin file, so maybe i only need smc and not the me and pfp?

                    This is all on openSUSE 12.3, kernel 3.11-rc3 from Kernel:HEAD repository and Mesa 9.2 git

                    Comment


                    • #40
                      Originally posted by ua=42 View Post
                      Ok. After doing some research I know what needs to be changed for the color chart picker

                      According to some papers, you can get to about 22 colors before they become really hard to visually distinguish from each other.
                      If you have 12 colors or less, there is a set of colors that are very distinguished from one another (unless you are color blind)

                      So I propose the code be changed in the following ways.

                      if there is less than 12 different lines use the following 11 colors (since we can't use white).
                      Code:
                      array('#000000', '#0000FF', '#FF0000', '#00FF00', '#FFFF00', '#FF00FF', '#FF8080', '#808080', '#800000', '#FF8000');
                      if there is less than 22 different lines, use the following 21 colors (since we can't use white)
                      Code:
                      array('#000000', '#FFB300', '#803E75', '#FF6800', '#A6BDD7', '#C10020', '#CEA262', '#817066', '#007D34', '#F6768E', '#00538A', '#FF7A5C', '#53377A', '#FF8E00', '#B32851', '#F4C800', '#7F180D', '#93AA00', '#593315', '#F13A13', '#232C16');
                      If you have 22 or more lines, then there will be visibility issues. Not sure if it would be better to fail and tell the user split the data sets, or try to fill in colors, by picking colors in-between the ones already being used.
                      I'll try out that array and see how the results look on some of the common graphs. There's been many revisions to this code and it's rather a mess right now. Originally, pts_Graph used a static array of possible colors to pick for line graphs but when the need arose for a dynamic number of color combinations, I tried coming up with a way to dynamically calculate new colors based upon other predefined colors that fit the overall color scheme of PTS/OB. That was mostly guessing and trial and error due to not much experience with color-choosing stuff. SInce then at least two or three times, Phoronix readers have attempted to improve the color selection ways but to not much avail and mostly cluttering the code to a greater extent.
                      Michael Larabel
                      http://www.michaellarabel.com/

                      Comment


                      • #41
                        Originally posted by Michael View Post
                        I'll try out that array and see how the results look on some of the common graphs. There's been many revisions to this code and it's rather a mess right now. Originally, pts_Graph used a static array of possible colors to pick for line graphs but when the need arose for a dynamic number of color combinations, I tried coming up with a way to dynamically calculate new colors based upon other predefined colors that fit the overall color scheme of PTS/OB. That was mostly guessing and trial and error due to not much experience with color-choosing stuff. SInce then at least two or three times, Phoronix readers have attempted to improve the color selection ways but to not much avail and mostly cluttering the code to a greater extent.
                        Here's the patch I did now, though it still has problems that's been experienced before... Some of the colors are really light and hard to read, etc.

                        Code:
                        diff -Naur phoronix-test-suite.orig/pts-core/objects/pts_Graph/pts_Graph.php phoronix-test-suite/pts-core/objects/pts_Graph/pts_Graph.php
                        --- phoronix-test-suite.orig/pts-core/objects/pts_Graph/pts_Graph.php    2013-08-01 21:58:25.000000000 -0500
                        +++ phoronix-test-suite/pts-core/objects/pts_Graph/pts_Graph.php    2013-08-01 22:19:53.771812762 -0500
                        @@ -463,6 +463,27 @@
                                 $this->render_graph_result();
                                 $this->render_graph_post();
                             }
                        +    protected function get_special_paint_color($identifier)
                        +    {
                        +        // For now to try to improve the color handling of line graphs, first try to use a pre-defined pool of colors until falling back to the old color code once exhausted
                        +        // Thanks to ua=42 in the Phoronix Forums for the latest attempt at improving the automated color handling
                        +        static $line_color_cache = null;
                        +        static $predef_line_colors = array('#000000', '#FFB300', '#803E75', '#FF6800', '#A6BDD7', '#C10020', '#CEA262', '#817066', '#007D34', '#F6768E', '#00538A', '#FF7A5C', '#53377A', '#FF8E00', '#B32851', '#F4C800', '#7F180D', '#93AA00', '#593315', '#F13A13', '#232C16');
                        +
                        +        if(!isset($line_color_cache[$identifier]))
                        +        {
                        +            if(!empty($predef_line_colors))
                        +            {
                        +                $line_color_cache[$identifier] = array_pop($predef_line_colors);
                        +            }
                        +            else
                        +            {
                        +                $line_color_cache[$identifier] = $this->get_paint_color($identifier);
                        +            }
                        +        }
                        +
                        +        return $line_color_cache[$identifier];
                        +    }
                             protected function render_graph_pre_init()
                             {
                                 return;
                        @@ -719,7 +740,7 @@
                                 {
                                     if(!empty($this->graph_data_title[$i]))
                                     {
                        -                $this_color = $this->get_paint_color($this->graph_data_title[$i]);
                        +                $this_color = $this->get_special_paint_color($this->graph_data_title[$i]);
                         
                                         if($i != 0 && $i % $this->i['keys_per_line'] == 0)
                                         {
                        diff -Naur phoronix-test-suite.orig/pts-core/objects/pts_Graph/pts_LineGraph.php phoronix-test-suite/pts-core/objects/pts_Graph/pts_LineGraph.php
                        --- phoronix-test-suite.orig/pts-core/objects/pts_Graph/pts_LineGraph.php    2013-08-01 21:58:25.000000000 -0500
                        +++ phoronix-test-suite/pts-core/objects/pts_Graph/pts_LineGraph.php    2013-08-01 22:16:54.451820757 -0500
                        @@ -3,8 +3,8 @@
                         /*
                             Phoronix Test Suite
                             URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
                        -    Copyright (C) 2008 - 2012, Phoronix Media
                        -    Copyright (C) 2008 - 2012, Michael Larabel
                        +    Copyright (C) 2008 - 2013, Phoronix Media
                        +    Copyright (C) 2008 - 2013, Michael Larabel
                             pts_LineGraph.php: The line graph object that extends pts_Graph.php.
                         
                             This program is free software; you can redistribute it and/or modify
                        @@ -115,6 +115,27 @@
                                     }
                                 }
                             }
                        +    protected function get_special_paint_color($identifier)
                        +    {
                        +        // For now to try to improve the color handling of line graphs, first try to use a pre-defined pool of colors until falling back to the old color code once exhausted
                        +        // Thanks to ua=42 in the Phoronix Forums for the latest attempt at improving the automated color handling
                        +        static $line_color_cache = null;
                        +        static $predef_line_colors = array('#000000', '#FFB300', '#803E75', '#FF6800', '#A6BDD7', '#C10020', '#CEA262', '#817066', '#007D34', '#F6768E', '#00538A', '#FF7A5C', '#53377A', '#FF8E00', '#B32851', '#F4C800', '#7F180D', '#93AA00', '#593315', '#F13A13', '#232C16');
                        +
                        +        if(!isset($line_color_cache[$identifier]))
                        +        {
                        +            if(!empty($predef_line_colors))
                        +            {
                        +                $line_color_cache[$identifier] = array_shift($predef_line_colors);
                        +            }
                        +            else
                        +            {
                        +                $line_color_cache[$identifier] = $this->get_paint_color($identifier);
                        +            }
                        +        }
                        +
                        +        return $line_color_cache[$identifier];
                        +    }
                             protected function renderGraphLines()
                             {
                                 $calculations_r = array();
                        @@ -124,7 +145,7 @@
                         
                                 foreach(array_keys($this->graph_data) as $i_o)
                                 {
                        -            $paint_color = $this->get_paint_color((isset($this->graph_data_title[$i_o]) ? $this->graph_data_title[$i_o] : null));
                        +            $paint_color = $this->get_special_paint_color((isset($this->graph_data_title[$i_o]) ? $this->graph_data_title[$i_o] : null));
                                     $calculations_r[$paint_color] = array();
                         
                                     $point_counter = count($this->graph_data[$i_o]);
                        Michael Larabel
                        http://www.michaellarabel.com/

                        Comment


                        • #42
                          Hmmmm.

                          Good point, I would suggest the following changes to it then.



                          Code:
                          if(count($this->graph_data_title)<11){  // I think this is how you tell how many lines there are.  Please change if I picked the wrong variable to count. 
                            $predef_line_colors = array('#000000', '#0000FF', '#FF0000', '#00FF00', '#FFFF00', '#FF00FF', '#FF8080', '#808080', '#800000', '#FF8000');
                          }
                          else{
                            $predef_line_colors = array('#000000', '#803E75', '#007D34', '#FF6800','#C10020', '#00538A', '#FFB300', '#93AA00', '#CEA262', '#53377A', '#817066', '#B32851', '#7F180D',   '#232C16'',  '#593315', '#F13A13',   '#FF8E00',   '#007D34', '#F4C800', '#F6768E',  '#FF7A5C', "#A6BDD7');
                          }
                          Also, I rearranged the color table so that the darker values are first, so that the easier to read colors are used first.
                          Last edited by ua=42; 08-02-2013, 09:27 AM. Reason: spelling/ grammer

                          Comment


                          • #43
                            Originally posted by Gabrielbyrnei View Post
                            I get a totally unstable system when booting on 3.11 rc3.

                            At the instant i run folding@home, system hangs but my mouse is still alive.
                            When choosing 3.10.3 and doing the same thing it works fine.

                            AMD Athlon II x4 630
                            ATI 4850


                            I did download the updated firmware RV770_smc.bin from http://people.freedesktop.org/~agd5f/radeon_ucode/

                            Now on /lib/firmware/radeon i have 3 firmware files for my card:

                            RV770_me.bin
                            RV770_pfp.bin
                            RV770_smc.bin

                            On the link theres only the _smc.bin file, so maybe i only need smc and not the me and pfp?

                            This is all on openSUSE 12.3, kernel 3.11-rc3 from Kernel:HEAD repository and Mesa 9.2 git
                            RV770_smc.bin is the only new ucode you need for dpm, however you still need all of the old ucode images (me, pfp, rlc). As usual, make sure your initird has the new ucode images if you are using one or if you are building the driver into the kernel, make sure you build all of the ucode images into the kernel as well.

                            Comment


                            • #44
                              Originally posted by agd5f View Post
                              RV770_smc.bin is the only new ucode you need for dpm, however you still need all of the old ucode images (me, pfp, rlc). As usual, make sure your initird has the new ucode images if you are using one or if you are building the driver into the kernel, make sure you build all of the ucode images into the kernel as well.
                              What do those letters stand for, anyway? With all the new microcode, it's hard to keep track of which does what...

                              Comment


                              • #45
                                Originally posted by GreatEmerald View Post
                                What do those letters stand for, anyway? With all the new microcode, it's hard to keep track of which does what...
                                SMC = System Management Controller
                                Handles power management

                                CP = Command Processor
                                Multiple sub blocks (ME, PFP, CE, MEC)
                                Handles 3D and compute command processing

                                RLC = Run List Controller
                                Handles misc stuff on the GPU (interrupts, etc.)

                                UVD = Universal Video Decoder
                                Handles video decoding

                                MC = Memory Controller
                                GDDR memory controller

                                Comment

                                Working...
                                X