summaryrefslogtreecommitdiff
path: root/drv_priv.h
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 /drv_priv.h
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 'drv_priv.h')
-rw-r--r--drv_priv.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/drv_priv.h b/drv_priv.h
index fc427bd..5300b48 100644
--- a/drv_priv.h
+++ b/drv_priv.h
@@ -13,6 +13,7 @@
#include <sys/types.h>
#include "drv.h"
+#include "list.h"
struct bo
{
@@ -47,6 +48,17 @@ struct map_info {
int32_t refcount;
};
+struct supported_combination {
+ uint32_t format;
+ uint64_t modifier;
+ uint64_t usage;
+};
+
+struct combination_list_element {
+ struct supported_combination combination;
+ struct list_head link;
+};
+
struct backend
{
char *name;
@@ -57,11 +69,7 @@ struct backend
void* (*bo_map)(struct bo *bo, struct map_info *data, size_t plane);
int (*bo_destroy)(struct bo *bo);
uint32_t (*resolve_format)(uint32_t format);
- struct format_supported {
- uint32_t format;
- uint64_t usage;
- }
- format_list[19];
+ struct list_head combinations;
};
#endif