freedreno: nr_rings -> nr_priorities
authorRob Clark <robdclark@chromium.org>
Tue, 13 Sep 2022 16:37:28 +0000 (09:37 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Sep 2022 02:06:27 +0000 (02:06 +0000)
This was renamed in the UABI header over a year ago, see
fc40e5e10c3b ("drm/msm: Utilize gpu scheduler priorities")

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18584>

src/freedreno/drm/freedreno_drmif.h
src/freedreno/drm/msm/msm_pipe.c
src/freedreno/drm/virtio/virtio_pipe.c
src/gallium/drivers/freedreno/freedreno_screen.c

index 7d5e970..3463ce8 100644 (file)
@@ -57,7 +57,7 @@ enum fd_param_id {
    FD_CHIP_ID,       /* 64b */
    FD_MAX_FREQ,
    FD_TIMESTAMP,
-   FD_NR_RINGS,      /* # of rings == # of distinct priority levels */
+   FD_NR_PRIORITIES,      /* # of rings == # of distinct priority levels */
    FD_CTX_FAULTS,    /* # of per context faults */
    FD_GLOBAL_FAULTS, /* # of global (all context) faults */
    FD_SUSPEND_COUNT, /* # of times the GPU has suspended, and potentially lost state */
index fd7d9b6..49e5eea 100644 (file)
@@ -92,8 +92,8 @@ msm_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
       return query_param(pipe, MSM_PARAM_MAX_FREQ, value);
    case FD_TIMESTAMP:
       return query_param(pipe, MSM_PARAM_TIMESTAMP, value);
-   case FD_NR_RINGS:
-      return query_param(pipe, MSM_PARAM_NR_RINGS, value);
+   case FD_NR_PRIORITIES:
+      return query_param(pipe, MSM_PARAM_PRIORITIES, value);
    case FD_CTX_FAULTS:
       return query_queue_param(pipe, MSM_SUBMITQUEUE_PARAM_FAULTS, value);
    case FD_GLOBAL_FAULTS:
@@ -161,7 +161,7 @@ open_submitqueue(struct fd_pipe *pipe, uint32_t prio)
       .flags = 0,
       .prio = prio,
    };
-   uint64_t nr_rings = 1;
+   uint64_t nr_prio = 1;
    int ret;
 
    if (fd_device_version(pipe->dev) < FD_VERSION_SUBMIT_QUEUES) {
@@ -169,9 +169,9 @@ open_submitqueue(struct fd_pipe *pipe, uint32_t prio)
       return 0;
    }
 
-   msm_pipe_get_param(pipe, FD_NR_RINGS, &nr_rings);
+   msm_pipe_get_param(pipe, FD_NR_PRIORITIES, &nr_prio);
 
-   req.prio = MIN2(req.prio, MAX2(nr_rings, 1) - 1);
+   req.prio = MIN2(req.prio, MAX2(nr_prio, 1) - 1);
 
    ret = drmCommandWriteRead(pipe->dev->fd, DRM_MSM_SUBMITQUEUE_NEW, &req,
                              sizeof(req));
index 76c4ded..bb54442 100644 (file)
@@ -97,7 +97,7 @@ virtio_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
       return 0;
    case FD_TIMESTAMP:
       return query_param(pipe, MSM_PARAM_TIMESTAMP, value);
-   case FD_NR_RINGS:
+   case FD_NR_PRIORITIES:
       *value = virtio_dev->caps.u.msm.priorities;
       return 0;
    case FD_CTX_FAULTS:
@@ -154,12 +154,12 @@ open_submitqueue(struct fd_pipe *pipe, uint32_t prio)
       .flags = 0,
       .prio = prio,
    };
-   uint64_t nr_rings = 1;
+   uint64_t nr_prio = 1;
    int ret;
 
-   virtio_pipe_get_param(pipe, FD_NR_RINGS, &nr_rings);
+   virtio_pipe_get_param(pipe, FD_NR_PRIORITIES, &nr_prio);
 
-   req.prio = MIN2(req.prio, MAX2(nr_rings, 1) - 1);
+   req.prio = MIN2(req.prio, MAX2(nr_prio, 1) - 1);
 
    ret = virtio_simple_ioctl(pipe->dev, DRM_IOCTL_MSM_SUBMITQUEUE_NEW, &req);
    if (ret) {
index 602fe81..0893ca9 100644 (file)
@@ -1031,7 +1031,7 @@ fd_screen_create(struct fd_device *dev, struct renderonly *ro,
    screen->chip_id = val;
    screen->gen = fd_dev_gen(screen->dev_id);
 
-   if (fd_pipe_get_param(screen->pipe, FD_NR_RINGS, &val)) {
+   if (fd_pipe_get_param(screen->pipe, FD_NR_PRIORITIES, &val)) {
       DBG("could not get # of rings");
       screen->priority_mask = 0;
    } else {