<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 07/26/2017 10:44 PM, Deucher,
      Alexander wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BN6PR12MB1652D771EA8F795335E7372DF7BE0@BN6PR12MB1652.namprd12.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from text -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <font size="2"><span style="font-size:10pt;">
          <div class="PlainText">> -----Original Message-----<br>
            > From: amd-gfx [<a
              href="mailto:amd-gfx-bounces@lists.freedesktop.org"
              moz-do-not-send="true">mailto:amd-gfx-bounces@lists.freedesktop.org</a>]
            On Behalf<br>
            > Of Leo Liu<br>
            > Sent: Wednesday, July 26, 2017 3:08 PM<br>
            > To: <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
            > Cc: Liu, Leo<br>
            > Subject: [PATCH] drm/amdgpu: remove unused power
            control for vcn<br>
            > <br>
            > The power control for vcn has been moved to firmware,
            kernel'll spins<br>
            > "amdgpu: [powerplay] pp_dpm_powergate_uvd was not
            implemented",<br>
            > each<br>
            > time when application runs, so let's remove it.<br>
            > <br>
            > Signed-off-by: Leo Liu <a class="moz-txt-link-rfc2396E" href="mailto:leo.liu@amd.com"><leo.liu@amd.com></a><br>
            <br>
            Does firmware cover powergating/clockgating as well or just
            dpm? <br>
          </div>
        </span></font></blockquote>
    No. dpm only.<br>
    <br>
    <blockquote type="cite"
cite="mid:BN6PR12MB1652D771EA8F795335E7372DF7BE0@BN6PR12MB1652.namprd12.prod.outlook.com"><font
        size="2"><span style="font-size:10pt;">
          <div class="PlainText"> I think we may still need to handle
            clock and powergating  manually.<br>
          </div>
        </span></font></blockquote>
    I will keep the function and comment it out till pg/cg, since it's
    annoying to spin that error message.<br>
    <br>
    The new patch will follow shortly.<br>
    <br>
    Leo<br>
    <br>
    <blockquote type="cite"
cite="mid:BN6PR12MB1652D771EA8F795335E7372DF7BE0@BN6PR12MB1652.namprd12.prod.outlook.com"><font
        size="2"><span style="font-size:10pt;">
          <div class="PlainText">
            <br>
            Alex<br>
            <br>
            > ---<br>
            >  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 23
            +----------------------<br>
            >  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h |  1 -<br>
            >  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c   |  4 ++--<br>
            >  3 files changed, 3 insertions(+), 25 deletions(-)<br>
            > <br>
            > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
            > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
            > index 09190fa..4186f45 100644<br>
            > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
            > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
            > @@ -207,29 +207,8 @@ static void
            amdgpu_vcn_idle_work_handler(struct<br>
            > work_struct *work)<br>
            >                container_of(work, struct amdgpu_device,<br>
            > vcn.idle_work.work);<br>
            >        unsigned fences =
            amdgpu_fence_count_emitted(&adev-<br>
            > >vcn.ring_dec);<br>
            > <br>
            > -     if (fences == 0) {<br>
            > -             if (adev->pm.dpm_enabled) {<br>
            > -                     amdgpu_dpm_enable_uvd(adev,
            false);<br>
            > -             } else {<br>
            > -                     amdgpu_asic_set_uvd_clocks(adev,
            0, 0);<br>
            > -             }<br>
            > -     } else {<br>
            > +     if (fences != 0)<br>
            >               
            schedule_delayed_work(&adev->vcn.idle_work,<br>
            > VCN_IDLE_TIMEOUT);<br>
            > -     }<br>
            > -}<br>
            > -<br>
            > -void amdgpu_vcn_ring_begin_use(struct amdgpu_ring
            *ring)<br>
            > -{<br>
            > -     struct amdgpu_device *adev = ring->adev;<br>
            > -     bool set_clocks =
            !cancel_delayed_work_sync(&adev-<br>
            > >vcn.idle_work);<br>
            > -<br>
            > -     if (set_clocks) {<br>
            > -             if (adev->pm.dpm_enabled) {<br>
            > -                     amdgpu_dpm_enable_uvd(adev,
            true);<br>
            > -             } else {<br>
            > -                     amdgpu_asic_set_uvd_clocks(adev,
            53300, 40000);<br>
            > -             }<br>
            > -     }<br>
            >  }<br>
            > <br>
            >  void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring)<br>
            > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h<br>
            > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h<br>
            > index d50ba06..930903d 100644<br>
            > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h<br>
            > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h<br>
            > @@ -65,7 +65,6 @@ int amdgpu_vcn_sw_init(struct
            amdgpu_device *adev);<br>
            >  int amdgpu_vcn_sw_fini(struct amdgpu_device *adev);<br>
            >  int amdgpu_vcn_suspend(struct amdgpu_device *adev);<br>
            >  int amdgpu_vcn_resume(struct amdgpu_device *adev);<br>
            > -void amdgpu_vcn_ring_begin_use(struct amdgpu_ring
            *ring);<br>
            >  void amdgpu_vcn_ring_end_use(struct amdgpu_ring
            *ring);<br>
            > <br>
            >  int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring
            *ring);<br>
            > diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
            > b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
            > index 21e7b88..94814f0 100644<br>
            > --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
            > +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
            > @@ -1122,7 +1122,7 @@ static const struct
            amdgpu_ring_funcs<br>
            > vcn_v1_0_dec_ring_vm_funcs = {<br>
            >        .insert_start = vcn_v1_0_dec_ring_insert_start,<br>
            >        .insert_end = vcn_v1_0_dec_ring_insert_end,<br>
            >        .pad_ib = amdgpu_ring_generic_pad_ib,<br>
            > -     .begin_use = amdgpu_vcn_ring_begin_use,<br>
            > +     .begin_use = NULL,<br>
            >        .end_use = amdgpu_vcn_ring_end_use,<br>
            >  };<br>
            > <br>
            > @@ -1148,7 +1148,7 @@ static const struct
            amdgpu_ring_funcs<br>
            > vcn_v1_0_enc_ring_vm_funcs = {<br>
            >        .insert_nop = amdgpu_ring_insert_nop,<br>
            >        .insert_end = vcn_v1_0_enc_ring_insert_end,<br>
            >        .pad_ib = amdgpu_ring_generic_pad_ib,<br>
            > -     .begin_use = amdgpu_vcn_ring_begin_use,<br>
            > +     .begin_use = NULL,<br>
            >        .end_use = amdgpu_vcn_ring_end_use,<br>
            >  };<br>
            > <br>
            > --<br>
            > 2.7.4<br>
            > <br>
            > _______________________________________________<br>
            > amd-gfx mailing list<br>
            > <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
            > <a
              href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
              moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
          </div>
        </span></font>
    </blockquote>
    <br>
  </body>
</html>