JPEG1.0 will be functional along with VCN1.0

Signed-off-by: Leo Liu <leo....@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 +++-----
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 6614d8a6f4c8..8f2eea92d67c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -169,10 +169,10 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
                        }
                        break;
                case AMDGPU_HW_IP_VCN_JPEG:
-                       for (j = 0; j < adev->vcn.num_vcn_inst; ++j) {
+                       for (j = 0; j < adev->jpeg.num_jpeg_inst; ++j) {
                                if (adev->vcn.harvest_config & (1 << j))
                                        continue;
-                               rings[num_rings++] = 
&adev->vcn.inst[j].ring_jpeg;
+                               rings[num_rings++] = 
&adev->jpeg.inst[j].ring_dec;
                        }
                        break;
                }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 6ddea7607ad0..4a4085ec53e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -401,11 +401,11 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,
                break;
        case AMDGPU_HW_IP_VCN_JPEG:
                type = AMD_IP_BLOCK_TYPE_VCN;
-               for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
-                       if (adev->uvd.harvest_config & (1 << i))
+               for (i = 0; i < adev->jpeg.num_jpeg_inst; i++) {
+                       if (adev->jpeg.harvest_config & (1 << i))
                                continue;
 
-                       if (adev->vcn.inst[i].ring_jpeg.sched.ready)
+                       if (adev->jpeg.inst[i].ring_dec.sched.ready)
                                ++num_rings;
                }
                ib_start_alignment = 16;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 3199e4a5ff12..6b6c8f8efaff 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -212,8 +212,6 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)
 
                for (i = 0; i < adev->vcn.num_enc_rings; ++i)
                        amdgpu_ring_fini(&adev->vcn.inst[j].ring_enc[i]);
-
-               amdgpu_ring_fini(&adev->vcn.inst[j].ring_jpeg);
        }
 
        release_firmware(adev->vcn.fw);
@@ -306,7 +304,7 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct 
*work)
                        else
                                new_state.fw_based = VCN_DPG_STATE__UNPAUSE;
 
-                       if 
(amdgpu_fence_count_emitted(&adev->vcn.inst[j].ring_jpeg))
+                       if 
(amdgpu_fence_count_emitted(&adev->jpeg.inst[j].ring_dec))
                                new_state.jpeg = VCN_DPG_STATE__PAUSE;
                        else
                                new_state.jpeg = VCN_DPG_STATE__UNPAUSE;
@@ -314,7 +312,7 @@ static void amdgpu_vcn_idle_work_handler(struct work_struct 
*work)
                        adev->vcn.pause_dpg_mode(adev, &new_state);
                }
 
-               fence[j] += 
amdgpu_fence_count_emitted(&adev->vcn.inst[j].ring_jpeg);
+               fence[j] += 
amdgpu_fence_count_emitted(&adev->jpeg.inst[j].ring_dec);
                fence[j] += 
amdgpu_fence_count_emitted(&adev->vcn.inst[j].ring_dec);
                fences += fence[j];
        }
@@ -358,7 +356,7 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring)
                else
                        new_state.fw_based = VCN_DPG_STATE__UNPAUSE;
 
-               if 
(amdgpu_fence_count_emitted(&adev->vcn.inst[ring->me].ring_jpeg))
+               if 
(amdgpu_fence_count_emitted(&adev->jpeg.inst[ring->me].ring_dec))
                        new_state.jpeg = VCN_DPG_STATE__PAUSE;
                else
                        new_state.jpeg = VCN_DPG_STATE__UNPAUSE;
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to