summaryrefslogtreecommitdiff
path: root/tegra.c
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2016-08-16 17:57:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-22 14:52:30 -0700
commitbfba8c2697ef0dec00ba28eb7d976d56e3e61166 (patch)
tree79b292924ca619497f5bbd1d770ecf4868351898 /tegra.c
parentd7c84fd88fb71f30c90d3d13bd8dfc2c2d2541da (diff)
minigbm: Added gralloc API to internal API
Added the drv analogues of the 2 flexible formats we need to support. Added analogues of most of the gralloc use flags, except: GRALLOC_USAGE_SW_READ_MASK GRALLOC_USAGE_SW_WRITE_MASK GRALLOC_USAGE_HW_MASK GRALLOC_USAGE_FOREIGN_BUFFERS GRALLOC_USAGE_ALLOC_MASK These are used as masks and don't make sense as usage hints. In addition, put the new flags in the drivers' supported lists and added a flexible format query function. BUG=chromium:616275 TEST=minigbm still builds CQ-DEPEND=CL:371501 Change-Id: Idd2ecd6fde3e6c5caaaf3a8404d0d7db20b4ecf4 Reviewed-on: https://chromium-review.googlesource.com/372359 Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Diffstat (limited to 'tegra.c')
-rw-r--r--tegra.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/tegra.c b/tegra.c
index 17a4cbd..cafd000 100644
--- a/tegra.c
+++ b/tegra.c
@@ -168,11 +168,21 @@ const struct backend backend_tegra =
.bo_map = tegra_bo_map,
.format_list = {
/* Linear support */
- {DRV_FORMAT_XRGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR},
- {DRV_FORMAT_ARGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR},
+ {DRV_FORMAT_XRGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_CURSOR |
+ DRV_BO_USE_LINEAR | DRV_BO_USE_SW_READ_OFTEN |
+ DRV_BO_USE_SW_WRITE_OFTEN},
+ {DRV_FORMAT_ARGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_CURSOR |
+ DRV_BO_USE_LINEAR | DRV_BO_USE_SW_READ_OFTEN |
+ DRV_BO_USE_SW_WRITE_OFTEN},
/* Blocklinear support */
- {DRV_FORMAT_XRGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_RENDERING},
- {DRV_FORMAT_ARGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_RENDERING},
+ {DRV_FORMAT_XRGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_RENDERING |
+ DRV_BO_USE_HW_TEXTURE | DRV_BO_USE_HW_RENDER |
+ DRV_BO_USE_HW_2D | DRV_BO_USE_SW_READ_RARELY |
+ DRV_BO_USE_SW_WRITE_RARELY},
+ {DRV_FORMAT_ARGB8888, DRV_BO_USE_SCANOUT | DRV_BO_USE_RENDERING |
+ DRV_BO_USE_HW_TEXTURE | DRV_BO_USE_HW_RENDER |
+ DRV_BO_USE_HW_2D | DRV_BO_USE_SW_READ_RARELY |
+ DRV_BO_USE_SW_WRITE_RARELY},
}
};