Skip to contentSkip to conversation

drm/sched: Fix compilation issues with DRM priority rename

PATCH In review Luben Tuikov 2 participants 3 messages Nov 25, 2023 – Nov 29, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/sched: Fix compilation issues with DRM priority rename

Fix compilation issues with DRM scheduler priority rename MIN to LOW.

Cc Danilo Krummrich <[email protected]>
Cc Frank Binns <[email protected]>
Cc Donald Robson <[email protected]>
Cc Matt Coster <[email protected]>
Cc Direct Rendering Infrastructure - Development <[email protected]>
Fixes fe375c74806dbd ("drm/sched: Rename priority MIN to LOW")
Fixes 5f03a507b29e44 ("drm/nouveau: implement 1:1 scheduler - entity relationship")
---
 drivers/gpu/drm/imagination/pvr_queue.c | 2 +-
 drivers/gpu/drm/nouveau/nouveau_sched.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/imagination/pvr_queue.c +1 -1
index d65c3fbedf5ac4..5ed9c98fb599c8 100644
@@ -1292,7 +1292,7 @@ struct pvr_queue *pvr_queue_create(struct pvr_context *ctx,
 		goto err_release_ufo;
 
 	err = drm_sched_entity_init(&queue->entity,
-				    DRM_SCHED_PRIORITY_MIN,
+				    DRM_SCHED_PRIORITY_KERNEL,
 				    &sched, 1, &ctx->faulty);
 	if (err)
 		goto err_sched_fini;
drivers/gpu/drm/nouveau/nouveau_sched.c +3 -3
index 3393647bd94423..dd98f6910f9cab 100644
@@ -18,7 +18,7 @@
  * index to the run-queue array.
  */
 enum nouveau_sched_priority {
-	NOUVEAU_SCHED_PRIORITY_SINGLE = DRM_SCHED_PRIORITY_MIN,
+	NOUVEAU_SCHED_PRIORITY_SINGLE = DRM_SCHED_PRIORITY_KERNEL,
 	NOUVEAU_SCHED_PRIORITY_COUNT,
 };
 
@@ -423,7 +423,7 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
 	if (ret)
 		goto fail_wq;
 
-	/* Using DRM_SCHED_PRIORITY_MIN, since that's what we're required to use
+	/* Using DRM_SCHED_PRIORITY_KERNEL, since that's what we're required to use
 	 * when we want to have a single run-queue only.
 	 *
 	 * It's not documented, but one will find out when trying to use any
@@ -433,7 +433,7 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
 	 * Can't use NOUVEAU_SCHED_PRIORITY_SINGLE either, because it's not
 	 * matching the enum type used in drm_sched_entity_init().
 	 */
-	ret = drm_sched_entity_init(entity, DRM_SCHED_PRIORITY_MIN,
+	ret = drm_sched_entity_init(entity, DRM_SCHED_PRIORITY_KERNEL,
 				    &drm_sched, 1, NULL);
 	if (ret)
 		goto fail_sched;

base-commit: 38f922a563aac3148ac73e73689805917f034cb5

Signature · 1 line
2.43.0
#1 lore raw
Quoted 11 lines · Luben Tuikov

Fix compilation issues with DRM scheduler priority rename MIN to LOW.

Cc Danilo Krummrich <[email protected]>
Cc Frank Binns <[email protected]>
Cc Donald Robson <[email protected]>
Cc Matt Coster <[email protected]>
Cc Direct Rendering Infrastructure - Development <[email protected]>
Fixes fe375c74806dbd ("drm/sched: Rename priority MIN to LOW")
Fixes 38f922a563aac3 ("drm/sched: Reverse run-queue priority enumeration")
Quoted 2 lines
Fixes 5f03a507b29e44 ("drm/nouveau: implement 1:1 scheduler - entity relationship")

---

Added an additional Fixes tag as shown above, to complete the set.

Signature · 2 lines
Regards,
Luben
Tested-by on v1 1/1
#2 lore raw
In reply to Luben Tuikov

Hi Luben,

thanks for the patch!

Quoted 23 lines · Luben Tuikov

Fix compilation issues with DRM scheduler priority rename MIN to LOW.

Cc Danilo Krummrich <[email protected]>
Cc Frank Binns <[email protected]>
Cc Donald Robson <[email protected]>
Cc Matt Coster <[email protected]>
Cc Direct Rendering Infrastructure - Development <[email protected]>
Fixes fe375c74806dbd ("drm/sched: Rename priority MIN to LOW")
Fixes 5f03a507b29e44 ("drm/nouveau: implement 1:1 scheduler - entity relationship")

---
 drivers/gpu/drm/imagination/pvr_queue.c | 2 +- drivers/gpu/drm/nouveau/nouveau_sched.c | 6 +++---

 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/imagination/pvr_queue.c +0 -0
index d65c3fbedf5ac4..5ed9c98fb599c8 100644
@@ -1292,7 +1292,7 @@ struct pvr_queue *pvr_queue_create(struct pvr_context *ctx,
                 goto err_release_ufo;
Quoted 7 lines


        err = drm_sched_entity_init(&queue->entity, -                                   DRM_SCHED_PRIORITY_MIN, +                                   DRM_SCHED_PRIORITY_KERNEL, &sched, 1, &ctx->faulty); if (err)
                goto err_sched_fini;

At least pvr_queue.c can be built again,

Quoted 31 lines
drivers/gpu/drm/nouveau/nouveau_sched.c +1 -1
index 3393647bd94423..dd98f6910f9cab 100644
@@ -18,7 +18,7 @@
   * index to the run-queue array.
   */
  enum nouveau_sched_priority {
-       NOUVEAU_SCHED_PRIORITY_SINGLE = DRM_SCHED_PRIORITY_MIN,
+       NOUVEAU_SCHED_PRIORITY_SINGLE = DRM_SCHED_PRIORITY_KERNEL,
         NOUVEAU_SCHED_PRIORITY_COUNT,
  };

drivers/gpu/drm/nouveau/nouveau_sched.c +0 -0
@@ -423,7 +423,7 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
         if (ret)
                 goto fail_wq;


-       /* Using DRM_SCHED_PRIORITY_MIN, since that's what we're required to use +       /* Using DRM_SCHED_PRIORITY_KERNEL, since that's what we're required to use
         * when we want to have a single run-queue only.
         *
         * It's not documented, but one will find out when trying to use any

drivers/gpu/drm/nouveau/nouveau_sched.c +1 -1
@@ -433,7 +433,7 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
          * Can't use NOUVEAU_SCHED_PRIORITY_SINGLE either, because it's not
          * matching the enum type used in drm_sched_entity_init().
          */
-       ret = drm_sched_entity_init(entity, DRM_SCHED_PRIORITY_MIN,
+       ret = drm_sched_entity_init(entity, DRM_SCHED_PRIORITY_KERNEL,
                                     &drm_sched, 1, NULL);
         if (ret)
                 goto fail_sched;
Signature · 3 lines
Alexander Sverdlin
Siemens AG
www.siemens.com