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

Yu, Lang Lang.Yu at amd.com
Tue Mar 19 02:49:39 UTC 2024


[Public]

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

>-----Original Message-----
>From: Lee, Peyton <Peyton.Lee at amd.com>
>Sent: Wednesday, March 13, 2024 7:45 PM
>To: amd-gfx at lists.freedesktop.org
>Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Zhang, Yifan
><Yifan1.Zhang at amd.com>; Ma, Li <Li.Ma at amd.com>; Yu, Lang
><Lang.Yu at amd.com>; Lee, Peyton <Peyton.Lee at 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 at 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



More information about the amd-gfx mailing list