minigbm: replace DRM_FORMAT_MOD_INVALID with DRM_FORMAT_MOD_LINEAR

CL:737409 replaced DRM_FORMAT_MOD_NONE with DRM_FORMAT_MOD_INVALID in
struct kms_item. We use drv_query_kms() to add the scanout flag to most
buffer combinations. That means anything with DRM_FORMAT_MOD_LINEAR
will not get the scanout flag, since drv_query_kms returns combinations
with DRM_FORMAT_MOD_INVALID. This leads to artifacts in the zero latency
app, since we end up picking a X-tiled buffer since we don't advertise
a linear buffer with scanout.

Since all hardware can scanout linear buffers, replace DRM_FORMAT_MOD_INVALID
with DRM_FORMAT_MOD_LINEAR.

BUG=chromium:762324
TEST=no overlay artifacts running Zero latency app

Change-Id: Ib8a33b9e8dde3767337b9cd32c5b2849f9c8aa04
Reviewed-on: https://chromium-review.googlesource.com/823258
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
Gurchetan Singh 2017-12-12 14:38:09 -08:00 committed by chrome-bot
parent fa17cdde2d
commit 9927d78669
3 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ struct backend {
#define BO_USE_SW_RARELY BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY
#define LINEAR_METADATA (struct format_metadata) { 0, 1, DRM_FORMAT_MOD_NONE }
#define LINEAR_METADATA (struct format_metadata) { 0, 1, DRM_FORMAT_MOD_LINEAR }
// clang-format on
#endif