From e6f8ef93cab9d00328fefb63519375279456713b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 9 Dec 2019 08:41:33 -0500 Subject: panfrost: Split stack_shift nibble from unk0 It's conceptually independent from the upper part (which is not yet understood, but for spilling generally remains equal to 0x1e). Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.c | 3 ++- src/panfrost/include/panfrost-job.h | 3 ++- src/panfrost/pandecode/decode.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index d24d440be7c..9b742df836c 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -149,7 +149,8 @@ panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count) unsigned height = batch->key.height; struct bifrost_framebuffer framebuffer = { - .unk0 = 0x1e5, /* 1e4 if no spill */ + .stack_shift = 0x5, + .unk0 = 0x1e, .width1 = MALI_POSITIVE(width), .height1 = MALI_POSITIVE(height), .width2 = MALI_POSITIVE(width), diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 2dbda7e8135..d2334b503f0 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -1671,7 +1671,8 @@ struct bifrost_fb_extra { #define MALI_MFBD_EXTRA (1 << 13) struct bifrost_framebuffer { - u32 unk0; // = 0x10 + u32 stack_shift : 4; + u32 unk0 : 28; u32 unknown2; // = 0x1f, same as SFBD mali_ptr scratchpad; diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 39ece0c2b46..31a43dff0f9 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -1078,6 +1078,7 @@ pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment) pandecode_log("struct bifrost_framebuffer framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no); pandecode_indent++; + pandecode_prop("stack_shift = 0x%x", fb->stack_shift); pandecode_prop("unk0 = 0x%x", fb->unk0); if (fb->sample_locations) -- cgit v1.2.3