OSDN Git Service

i915: Allow allocating ARGB buffers for scanout
authorKristian H. Kristensen <hoegsberg@chromium.org>
Wed, 11 Apr 2018 22:55:13 +0000 (15:55 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 12 Apr 2018 22:22:34 +0000 (15:22 -0700)
commit9c3fb32dd4a8b9a3cf870c533d1e88dd542d7c16
tree6f91c9f3aecbd1d869a9af28ab8ae9a61d758d16
parent249e8636f7839786cc9b2d21808c944929307853
i915: Allow allocating ARGB buffers for scanout

CL:991261 changed our primary framebuffer format from XRGB to ARGB. We
still only scanout as XRGB where the display controller doesn't
support ARGB, but minigbm doesn't know that. As a result, when we try
to allocate an ARGB buffer with the SCANOUT useflag, we get a linear
buffer.  This breaks PSR and regresses performance and, in general,
just isn't what we want.

This CL enables SCANOUT for all ARGB formats where the corresponding
XRGB formats supports scanout. In the end, it's up to the caller to
make sure a format works for scanout anyway.

BUG=827188,830969
TEST=test_that graphics_Idle on samus

Change-Id: Iab428e5b21abedcac7cee86fccc8df50dab3f471
Reviewed-on: https://chromium-review.googlesource.com/1008867
Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org>
Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
i915.c