From: Sonny Jiang <[email protected]>

Set up the default JPEG instance mask and related instance counts during
soc_v1_0 SOC configuration, before IP discovery is enabled.

Signed-off-by: Sonny Jiang <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c 
b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
index 37e2068b6fda..04c49e23d79b 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
@@ -854,6 +854,11 @@ int soc_v1_0_init_soc_config(struct amdgpu_device *adev)
        adev->vcn.inst_mask = 1;
        adev->vcn.num_vcn_inst = hweight32(adev->vcn.inst_mask);
 
+       adev->jpeg.harvest_config = 0;
+       adev->jpeg.num_inst_per_aid = 1;
+       adev->jpeg.inst_mask = 1;
+       adev->jpeg.num_jpeg_inst = hweight32(adev->jpeg.inst_mask);
+
        ret = soc_v1_0_xcp_mgr_init(adev);
        if (ret)
                return ret;
-- 
2.43.0

Reply via email to