summaryrefslogtreecommitdiff
path: root/gbm.c
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2016-10-28 10:07:35 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-12-01 00:50:54 -0800
commit179687e4ebc9ce7c5a3199247c116852d9d418ce (patch)
tree88417a24ceb928916741d646b7effba5545bfbec /gbm.c
parente8ab0a503a36264c28b226ca0a5b3f9c339c03b1 (diff)
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>
Diffstat (limited to 'gbm.c')
-rw-r--r--gbm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gbm.c b/gbm.c
index 4030c3e..7389cd8 100644
--- a/gbm.c
+++ b/gbm.c
@@ -42,7 +42,8 @@ gbm_device_is_format_supported(struct gbm_device *gbm,
drv_usage = gbm_convert_flags(usage);
- return drv_is_format_supported(gbm->drv, format, drv_usage);
+ return drv_is_combination_supported(gbm->drv, format, drv_usage,
+ DRM_FORMAT_MOD_NONE);
}
PUBLIC struct gbm_device *gbm_create_device(int fd)