Mesa (master): panfrost: Remove 32-bit next_job path

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 27 18:29:30 UTC 2019


Module: Mesa
Branch: master
Commit: 65e5c1942a21f16ca054895490d2987b88d55fe9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=65e5c1942a21f16ca054895490d2987b88d55fe9

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Dec 27 13:03:22 2019 -0500

panfrost: Remove 32-bit next_job path

It has been unused for a while; let's just remove the abstraction.
Technically the hardware does support 32-bit job descriptors, but we
don't and we can't keep them from breaking so let's not pretend they
work.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Suggested-by: Boris Brezillon <boris.brezillon at collabora.com>

---

 src/gallium/drivers/panfrost/pan_scoreboard.c | 13 +------------
 src/panfrost/include/panfrost-job.h           |  6 +-----
 src/panfrost/pandecode/decode.c               |  8 ++------
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.c b/src/gallium/drivers/panfrost/pan_scoreboard.c
index dfd8bd2e143..927a6f61f6b 100644
--- a/src/gallium/drivers/panfrost/pan_scoreboard.c
+++ b/src/gallium/drivers/panfrost/pan_scoreboard.c
@@ -100,17 +100,6 @@
  *
  */
 
-/* Accessor to set the next job field */
-
-static void
-panfrost_set_job_next(struct mali_job_descriptor_header *first, mali_ptr next)
-{
-        if (first->job_descriptor_size)
-                first->next_job_64 = (u64) (uintptr_t) next;
-        else
-                first->next_job_32 = (u32) (uintptr_t) next;
-}
-
 /* Coerce a panfrost_transfer to a header */
 
 static inline struct mali_job_descriptor_header *
@@ -452,7 +441,7 @@ panfrost_scoreboard_link_batch(struct panfrost_batch *batch)
 
                 if (tail) {
                         /* Link us to the last node */
-                        panfrost_set_job_next(tail, addr);
+                        tail->next_job = addr;
                 } else {
                         /* We are the first/last node */
                         batch->first_job.cpu = (uint8_t *) n;
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index 385305da5cf..fa43f8c32a4 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -620,11 +620,7 @@ struct mali_job_descriptor_header {
         u16 job_index;
         u16 job_dependency_index_1;
         u16 job_dependency_index_2;
-
-        union {
-                u64 next_job_64;
-                u32 next_job_32;
-        };
+        u64 next_job;
 } __attribute__((packed));
 
 /* These concern exception_status */
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 126065c2b21..9f9de0f0fb6 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -2962,16 +2962,12 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
 
                 if (!first) {
                         pandecode_log("((struct mali_job_descriptor_header *) (uintptr_t) job_%d_p)->", job_no - 1);
-
-                        if (last_size)
-                                pandecode_log_cont("next_job_64 = job_%d_p;\n\n", job_no);
-                        else
-                                pandecode_log_cont("next_job_32 = (u32) (uintptr_t) job_%d_p;\n\n", job_no);
+                        pandecode_log_cont("next_job = job_%d_p;\n\n", job_no);
                 }
 
                 first = false;
 
-        } while ((jc_gpu_va = h->job_descriptor_size ? h->next_job_64 : h->next_job_32));
+        } while ((jc_gpu_va = h->next_job));
 
         return start_number;
 }




More information about the mesa-commit mailing list