<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <p>On 2/14/2022 10:54 AM, Liu, Monk wrote:
      <blockquote type="cite">
        
        <meta name="Generator" content="Microsoft Word 15 (filtered
          medium)">
        <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
        <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:"MS PGothic";
        panose-1:2 11 6 0 7 2 5 8 2 4;}@font-face
        {font-family:"\@MS PGothic";}@font-face
        {font-family:"Microsoft YaHei";
        panose-1:2 11 5 3 2 2 4 2 2 4;}@font-face
        {font-family:"\@Microsoft YaHei";}@font-face
        {font-family:-apple-system;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:JA;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}p.xxmsonormal, li.xxmsonormal, div.xxmsonormal
        {mso-style-name:x_x_msonormal;
        margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:JA;}p.xxxmsonormal, li.xxxmsonormal, div.xxxmsonormal
        {mso-style-name:x_x_xmsonormal;
        margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:JA;}p.xxxmsipheadera4477989, li.xxxmsipheadera4477989, div.xxxmsipheadera4477989
        {mso-style-name:x_x_xmsipheadera4477989;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:JA;}p.msipheadera4477989, li.msipheadera4477989, div.msipheadera4477989
        {mso-style-name:msipheadera4477989;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:JA;}span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
        <div class="WordSection1">
          <p class="msipheadera4477989" style="margin:0cm"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">[AMD
              Official Use Only]</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:12.0pt;font-family:"MS
              PGothic",sans-serif"><o:p> </o:p></span></p>
          <p class="MsoNormal">Reviewed-by: <a href="mailto:Monk.liu@amd" class="moz-txt-link-freetext">Monk.liu@amd</a>.com<o:p></o:p></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <div>
            <p class="MsoNormal">Thanks <o:p></o:p></p>
            <p class="MsoNormal">-------------------------------------------------------------------<o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:10.0pt">Monk Liu
                | <span style="color:red">
                  C</span>loud GPU & <span style="color:red">V</span>irtualization
                <span style="color:red">
                  S</span>olution | AMD<o:p></o:p></span></p>
            <o:p></o:p>
          </div>
          <o:p></o:p>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>
                                    <div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 1/24/2022 6:01 PM, Yiqing Yao wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20220124100122.1634569-1-yiqing.yao@amd.com">
      <pre class="moz-quote-pre" wrap="">[why]
pm sysfs should be writable in one VF mode as is in passthrough

[how]
do not remove write access on pm sysfs if device is in one VF mode

Fixes: 4436ea3c43a7 ("amdgpu/pm: Make sysfs pm attributes as read-only for VFs")
Signed-off-by: Yiqing Yao <a class="moz-txt-link-rfc2396E" href="mailto:yiqing.yao@amd.com"><yiqing.yao@amd.com></a>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 837a31a46596..5250032a2ffb 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -2006,8 +2006,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
                }
        }
 
-       /* setting should not be allowed from VF */
-       if (amdgpu_sriov_vf(adev)) {
+       /* setting should not be allowed from VF if not in one VF mode */
+       if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev)) {
                dev_attr->attr.mode &= ~S_IWUGO;
                dev_attr->store = NULL;
        }
</pre>
    </blockquote>
  </body>
</html>