[PATCH 4/4] drm/amdgpu: update amdgpu_ctx_init_entity

James Zhu James.Zhu at amd.com
Wed Sep 7 20:57:05 UTC 2022


update amdgpu_ctx_init_entity with new drm_sched_pick_best.

Signed-off-by: James Zhu <James.Zhu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 6ea8980c8ad7..3a1cb0a70392 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -201,7 +201,7 @@ static ktime_t amdgpu_ctx_entity_time(struct amdgpu_ctx *ctx,
 static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
 				  const u32 ring)
 {
-	struct drm_gpu_scheduler **scheds = NULL, *sched = NULL;
+	struct drm_gpu_scheduler **scheds = NULL;
 	struct amdgpu_device *adev = ctx->mgr->adev;
 	struct amdgpu_ctx_entity *entity;
 	enum drm_sched_priority drm_prio;
@@ -230,8 +230,7 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
 	    hw_ip == AMDGPU_HW_IP_VCN_DEC ||
 	    hw_ip == AMDGPU_HW_IP_UVD_ENC ||
 	    hw_ip == AMDGPU_HW_IP_UVD) {
-		sched = drm_sched_pick_best(scheds, num_scheds);
-		scheds = &sched;
+		scheds = drm_sched_pick_best(scheds, num_scheds);
 		num_scheds = 1;
 	}
 
-- 
2.25.1



More information about the dri-devel mailing list