OSDN Git Service

minigbm: Fix cursor and scanout flags
authorGurchetan Singh <gurchetansingh@chromium.org>
Fri, 28 Oct 2016 17:07:35 +0000 (10:07 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 1 Dec 2016 08:50:54 +0000 (00:50 -0800)
commit179687e4ebc9ce7c5a3199247c116852d9d418ce
tree88417a24ceb928916741d646b7effba5545bfbec
parente8ab0a503a36264c28b226ca0a5b3f9c339c03b1
minigbm: Fix cursor and scanout flags

We were incorrectly advertising the scanout and cursor flags in
the drivers.

Chrome never used the BO_USE_CURSOR flag (see chromium:666488), and we
set it for incorrect formats.  Let's only advertise ARGB8888/XRGB8888
cursors if they were previously advertised, and prevent cursors from being
used as render targets.

For scanout, formats can vary from kernel version to kernel version.
For example, the v3.18 i915 driver can't scanout NV12, but the upstream v4.4
i915 driver can.  Let's query the KMS API in those cases.

In addition, we would also like to move to a place where our backends can
determine if a specific {format, usage, format modifier} tuple is supported.
The plan is to add modifiers to the properties that are exposed in KMS, which
can help with optimization.

BUG=b:31942635, chromium:666488
TEST=Ran graphics_Gbm and checked if Chrome boots on cyan, minnie, and
nyan_big

CQ-DEPEND=CL:413325

Change-Id: Ifd3fd1c8063db97b3f1fe057ace82d22def76943
Reviewed-on: https://chromium-review.googlesource.com/405019
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
22 files changed:
amdgpu.c
cirrus.c
cros_gralloc/Makefile
cros_gralloc/cros_alloc_device.cc
drv.c
drv.h
drv_priv.h
evdi.c
exynos.c
gbm.c
gma500.c
helpers.c
helpers.h
i915.c
list.h [new file with mode: 0644]
marvell.c
mediatek.c
rockchip.c
tegra.c
udl.c
vgem.c
virtio_gpu.c