]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: remove superflous UVD encode entity
authorChristian König <christian.koenig@amd.com>
Wed, 18 Jul 2018 18:28:08 +0000 (20:28 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Jul 2018 18:56:44 +0000 (13:56 -0500)
Not sure what that was every used for, but now it is completely unused.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.h
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c

index 8b23a1b00c76c95cf2b12c8aff1440415b059560..cae3f526216b625159b6f07c506decfa13b58db2 100644 (file)
@@ -48,7 +48,6 @@ struct amdgpu_uvd_inst {
        struct amdgpu_ring      ring_enc[AMDGPU_MAX_UVD_ENC_RINGS];
        struct amdgpu_irq_src   irq;
        struct drm_sched_entity entity;
-       struct drm_sched_entity entity_enc;
        uint32_t                srbm_soft_reset;
 };
 
index b796dc8375cd1d0a8e36a66f3ee17762d7a202c1..598dbeaba63686e2e2476528adace86d035b3f70 100644 (file)
@@ -418,16 +418,6 @@ static int uvd_v6_0_sw_init(void *handle)
                adev->uvd.num_enc_rings = 0;
 
                DRM_INFO("UVD ENC is disabled\n");
-       } else {
-               struct drm_sched_rq *rq;
-               ring = &adev->uvd.inst->ring_enc[0];
-               rq = &ring->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL];
-               r = drm_sched_entity_init(&adev->uvd.inst->entity_enc,
-                                         &rq, 1, NULL);
-               if (r) {
-                       DRM_ERROR("Failed setting up UVD ENC run queue.\n");
-                       return r;
-               }
        }
 
        r = amdgpu_uvd_resume(adev);
@@ -463,8 +453,6 @@ static int uvd_v6_0_sw_fini(void *handle)
                return r;
 
        if (uvd_v6_0_enc_support(adev)) {
-               drm_sched_entity_destroy(&adev->uvd.inst->ring_enc[0].sched, &adev->uvd.inst->entity_enc);
-
                for (i = 0; i < adev->uvd.num_enc_rings; ++i)
                        amdgpu_ring_fini(&adev->uvd.inst->ring_enc[i]);
        }
index 831bb995b0ed9d927b83dcf4eb13fefeb6413426..db5f3d78ab12aff3d5f9d70af6fc43b658594c8f 100644 (file)
@@ -389,7 +389,6 @@ static int uvd_v7_0_early_init(void *handle)
 static int uvd_v7_0_sw_init(void *handle)
 {
        struct amdgpu_ring *ring;
-       struct drm_sched_rq *rq;
        int i, j, r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
@@ -421,17 +420,6 @@ static int uvd_v7_0_sw_init(void *handle)
                DRM_INFO("PSP loading UVD firmware\n");
        }
 
-       for (j = 0; j < adev->uvd.num_uvd_inst; j++) {
-               ring = &adev->uvd.inst[j].ring_enc[0];
-               rq = &ring->sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL];
-               r = drm_sched_entity_init(&adev->uvd.inst[j].entity_enc,
-                                         &rq, 1, NULL);
-               if (r) {
-                       DRM_ERROR("(%d)Failed setting up UVD ENC run queue.\n", j);
-                       return r;
-               }
-       }
-
        r = amdgpu_uvd_resume(adev);
        if (r)
                return r;
@@ -484,8 +472,6 @@ static int uvd_v7_0_sw_fini(void *handle)
                return r;
 
        for (j = 0; j < adev->uvd.num_uvd_inst; ++j) {
-               drm_sched_entity_destroy(&adev->uvd.inst[j].ring_enc[0].sched, &adev->uvd.inst[j].entity_enc);
-
                for (i = 0; i < adev->uvd.num_enc_rings; ++i)
                        amdgpu_ring_fini(&adev->uvd.inst[j].ring_enc[i]);
        }