panfrost: Note "MFBD preload disable" bit

It's a chicken bit, as far as I can tell. Buck buck.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig 2019-08-14 16:01:38 -07:00
parent 64720d1e9e
commit b78e04c17b
3 changed files with 16 additions and 4 deletions

View file

@ -73,7 +73,7 @@ panfrost_mfbd_format(struct pipe_surface *surf)
.unk3 = 0x4,
.flags = 0x8,
.swizzle = panfrost_translate_swizzle_4(swizzle),
.unk4 = 0x8
.no_preload = true
};
if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
@ -424,7 +424,7 @@ panfrost_mfbd_fragment(struct panfrost_context *ctx, bool has_draws)
} else {
struct mali_rt_format null_rt = {
.unk1 = 0x4000000,
.unk4 = 0x8
.no_preload = true
};
rts[cb].format = null_rt;

View file

@ -1482,7 +1482,16 @@ struct mali_rt_format {
unsigned swizzle : 12;
unsigned unk4 : 4;
unsigned zero : 3;
/* Disables MFBD preload. When this bit is set, the render target will
* be cleared every frame. When this bit is clear, the hardware will
* automatically wallpaper the render target back from main memory.
* Unfortunately, MFBD preload is very broken on Midgard, so in
* practice, this is a chicken bit that should always be set.
* Discovered by accident, as all good chicken bits are. */
unsigned no_preload : 1;
} __attribute__((packed));
struct bifrost_render_target {

View file

@ -652,7 +652,10 @@ pandecode_rt_format(struct mali_rt_format format)
pandecode_swizzle(format.swizzle);
pandecode_prop("unk4 = 0x%" PRIx32, format.unk4);
pandecode_prop("no_preload = 0x%" PRIx32, format.no_preload);
if (format.zero)
pandecode_prop("zero = 0x%" PRIx32, format.zero);
pandecode_indent--;
pandecode_log("},\n");