From e49204c878eaf47b40624df9f01d7795575115a3 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 20 Aug 2019 11:11:46 -0700 Subject: [PATCH] pan/decode: Check for MFBD preload chicken bit If this bit is clear, MFBD preload will be enabled, and you.. don't want that. (At least, when the bit is clear, the old contents of the framebuffer will be preserved. I'm assuming this is what "MFBD preload" refers to in kbase.) Validate that this bit is always set. Signed-off-by: Alyssa Rosenzweig --- src/panfrost/pandecode/decode.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 9c29d870332..29bf2c2dc3a 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -779,7 +779,16 @@ pandecode_rt_format(struct mali_rt_format format) pandecode_swizzle(format.swizzle); - pandecode_prop("no_preload = 0x%" PRIx32, format.no_preload); + /* In theory, the no_preload bit can be cleared to enable MFBD preload, + * which is a faster hardware-based alternative to the wallpaper method + * to preserve framebuffer contents across frames. In practice, MFBD + * preload is buggy on Midgard, and so this is a chicken bit. If this + * bit isn't set, most likely something broke unrelated to preload */ + + if (!format.no_preload) { + pandecode_msg("XXX: buggy MFBD preload enabled - chicken bit should be clear\n"); + pandecode_prop("no_preload = 0x%" PRIx32, format.no_preload); + } if (format.zero) pandecode_prop("zero = 0x%" PRIx32, format.zero); -- 2.30.2