minigbm: Add FRONT_RENDERING flag

Add a flag to indicate that a buffer will be used for front-buffer (low-
latency) rendering.  We need to avoid using framebuffer compression in
this case, as the compression data and pixel data can be transiently out
of sync, resulting in corrupted display.

BUG=b:168868719
TEST=None

Change-Id: I08e6444aba99a5f694d010372277de775bc56fd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2450927
Tested-by: Rob Clark <robdclark@chromium.org>
Auto-Submit: Rob Clark <robdclark@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Rob Clark 2020-10-05 12:10:51 -07:00 committed by Commit Bot
parent 8d62cdf032
commit 6f83a442e5
4 changed files with 20 additions and 2 deletions

8
gbm.h
View file

@ -280,6 +280,14 @@ enum gbm_bo_flags {
* which would otherwise access the underlying buffer will fail.
*/
GBM_TEST_ALLOC = (1 << 15),
/**
* The buffer will be used for front buffer rendering. On some
* platforms this may (for example) disable framebuffer compression
* to avoid problems with compression flags data being out of sync
* with pixel data.
*/
GBM_BO_USE_FRONT_RENDERING = (1 << 16),
};
int