From 76d64d2a3e77ffa9d52f452ee2a3fb22a741f2f8 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 30 Aug 2021 15:43:51 +0200 Subject: [PATCH] gbm: consistently use the same name for BO flags We were sometimes using "usage", sometimes using "flags". Let's just use "flags" everywhere (since the enum is named gbm_bo_flags). Signed-off-by: Simon Ser Reviewed-by: James Jones Reviewed-by: Daniel Stone Part-of: --- src/gbm/main/gbm.c | 18 +++++++++--------- src/gbm/main/gbm.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index d81931a7483..ffe83351a23 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -70,7 +70,7 @@ gbm_device_get_backend_name(struct gbm_device *gbm) * * \param gbm The created buffer manager * \param format The format to test - * \param usage A bitmask of the usages to test the format against + * \param flags A bitmask of the usages to test the format against * \return 1 if the format is supported otherwise 0 * * \sa enum gbm_bo_flags for the list of flags that the format can be @@ -80,9 +80,9 @@ gbm_device_get_backend_name(struct gbm_device *gbm) */ GBM_EXPORT int gbm_device_is_format_supported(struct gbm_device *gbm, - uint32_t format, uint32_t usage) + uint32_t format, uint32_t flags) { - return gbm->v0.is_format_supported(gbm, format, usage); + return gbm->v0.is_format_supported(gbm, format, flags); } /** Get the number of planes that are required for a given format+modifier @@ -469,7 +469,7 @@ gbm_bo_destroy(struct gbm_bo *bo) * \param height The height for the buffer * \param format The format to use for the buffer, from GBM_FORMAT_* or * GBM_BO_FORMAT_* tokens - * \param usage The union of the usage flags for this buffer + * \param flags The union of the usage flags for this buffer * * \return A newly allocated buffer that should be freed with gbm_bo_destroy() * when no longer needed. If an error occurs during allocation %NULL will be @@ -480,14 +480,14 @@ gbm_bo_destroy(struct gbm_bo *bo) GBM_EXPORT struct gbm_bo * gbm_bo_create(struct gbm_device *gbm, uint32_t width, uint32_t height, - uint32_t format, uint32_t usage) + uint32_t format, uint32_t flags) { if (width == 0 || height == 0) { errno = EINVAL; return NULL; } - return gbm->v0.bo_create(gbm, width, height, format, usage, NULL, 0); + return gbm->v0.bo_create(gbm, width, height, format, flags, NULL, 0); } GBM_EXPORT struct gbm_bo * @@ -529,7 +529,7 @@ gbm_bo_create_with_modifiers(struct gbm_device *gbm, * \param gbm The gbm device returned from gbm_create_device() * \param type The type of object we're importing * \param buffer Pointer to the external object - * \param usage The union of the usage flags for this buffer + * \param flags The union of the usage flags for this buffer * * \return A newly allocated buffer object that should be freed with * gbm_bo_destroy() when no longer needed. On error, %NULL is returned @@ -539,9 +539,9 @@ gbm_bo_create_with_modifiers(struct gbm_device *gbm, */ GBM_EXPORT struct gbm_bo * gbm_bo_import(struct gbm_device *gbm, - uint32_t type, void *buffer, uint32_t usage) + uint32_t type, void *buffer, uint32_t flags) { - return gbm->v0.bo_import(gbm, type, buffer, usage); + return gbm->v0.bo_import(gbm, type, buffer, flags); } /** diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 2531fb56786..6117b355496 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -257,7 +257,7 @@ gbm_device_get_backend_name(struct gbm_device *gbm); int gbm_device_is_format_supported(struct gbm_device *gbm, - uint32_t format, uint32_t usage); + uint32_t format, uint32_t flags); int gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm, @@ -309,7 +309,7 @@ struct gbm_import_fd_modifier_data { struct gbm_bo * gbm_bo_import(struct gbm_device *gbm, uint32_t type, - void *buffer, uint32_t usage); + void *buffer, uint32_t flags); /** * Flags to indicate the type of mapping for the buffer - these are