summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_fragment.c
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-07-11 08:06:41 +0200
committerAlyssa Rosenzweig <[email protected]>2019-07-16 08:40:59 -0700
commit5a7688fdecd76c7d9cd87f6f6c93eb32870a2146 (patch)
tree0567857cb4528ecfdc70c0a1099672c6f2fb9fd0 /src/gallium/drivers/panfrost/pan_fragment.c
parent6a441151c245d7b59b84502257a0ff1a300b8633 (diff)
panfrost: Use 64-bit descriptors globally
Midgard supports two modes of operation, 32-bit mode and 64-bit mode. The GPU is natively 64-bit, but job descriptors can be submitted in 32-bit mode. Among other changes, 32-bit mode shortens pointer sizes to use 32-bit pointers rather than the full 64-bit range. The blob decides which mode to use based on the CPU bitness, so an armhf system uses 32-bit descriptors and an aarch64 system uses 64-bit descriptors. For a while, we mimicked this, bu inevitably this caused the 32-bit support to lag behind as our reference platform is 64-bit. To combat the code staleness, we traced an older GPU paired with a 64-bit CPU (the Midgard T720 on-board the sunxi H64). From there, we could tell which fields were really about hardware and which fields were simply reflections of the descriptor bitness. From there, we decided to remove support for 32-bit descriptors entirely, using 64-bit descriptors unconditionally. There is minimal performance penalty for this in practice, and it allows us to unify these disparate code paths. This fixes: - T860 + armhf - T820 + armhf - T760 + aarch64 And will help bringup of 1st/2nd generation Midgard regardless of CPU. [Work done by Tomeu. Commit message written by Alyssa.] v2: Add comments preserving information about the old behaviour for future reference. Fix a compiler warning. (Alyssa) Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_fragment.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_fragment.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_fragment.c b/src/gallium/drivers/panfrost/pan_fragment.c
index ab42e763be7..7ffb9db0a05 100644
--- a/src/gallium/drivers/panfrost/pan_fragment.c
+++ b/src/gallium/drivers/panfrost/pan_fragment.c
@@ -70,9 +70,7 @@ panfrost_fragment_job(struct panfrost_context *ctx, bool has_draws)
struct mali_job_descriptor_header header = {
.job_type = JOB_TYPE_FRAGMENT,
.job_index = 1,
-#ifdef __LP64__
.job_descriptor_size = 1
-#endif
};
struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);