All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
@ 2024-03-13 11:44 Peyton Lee
  2024-03-13 13:17 ` Alex Deucher
  2024-03-19  2:49 ` Yu, Lang
  0 siblings, 2 replies; 8+ messages in thread
From: Peyton Lee @ 2024-03-13 11:44 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Yifan Zhang, Li Ma, Lang Yu, Peyton Lee

To fix mode2 reset failure.
Should power on VPE when hw_init.

Signed-off-by: Peyton Lee <peytolee@amd.com>
---
 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-13 11:44 [PATCH] drm/amdgpu/vpe: power on vpe when hw_init Peyton Lee
@ 2024-03-13 13:17 ` Alex Deucher
  2024-03-14  1:33   ` 回覆: " Lee, Peyton
  2024-03-19  2:49 ` Yu, Lang
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2024-03-13 13:17 UTC (permalink / raw)
  To: Peyton Lee; +Cc: amd-gfx, Alex Deucher, Yifan Zhang, Li Ma, Lang Yu

On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@amd.com> 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@amd.com>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* 回覆: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-13 13:17 ` Alex Deucher
@ 2024-03-14  1:33   ` Lee, Peyton
  2024-03-14 12:58     ` Alex Deucher
  0 siblings, 1 reply; 8+ messages in thread
From: Lee, Peyton @ 2024-03-14  1:33 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx, Deucher,  Alexander, Zhang, Yifan, Ma, Li, Yu, Lang

[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.

Thanks,
Peyton
-----原始郵件-----
寄件者: Alex Deucher <alexdeucher@gmail.com>
寄件日期: Wednesday, March 13, 2024 9:17 PM
收件者: Lee, Peyton <Peyton.Lee@amd.com>
副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init

On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@amd.com> 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@amd.com>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-14  1:33   ` 回覆: " Lee, Peyton
@ 2024-03-14 12:58     ` Alex Deucher
  2024-03-15  1:40       ` 回覆: " Lee, Peyton
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2024-03-14 12:58 UTC (permalink / raw)
  To: Lee, Peyton; +Cc: amd-gfx, Deucher, Alexander, Zhang, Yifan, Ma, Li, Yu, Lang

On Wed, Mar 13, 2024 at 9:33 PM Lee, Peyton <Peyton.Lee@amd.com> 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@gmail.com>
> 寄件日期: Wednesday, March 13, 2024 9:17 PM
> 收件者: Lee, Peyton <Peyton.Lee@amd.com>
> 副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
>
> On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@amd.com> 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@amd.com>
> > ---
> >  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
> >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* 回覆: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-14 12:58     ` Alex Deucher
@ 2024-03-15  1:40       ` Lee, Peyton
  2024-03-15 12:54         ` Alex Deucher
  0 siblings, 1 reply; 8+ messages in thread
From: Lee, Peyton @ 2024-03-15  1:40 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx, Deucher,  Alexander, Zhang, Yifan, Ma, Li, Yu, Lang

[AMD Official Use Only - General]

Hi Alex

> 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.
Yes, correct.
And after the VPE is called to do initialization, a simple test is executed for checking VPE status, and the idle handler gets scheduled to power off the VPE when the test finished.

Thanks,
Peyton

-----原始郵件-----
寄件者: Alex Deucher <alexdeucher@gmail.com>
寄件日期: Thursday, March 14, 2024 8:58 PM
收件者: Lee, Peyton <Peyton.Lee@amd.com>
副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init

On Wed, Mar 13, 2024 at 9:33 PM Lee, Peyton <Peyton.Lee@amd.com> 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@gmail.com>
> 寄件日期: Wednesday, March 13, 2024 9:17 PM
> 收件者: Lee, Peyton <Peyton.Lee@amd.com>
> 副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma,
> Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
>
> On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@amd.com> 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@amd.com>
> > ---
> >  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
> >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-15  1:40       ` 回覆: " Lee, Peyton
@ 2024-03-15 12:54         ` Alex Deucher
  2024-03-18  1:42           ` 回覆: " Lee, Peyton
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2024-03-15 12:54 UTC (permalink / raw)
  To: Lee, Peyton; +Cc: amd-gfx, Deucher, Alexander, Zhang, Yifan, Ma, Li, Yu, Lang

On Thu, Mar 14, 2024 at 9:40 PM Lee, Peyton <Peyton.Lee@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Hi Alex
>
> > 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.
> Yes, correct.
> And after the VPE is called to do initialization, a simple test is executed for checking VPE status, and the idle handler gets scheduled to power off the VPE when the test finished.

Does the IB test take care of this?  I just want to confirm that we
aren't leaving it powered up unless a user runs a VPE workload which
might not happen.

Alex


>
> Thanks,
> Peyton
>
> -----原始郵件-----
> 寄件者: Alex Deucher <alexdeucher@gmail.com>
> 寄件日期: Thursday, March 14, 2024 8:58 PM
> 收件者: Lee, Peyton <Peyton.Lee@amd.com>
> 副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
>
> On Wed, Mar 13, 2024 at 9:33 PM Lee, Peyton <Peyton.Lee@amd.com> 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@gmail.com>
> > 寄件日期: Wednesday, March 13, 2024 9:17 PM
> > 收件者: Lee, Peyton <Peyton.Lee@amd.com>
> > 副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> > <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma,
> > Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> > 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
> >
> > On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@amd.com> 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@amd.com>
> > > ---
> > >  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
> > >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* 回覆: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-15 12:54         ` Alex Deucher
@ 2024-03-18  1:42           ` Lee, Peyton
  0 siblings, 0 replies; 8+ messages in thread
From: Lee, Peyton @ 2024-03-18  1:42 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx, Deucher,  Alexander, Zhang, Yifan, Ma, Li, Yu, Lang

[AMD Official Use Only - General]

Hi Alex

> Does the IB test take care of this?  I just want to confirm that we aren't leaving it powered up unless a user runs a VPE workload which might not happen.

Yes, the IB test take care of this.
The flow is like this: amdgpu_device_gpu_recover->amdgpu_do_asic_reset->amdgpu_ib_ring_tests
Therefore, the idle thread is waked up and the VPE is powered off then.

Thanks,
Peyton

-----原始郵件-----
寄件者: Alex Deucher <alexdeucher@gmail.com>
寄件日期: Friday, March 15, 2024 8:55 PM
收件者: Lee, Peyton <Peyton.Lee@amd.com>
副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init

On Thu, Mar 14, 2024 at 9:40 PM Lee, Peyton <Peyton.Lee@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Hi Alex
>
> > 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.
> Yes, correct.
> And after the VPE is called to do initialization, a simple test is executed for checking VPE status, and the idle handler gets scheduled to power off the VPE when the test finished.

Does the IB test take care of this?  I just want to confirm that we aren't leaving it powered up unless a user runs a VPE workload which might not happen.

Alex


>
> Thanks,
> Peyton
>
> -----原始郵件-----
> 寄件者: Alex Deucher <alexdeucher@gmail.com>
> 寄件日期: Thursday, March 14, 2024 8:58 PM
> 收件者: Lee, Peyton <Peyton.Lee@amd.com>
> 副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma,
> Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
>
> On Wed, Mar 13, 2024 at 9:33 PM Lee, Peyton <Peyton.Lee@amd.com> 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@gmail.com>
> > 寄件日期: Wednesday, March 13, 2024 9:17 PM
> > 收件者: Lee, Peyton <Peyton.Lee@amd.com>
> > 副本: amd-gfx@lists.freedesktop.org; Deucher, Alexander
> > <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>;
> > Ma, Li <Li.Ma@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> > 主旨: Re: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
> >
> > On Wed, Mar 13, 2024 at 7:41 AM Peyton Lee <peytolee@amd.com> 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@amd.com>
> > > ---
> > >  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
> > >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
  2024-03-13 11:44 [PATCH] drm/amdgpu/vpe: power on vpe when hw_init Peyton Lee
  2024-03-13 13:17 ` Alex Deucher
@ 2024-03-19  2:49 ` Yu, Lang
  1 sibling, 0 replies; 8+ messages in thread
From: Yu, Lang @ 2024-03-19  2:49 UTC (permalink / raw)
  To: Lee, Peyton, amd-gfx; +Cc: Deucher, Alexander, Zhang, Yifan, Ma, Li

[Public]

Reviewed-by: Lang Yu <lang.yu@amd.com>

>-----Original Message-----
>From: Lee, Peyton <Peyton.Lee@amd.com>
>Sent: Wednesday, March 13, 2024 7:45 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan
><Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Yu, Lang
><Lang.Yu@amd.com>; Lee, Peyton <Peyton.Lee@amd.com>
>Subject: [PATCH] drm/amdgpu/vpe: power on vpe when hw_init
>
>To fix mode2 reset failure.
>Should power on VPE when hw_init.
>
>Signed-off-by: Peyton Lee <peytolee@amd.com>
>---
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-19  2:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 11:44 [PATCH] drm/amdgpu/vpe: power on vpe when hw_init Peyton Lee
2024-03-13 13:17 ` Alex Deucher
2024-03-14  1:33   ` 回覆: " Lee, Peyton
2024-03-14 12:58     ` Alex Deucher
2024-03-15  1:40       ` 回覆: " Lee, Peyton
2024-03-15 12:54         ` Alex Deucher
2024-03-18  1:42           ` 回覆: " Lee, Peyton
2024-03-19  2:49 ` Yu, Lang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.