From 63bd2ae7452d48f25962ae9985a34bbdba9c52cf Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Thu, 3 Nov 2016 16:14:44 -0700 Subject: gbm: Introduce modifiers into surface/bo creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The idea behind modifiers like this is that the user of GBM will have some mechanism to query what properties the hardware supports for its BO or surface. This information is directly passed in (and stored) so that the DRI implementation can create an image with the appropriate attributes. A getter() will be added later so that the user GBM will be able to query what modifier should be used. Only in surface creation, the modifiers are stored until the BO is actually allocated. In regular buffer allocation, the correct modifier can (will be, in future patches be chosen at creation time. v2: Make sure to check if count is non-zero in addition to testing if calloc fails. (Daniel) v3: Remove "usage" and "flags" from modifier creation. Requested by Kristian. v4: Take advantage of the "INVALID" modifier added by the GET_PLANE2 series. v5: Don't bother with storing modifiers for gbm_bo_create because that's a synchronous operation and we can actually select the correct modifier at create time (done in a later patch) (Jason) v6: Make modifier condition outside the check so that dri_use will work properly (Jason) Cc: Kristian Høgsberg References (v4): https://lists.freedesktop.org/archives/intel-gfx/2017-January/116636.html Signed-off-by: Ben Widawsky Reviewed-by: Eric Engestrom (v1) Reviewed-by: Jason Ekstrand Acked-by: Daniel Stone --- src/gbm/gbm-symbols-check | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gbm/gbm-symbols-check') diff --git a/src/gbm/gbm-symbols-check b/src/gbm/gbm-symbols-check index 81da1e07932..0550baddc44 100755 --- a/src/gbm/gbm-symbols-check +++ b/src/gbm/gbm-symbols-check @@ -8,6 +8,7 @@ gbm_device_is_format_supported gbm_device_destroy gbm_create_device gbm_bo_create +gbm_bo_create_with_modifiers gbm_bo_import gbm_bo_map gbm_bo_unmap @@ -27,6 +28,7 @@ gbm_bo_set_user_data gbm_bo_get_user_data gbm_bo_destroy gbm_surface_create +gbm_surface_create_with_modifiers gbm_surface_needs_lock_front_buffer gbm_surface_lock_front_buffer gbm_surface_release_buffer -- cgit v1.2.3