OSDN Git Service

i915: allow allocating AR30/AB30 for scanout
authorMiguel Casas <mcasas@chromium.org>
Tue, 19 Nov 2019 21:10:17 +0000 (16:10 -0500)
committerMiguel Casas <mcasas@chromium.org>
Mon, 25 Nov 2019 16:49:14 +0000 (16:49 +0000)
This CL extends the current M.O. of allowing ARGB formats for
scanout if the corresponding XRGB format supports it, for XR30
and XB30.

(Needs crrev.com/c/1925247 patched in).

BUG=chromium:949260
TEST=null_platform_tests -f AR30 etc on kohaku/hatch

Change-Id: I720e82a17873e5f635f530bf3eefff24c2e3ab77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1925250
Tested-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
i915.c

diff --git a/i915.c b/i915.c
index ec0d8fd..025b6b5 100644 (file)
--- a/i915.c
+++ b/i915.c
@@ -73,6 +73,10 @@ static bool format_compatible(const struct combination *combo, uint32_t format)
                return combo->format == DRM_FORMAT_RGBA8888;
        case DRM_FORMAT_BGRX8888:
                return combo->format == DRM_FORMAT_BGRA8888;
+       case DRM_FORMAT_XRGB2101010:
+               return combo->format == DRM_FORMAT_ARGB2101010;
+       case DRM_FORMAT_XBGR2101010:
+               return combo->format == DRM_FORMAT_ABGR2101010;
        default:
                return false;
        }