Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 13, 2024 at 9:33 PM Lee, Peyton <Peyton.Lee@xxxxxxx> wrote:
>
> [AMD Official Use Only - General]
>
> Hi Alex,
>
> There are two places where VPE will lose power: When there is a system call to vpe_hw_fini(), and the vpe-thread finds that VEP has no jobs in the queue.
> This patch is to make sure that VPE is power up before loading firmware.

I think it will continue to be powered up until a VPE job comes in and
completes and the idle handler gets scheduled.  If a VPE job doesn't
come in, it will stay powered up I think.

Alex

>
> Thanks,
> Peyton
> -----原始郵件-----
> 寄件者: Alex Deucher <alexdeucher@xxxxxxxxx>
> 寄件日期: Wednesday, March 13, 2024 9:17 PM
> 收件者: Lee, Peyton <Peyton.Lee@xxxxxxx>
> 副本: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Zhang, Yifan <Yifan1.Zhang@xxxxxxx>; Ma, Li <Li.Ma@xxxxxxx>; Yu, Lang <Lang.Yu@xxxxxxx>
> 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
>
> On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@xxxxxxx> wrote:
> >
> > To fix mode2 reset failure.
> > Should power on VPE when hw_init.
>
> When does it get powered down again?  Won't this leave it powered up?
>
> Alex
>
> >
> > Signed-off-by: Peyton Lee <peytolee@xxxxxxx>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
> > index 70c5cc80ecdc..ecfe0f36e83e 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
> > @@ -396,6 +396,12 @@ static int vpe_hw_init(void *handle)
> >         struct amdgpu_vpe *vpe = &adev->vpe;
> >         int ret;
> >
> > +       /* Power on VPE */
> > +       ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VPE,
> > +                                                    AMD_PG_STATE_UNGATE);
> > +       if (ret)
> > +               return ret;
> > +
> >         ret = vpe_load_microcode(vpe);
> >         if (ret)
> >                 return ret;
> > --
> > 2.34.1
> >




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux