<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Is the switching automatically by driver or manually by user?</p>
    <p><br>
    </p>
    <p>Regards,</p>
    <p>Eric<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 2018-02-08 11:54 AM, Zhu, Rex wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CY4PR12MB168768111AC1FCBB4D0C8E72FBF30@CY4PR12MB1687.namprd12.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
        dir="ltr">
        <p style="margin-top:0;margin-bottom:0"><span
            style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;">>In
            case of compute, we have auto switching mechanism. when
            compute ring is coming, it switches to the default compute
            profile or user set profile, >and switches back when it's
            done. So VR should be doing the same thing with compute.
            Auto wattman will be disabled when profile auto switching
            >happens.</span><br>
        </p>
        <p style="margin-top:0;margin-bottom:0"><span
            style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
          </span></p>
        <p style="margin-top:0;margin-bottom:0"><span
            style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;">Rex:
            Ok, the logic is same.</span></p>
        <p style="margin-top:0;margin-bottom:0"><span
            style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;"> </span></p>
        <p style="margin-top:0;margin-bottom:0"><span
            style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;"></span><span
            style="font-size: 12pt;">when computer ring begins,  set
            manual dpm mode(pp do nothing except <span
              style="font-family: Calibri, Helvetica, sans-serif,
              EmojiFont, "Apple Color Emoji", "Segoe UI
              Emoji", NotoColorEmoji, "Segoe UI Symbol",
              "Android Emoji", EmojiSymbols; font-size: 16px;">disable
              auto wattman feature), and set compute profile or  custom
              profile.</span></span></p>
        <p style="margin-top:0;margin-bottom:0"><span style="font-size:
            12pt;"><span style="font-family: Calibri, Helvetica,
              sans-serif, EmojiFont, "Apple Color Emoji",
              "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
              Symbol", "Android Emoji", EmojiSymbols;
              font-size: 16px;">set clock range. and set auto dpm mode,
              switch back</span></span></p>
        <p style="margin-top:0;margin-bottom:0"><span style="font-size:
            12pt;"><span style="font-family: Calibri, Helvetica,
              sans-serif, EmojiFont, "Apple Color Emoji",
              "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
              Symbol", "Android Emoji", EmojiSymbols;
              font-size: 16px;"><br>
            </span></span></p>
        <p style="margin-top:0;margin-bottom:0"><span style="font-size:
            12pt;"><span style="font-family: Calibri, Helvetica,
              sans-serif, EmojiFont, "Apple Color Emoji",
              "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
              Symbol", "Android Emoji", EmojiSymbols;
              font-size: 16px;">Best Regards</span></span></p>
        <p style="margin-top:0;margin-bottom:0"><span style="font-size:
            12pt;"><span style="font-family: Calibri, Helvetica,
              sans-serif, EmojiFont, "Apple Color Emoji",
              "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
              Symbol", "Android Emoji", EmojiSymbols;
              font-size: 16px;">Rex</span></span></p>
        <p style="margin-top:0;margin-bottom:0"><span style="font-size:
            12pt;"><span style="font-family: Calibri, Helvetica,
              sans-serif, EmojiFont, "Apple Color Emoji",
              "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
              Symbol", "Android Emoji", EmojiSymbols;
              font-size: 16px;"><br>
            </span></span></p>
        <p style="margin-top:0;margin-bottom:0"><span style="font-size:
            12pt;"><span style="font-family: Calibri, Helvetica,
              sans-serif, EmojiFont, "Apple Color Emoji",
              "Segoe UI Emoji", NotoColorEmoji, "Segoe UI
              Symbol", "Android Emoji", EmojiSymbols;
              font-size: 16px;"> </span></span></p>
        <br>
        <br>
        <div style="color: rgb(0, 0, 0);">
          <hr style="display:inline-block;width:98%" tabindex="-1">
          <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
              face="Calibri, sans-serif" color="#000000"><b>From:</b>
              amd-gfx <a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org"><amd-gfx-bounces@lists.freedesktop.org></a> on
              behalf of Eric Huang <a class="moz-txt-link-rfc2396E" href="mailto:jinhuieric.huang@amd.com"><jinhuieric.huang@amd.com></a><br>
              <b>Sent:</b> Friday, February 9, 2018 12:47 AM<br>
              <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
              <b>Subject:</b> Re: [PATCH 10/10] drm/amd/pp: Enable auto
              automan feature on Polaris</font>
            <div> </div>
          </div>
          <div style="background-color:#FFFFFF">
            <p><br>
            </p>
            <br>
            <div class="x_moz-cite-prefix">On 2018-02-08 11:35 AM, Zhu,
              Rex wrote:<br>
            </div>
            <blockquote type="cite">
              <div id="x_divtagdefaultwrapper" dir="ltr"
                style="font-size:12pt; color:#000000;
                font-family:Calibri,Helvetica,sans-serif">
                <p style="margin-top:0; margin-bottom:0"><span style="">>But
                    in auto mode, we may want to force a particular
                    profile within the</span><br style="">
                  <span style=""><span style="">></span>driver for a
                    specific use case.  E.g., for VR, we may want to
                    select</span><br style="">
                  <span style=""><span style="">></span>the VR
                    profile when the user sets the priority to high in
                    the context</span><br style="">
                  <span style=""><span style="">></span>ioctl, and
                    then switch it back to autowattman or the default
                    profile</span><br style="">
                  <span style=""><span style="">></span>when the
                    context if freed or the priority is changes.  We may
                    want to</span><br style="">
                  <span style=""><span style="">></span>do something
                    similar for video when the user submits work to the</span><br
                    style="">
                  <span style=""><span style="">></span>multi-media
                    engines. </span><br>
                </p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style="">>  I guess it should just be</span><br
                      style="">
                    <span style="">>a matter of disabling autowattman
                      and switching to a profile when the</span><br
                      style="">
                    <span style="">>driver needs it and then
                      switching back when it's done.</span><br>
                  </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style=""><br>
                    </span></span></p>
                <p style="margin-top:0; margin-bottom:0"><span style="">Rex: </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""> 
                           For MM, we can disable auto wattman (if
                    enabled), and set video profile mode when enable
                    uvd/vce dpm on smu7.</span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""> 
                          restore to default when disable uvd/vce dpm
                    when engine idle.</span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""> </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style="">         VR, may be similar to compute
                      case Eric have </span><span style="">implemented, </span></span><span
                    style="font-size:14.6667px">need user ctrl through
                    sysfs.</span></p>
              </div>
            </blockquote>
            <br>
            In case of compute, we have auto switching mechanism. when
            compute ring is coming, it switches to the default compute
            profile or user set profile, and switches back when it's
            done. So VR should be doing the same thing with compute.
            Auto wattman will be disabled when profile auto switching
            happens.<br>
            <br>
            Regards,<br>
            Eric<br>
            <span style=""><span style="">       <br>
              </span></span>
            <blockquote type="cite">
              <div id="x_divtagdefaultwrapper" dir="ltr"
                style="font-size:12pt; color:#000000;
                font-family:Calibri,Helvetica,sans-serif">
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style="">           Enter manual dpm mode(driver
                      disable auto wattman), and select prefered profile
                      mode, set sclk/mclk range(smu7).</span></span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style="">            when enter auto dpm mode,
                      restore default value. </span></span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><br>
                  </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style="">>It's possible autowattman will
                      perform ok and we</span><br style="">
                    <span style="">>don't need to manually change the
                      profile in the driver, but we'll</span><br
                      style="">
                    <span style="">>have to do some profiling to
                      sorhat out. </span>       </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><br>
                  </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style="">Rex:
                    Idealy, if autowan feature enabled, the proflling
                    mode should be adjusted based on workload with
                     some time delay caused by the work queue.</span></p>
                <p style="margin-top:0; margin-bottom:0"><span style="">But
                    need some time to verify.</span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><br>
                  </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style="">Best
                    Regards</span></p>
                <p style="margin-top:0; margin-bottom:0"><span style="">Rex</span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><br>
                  </span></p>
                <p style="margin-top:0; margin-bottom:0"><span style=""><span
                      style=""> </span><br>
                  </span></p>
                <div style="color:rgb(0,0,0)">
                  <hr tabindex="-1" style="display:inline-block;
                    width:98%">
                  <div id="x_divRplyFwdMsg" dir="ltr"><font
                      style="font-size:11pt" face="Calibri, sans-serif"
                      color="#000000"><b>From:</b> Alex Deucher
                      <a class="x_moz-txt-link-rfc2396E"
                        href="mailto:alexdeucher@gmail.com"
                        moz-do-not-send="true"><alexdeucher@gmail.com></a><br>
                      <b>Sent:</b> Thursday, February 8, 2018 11:28 PM<br>
                      <b>To:</b> Zhu, Rex<br>
                      <b>Cc:</b> amd-gfx list<br>
                      <b>Subject:</b> Re: [PATCH 10/10] drm/amd/pp:
                      Enable auto automan feature on Polaris</font>
                    <div> </div>
                  </div>
                  <div class="x_BodyFragment"><font size="2"><span
                        style="font-size:11pt">
                        <div class="x_PlainText">On Thu, Feb 8, 2018 at
                          10:14 AM, Zhu, Rex <a
                            class="x_moz-txt-link-rfc2396E"
                            href="mailto:Rex.Zhu@amd.com"
                            moz-do-not-send="true">
                            <Rex.Zhu@amd.com></a> wrote:<br>
                          > if user select manual dpm mode,we will
                          disabe autowattman.<br>
                          > When switch to auto, we will restart the
                          auto wattman on Polaris,<br>
                          > Restore to default profile mode on other
                          ASICS.<br>
                          ><br>
                          <br>
                          But in auto mode, we may want to force a
                          particular profile within the<br>
                          driver for a specific use case.  E.g., for VR,
                          we may want to select<br>
                          the VR profile when the user sets the priority
                          to high in the context<br>
                          ioctl, and then switch it back to autowattman
                          or the default profile<br>
                          when the context if freed or the priority is
                          changes.  We may want to<br>
                          do something similar for video when the user
                          submits work to the<br>
                          multi-media engines.  It's possible
                          autowattman will perform ok and we<br>
                          don't need to manually change the profile in
                          the driver, but we'll<br>
                          have to do some profiling to sort that out.  I
                          guess it should just be<br>
                          a matter of disabling autowattman and
                          switching to a profile when the<br>
                          driver needs it and then switching back when
                          it's done.<br>
                          <br>
                          Alex<br>
                          <br>
                          ><br>
                          > Best Regards<br>
                          > Rex<br>
                          > ________________________________<br>
                          > From: Alex Deucher <a
                            class="x_moz-txt-link-rfc2396E"
                            href="mailto:alexdeucher@gmail.com"
                            moz-do-not-send="true">
                            <alexdeucher@gmail.com></a><br>
                          > Sent: Thursday, February 8, 2018 11:02:21
                          PM<br>
                          > To: Zhu, Rex<br>
                          > Cc: amd-gfx list<br>
                          > Subject: Re: [PATCH 10/10] drm/amd/pp:
                          Enable auto automan feature on<br>
                          > Polaris<br>
                          ><br>
                          > On Thu, Feb 8, 2018 at 4:14 AM, Rex Zhu <a
                            class="x_moz-txt-link-rfc2396E"
                            href="mailto:Rex.Zhu@amd.com"
                            moz-do-not-send="true">
                            <Rex.Zhu@amd.com></a> wrote:<br>
                          >> Change-Id:
                          I69b24ce65ddb361a89e5ac9b197ae6df9b60a9e5<br>
                          >> Signed-off-by: Rex Zhu <a
                            class="x_moz-txt-link-rfc2396E"
                            href="mailto:Rex.Zhu@amd.com"
                            moz-do-not-send="true">
                            <Rex.Zhu@amd.com></a><br>
                          ><br>
                          > Would be good to give a brief description
                          of what autowattman actually<br>
                          > does in the patch description.  Also, we
                          may need to manually select a<br>
                          > profile in some cases (e.g., VR).  Would
                          that be a problem with<br>
                          > autowattman?<br>
                          ><br>
                          > Alex<br>
                          ><br>
                          >> ---<br>
                          >> 
                          drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c |
                          4 ++++<br>
                          >>  1 file changed, 4 insertions(+)<br>
                          >><br>
                          >> diff --git
                          a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
                          >>
                          b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
                          >> index f50b6cd..549e830 100644<br>
                          >> ---
                          a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
                          >> +++
                          b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
                          >> @@ -1023,6 +1023,10 @@ int
                          polaris_set_asic_special_caps(struct pp_hwmgr<br>
                          >> *hwmgr)<br>
                          >>                
                          phm_cap_set(hwmgr->platform_descriptor.platformCaps,<br>
                          >><br>
                          >> PHM_PlatformCaps_TCPRamping);<br>
                          >>         }<br>
                          >> +<br>
                          >> +       if (hwmgr->feature_mask
                          & PP_AUTOWATTMAN_MASK)<br>
                          >> +              
                          hwmgr->autowattman_enabled = true; /*
                          currently only<br>
                          >> enabled on polaris */<br>
                          >> +<br>
                          >>         return 0;<br>
                          >>  }<br>
                          >><br>
                          >> --<br>
                          >> 1.9.1<br>
                          >><br>
                          >>
                          _______________________________________________<br>
                          >> amd-gfx mailing list<br>
                          >> <a
                            class="x_moz-txt-link-abbreviated"
                            href="mailto:amd-gfx@lists.freedesktop.org"
                            moz-do-not-send="true">
                            amd-gfx@lists.freedesktop.org</a><br>
                          >> <a
                            href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
                            id="LPlnk701098" previewremoved="true"
                            moz-do-not-send="true">
https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
                          <div
                            id="LPBorder_GT_15181063864470.00843799685583213"
                            style="margin-bottom:20px; overflow:auto;
                            width:100%; text-indent:0px"
                            contenteditable="false">
                            <table
                              id="LPContainer_15181063864440.7826349524682992"
                              style="width:90%;
                              background-color:rgb(255,255,255);
                              overflow:auto; padding-top:20px;
                              padding-bottom:20px; margin-top:20px;
                              border-top:1px dotted rgb(200,200,200);
                              border-bottom:1px dotted rgb(200,200,200)"
                              cellspacing="0">
                              <tbody>
                                <tr style="border-spacing:0px"
                                  valign="top">
                                  <td
                                    id="x_TextCell_15181063864450.20973627117231164"
                                    colspan="2"
                                    style="vertical-align:top;
                                    padding:0px; display:table-cell">
                                    <div
                                      id="LPTitle_15181063864450.5421321631930409"
                                      style=""><a
                                        id="LPUrlAnchor_15181063864460.047752596355657095"
href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
                                        target="_blank"
                                        style="text-decoration:none"
                                        moz-do-not-send="true">amd-gfx
                                        Info Page - freedesktop.org</a></div>
                                    <div
                                      id="LPMetadata_15181063864460.030891965966879598"
                                      style="">lists.freedesktop.org</div>
                                    <div
                                      id="LPDescription_15181063864460.8458243757989772"
                                      style="">Subscribing to amd-gfx:
                                      Subscribe to amd-gfx by filling
                                      out the following form. Use of all
                                      freedesktop.org lists is subject
                                      to our Code of ...</div>
                                  </td>
                                </tr>
                              </tbody>
                            </table>
                          </div>
                          <br>
                          <br>
                        </div>
                      </span></font></div>
                </div>
              </div>
              <br>
              <fieldset class="x_mimeAttachmentHeader"></fieldset>
              <br>
              <pre>_______________________________________________
amd-gfx mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a>
<a class="x_moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
            </blockquote>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>