From 74dc7e25c56c752f12ea145a5e5f9e27137acb29 Mon Sep 17 00:00:00 2001 From: Sangjin Lee Date: Tue, 1 Dec 2015 09:10:21 +0900 Subject: [PATCH 01/16] gbm-tbm: Fix bug for gbm_bo create Change-Id: I4e5a463219c749b321592629cb9623c8bdf3881a Signed-off-by: Sangjin Lee --- backends/tbm/gbm_tbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/tbm/gbm_tbm.c b/backends/tbm/gbm_tbm.c index e8adca4..5d619f1 100644 --- a/backends/tbm/gbm_tbm.c +++ b/backends/tbm/gbm_tbm.c @@ -298,7 +298,7 @@ __gbm_tbm_bo_create(struct gbm_device *gbm, } tbm_surf = tbm_surface_internal_create_with_flags(width, height, format, flags); - if (tbm_surf) + if (!tbm_surf) { return NULL; } -- 2.7.4 From e127a4a8176faffd2e00bc5a7d7fa59681972a7b Mon Sep 17 00:00:00 2001 From: Sangjin Lee Date: Fri, 4 Dec 2015 21:20:45 +0900 Subject: [PATCH 02/16] enable buffer-queue Change-Id: Icd530a0f1361a075b1c2b8da46bb1f391fa7eb22 --- packaging/libgbm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index 3a9e05f..adc4da5 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -30,7 +30,7 @@ Development header files for use with Wayland GBM %setup -q -n %{name} %build -%reconfigure --disable-static +%reconfigure --disable-static --enable-tbm-queue make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER} %install -- 2.7.4 From 6bf675bd2b94298996ec362f59d070a672a8837f Mon Sep 17 00:00:00 2001 From: Sangjin Lee Date: Mon, 14 Dec 2015 11:47:25 +0900 Subject: [PATCH 03/16] gbm-tbm: remove useless code for tbm_surface_queue remove USE_TBM_QUEUE Change-Id: I7dffb34b36d3e912f0f80dc444d3a9127e023494 Signed-off-by: Sangjin Lee --- backends/tbm/gbm_tbm.c | 104 ---------------------------------------------- backends/tbm/gbm_tbm.h | 44 -------------------- backends/tbm/gbm_tbmint.h | 4 -- 3 files changed, 152 deletions(-) diff --git a/backends/tbm/gbm_tbm.c b/backends/tbm/gbm_tbm.c index 5d619f1..92527c3 100644 --- a/backends/tbm/gbm_tbm.c +++ b/backends/tbm/gbm_tbm.c @@ -41,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static int tbm_private_data; #define TBM_DATA_KEY ((unsigned long)&tbm_private_data) -#ifdef USE_TBM_QUEUE struct gbm_bo* __gbm_tbm_get_gbm_bo(tbm_surface_h surf); GBM_EXPORT tbm_surface_queue_h @@ -58,76 +57,6 @@ gbm_tbm_get_surface(struct gbm_bo* bo) return _bo->tbm_surf; } -#else -GBM_EXPORT tbm_bo -gbm_tbm_bo_get_tbm_bo(struct gbm_tbm_bo *bo) -{ - tbm_bo tbo; - tbo = tbm_surface_internal_get_bo(bo->tbm_surf, 0); - return tbo; -} - -GBM_EXPORT uint32_t -gbm_tbm_bo_get_stride(struct gbm_tbm_bo *bo) -{ - return bo->base.stride; -} - -GBM_EXPORT uint32_t -gbm_tbm_surface_get_width(struct gbm_tbm_surface *surf) -{ - return surf->base.width; -} - -GBM_EXPORT uint32_t -gbm_tbm_surface_get_height(struct gbm_tbm_surface *surf) -{ - return surf->base.height; -} - -GBM_EXPORT uint32_t -gbm_tbm_surface_get_format(struct gbm_tbm_surface *surf) -{ - return surf->base.format; -} - -GBM_EXPORT uint32_t -gbm_tbm_surface_get_flags(struct gbm_tbm_surface *surf) -{ - return surf->base.flags; -} - -GBM_EXPORT void -gbm_tbm_surface_set_user_data(struct gbm_tbm_surface *surf, void *data) -{ - surf->tbm_private = data; -} - -GBM_EXPORT void * -gbm_tbm_surface_get_user_data(struct gbm_tbm_surface *surf) -{ - return surf->tbm_private; -} - -GBM_EXPORT void -gbm_tbm_device_set_callback_surface_has_free_buffers(struct gbm_tbm_device *gbm_tbm, int (*callback)(struct gbm_surface *)) -{ - gbm_tbm->base.surface_has_free_buffers = callback; -} - -GBM_EXPORT void -gbm_tbm_device_set_callback_surface_lock_front_buffer(struct gbm_tbm_device *gbm_tbm, struct gbm_bo *(*callback)(struct gbm_surface *)) -{ - gbm_tbm->base.surface_lock_front_buffer = callback; -} - -GBM_EXPORT void -gbm_tbm_device_set_callback_surface_release_buffer(struct gbm_tbm_device *gbm_tbm, void (*callback)(struct gbm_surface *, struct gbm_bo *)) -{ - gbm_tbm->base.surface_release_buffer = callback; -} -#endif - static int __gbm_tbm_is_format_supported(struct gbm_device *gbm, uint32_t format, @@ -306,8 +235,6 @@ __gbm_tbm_bo_create(struct gbm_device *gbm, return __gbm_tbm_bo_create_by_tbm_surface(gbm, tbm_surf, width, height, format, flags); } - -#ifdef USE_TBM_QUEUE struct gbm_bo* __gbm_tbm_get_gbm_bo(tbm_surface_h surf) { @@ -418,35 +345,6 @@ __gbm_tbm_surface_has_free_buffers(struct gbm_surface *surface) return tbm_surface_queue_can_acquire(surf->queue, 0); } -#else -static struct gbm_surface * -__gbm_tbm_surface_create(struct gbm_device *gbm, - uint32_t width, uint32_t height, - uint32_t format, uint32_t flags) -{ - struct gbm_tbm_surface *surf; - - surf = calloc(1, sizeof *surf); - if (surf == NULL) - return NULL; - - surf->base.gbm = gbm; - surf->base.width = width; - surf->base.height = height; - surf->base.format = format; - surf->base.flags = flags; - - return &surf->base; -} - -static void -__gbm_tbm_surface_destroy(struct gbm_surface *_surf) -{ - struct gbm_tbm_surface *surf = gbm_tbm_surface(_surf); - - free(surf); -} -#endif static void __tbm_destroy(struct gbm_device *gbm) @@ -483,11 +381,9 @@ __tbm_device_create(int fd) dri->base.destroy = __tbm_destroy; dri->base.surface_create = __gbm_tbm_surface_create; dri->base.surface_destroy = __gbm_tbm_surface_destroy; -#ifdef USE_TBM_QUEUE dri->base.surface_lock_front_buffer = __gbm_tbm_surface_lock_front_buffer; dri->base.surface_release_buffer = __gbm_tbm_surface_release_buffer; dri->base.surface_has_free_buffers = __gbm_tbm_surface_has_free_buffers; -#endif dri->base.name = "gbm_tbm"; return &dri->base; diff --git a/backends/tbm/gbm_tbm.h b/backends/tbm/gbm_tbm.h index cb62de4..26779cb 100644 --- a/backends/tbm/gbm_tbm.h +++ b/backends/tbm/gbm_tbm.h @@ -2,8 +2,6 @@ #define _GBM_TBM_H_ #include - -#ifdef USE_TBM_QUEUE #include #include @@ -13,46 +11,4 @@ gbm_tbm_get_surface_queue(struct gbm_surface* surf); tbm_surface_h gbm_tbm_get_surface(struct gbm_bo* bo); -#else -#include - -struct gbm_tbm_device; -struct gbm_tbm_bo; -struct gbm_tbm_surface; - - -void -gbm_tbm_device_set_callback_surface_has_free_buffers(struct gbm_tbm_device *gbm_tbm, int (*callback)(struct gbm_surface *)); - -void -gbm_tbm_device_set_callback_surface_lock_front_buffer(struct gbm_tbm_device *gbm_tbm, struct gbm_bo *(*callback)(struct gbm_surface *)); - -void -gbm_tbm_device_set_callback_surface_release_buffer(struct gbm_tbm_device *gbm_tbm, void (*callback)(struct gbm_surface *, struct gbm_bo *)); - -uint32_t -gbm_tbm_surface_get_width(struct gbm_tbm_surface *surf); - -uint32_t -gbm_tbm_surface_get_height(struct gbm_tbm_surface *surf); - -uint32_t -gbm_tbm_surface_get_format(struct gbm_tbm_surface *surf); - -uint32_t -gbm_tbm_surface_get_flags(struct gbm_tbm_surface *surf); - -void -gbm_tbm_surface_set_user_data(struct gbm_tbm_surface *surf, void *data); - -void * -gbm_tbm_surface_get_user_data(struct gbm_tbm_surface *surf); - -tbm_bo -gbm_tbm_bo_get_tbm_bo(struct gbm_tbm_bo *bo); - -uint32_t -gbm_tbm_bo_get_stride(struct gbm_tbm_bo *bo); - -#endif #endif diff --git a/backends/tbm/gbm_tbmint.h b/backends/tbm/gbm_tbmint.h index 9804d81..52de64d 100644 --- a/backends/tbm/gbm_tbmint.h +++ b/backends/tbm/gbm_tbmint.h @@ -31,9 +31,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#ifdef USE_TBM_QUEUE #include -#endif #include "gbm_tbm.h" #include "gbmint.h" @@ -54,9 +52,7 @@ struct gbm_tbm_surface { struct gbm_surface base; void *tbm_private; -#ifdef USE_TBM_QUEUE tbm_surface_queue_h queue; -#endif }; static inline struct gbm_tbm_device * -- 2.7.4 From 44e7a91e88c5f6dd2dd1685e46f4611732e26a0a Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Wed, 16 Dec 2015 14:14:39 +0900 Subject: [PATCH 04/16] gbm.h : Add gbm_bo_format enums Change-Id: I50a6f738670aa0eb5d23500381e181e6b3d65bca --- src/gbm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gbm.h b/src/gbm.h index 8312d3d..558b512 100644 --- a/src/gbm.h +++ b/src/gbm.h @@ -68,6 +68,14 @@ union gbm_bo_handle { uint64_t u64; }; +/** Format of the allocated buffer */ +enum gbm_bo_format { + /** RGB with 8 bits per channel in a 32 bit value */ + GBM_BO_FORMAT_XRGB8888, + /** ARGB with 8 bits per channel in a 32 bit value */ + GBM_BO_FORMAT_ARGB8888 +}; + #define __gbm_fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) -- 2.7.4 From 0b4ffbc25d71c88023ec2c7005c17d7252fcf97c Mon Sep 17 00:00:00 2001 From: Sangjin Lee Date: Wed, 16 Dec 2015 16:38:03 +0900 Subject: [PATCH 05/16] support old GBM_BO_FORMAT_XXX Change-Id: Ib291aa3fcfda62959dc70c79501727c6c9949bd0 Signed-off-by: Sangjin Lee --- src/gbm.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/gbm.c b/src/gbm.c index e1cd2d5..b6d207c 100644 --- a/src/gbm.c +++ b/src/gbm.c @@ -83,6 +83,16 @@ GBM_EXPORT int gbm_device_is_format_supported(struct gbm_device *gbm, uint32_t format, uint32_t usage) { + switch (format) + { + case GBM_BO_FORMAT_XRGB8888: + format = GBM_FORMAT_XRGB8888; + break; + case GBM_BO_FORMAT_ARGB8888: + format = GBM_FORMAT_ABGR8888; + break; + } + return gbm->is_format_supported(gbm, format, usage); } @@ -321,6 +331,16 @@ gbm_bo_create(struct gbm_device *gbm, (width != 64 || height != 64)) return NULL; + switch (format) + { + case GBM_BO_FORMAT_XRGB8888: + format = GBM_FORMAT_XRGB8888; + break; + case GBM_BO_FORMAT_ARGB8888: + format = GBM_FORMAT_ABGR8888; + break; + } + return gbm->bo_create(gbm, width, height, format, usage); } @@ -375,6 +395,16 @@ gbm_surface_create(struct gbm_device *gbm, uint32_t width, uint32_t height, uint32_t format, uint32_t flags) { + switch (format) + { + case GBM_BO_FORMAT_XRGB8888: + format = GBM_FORMAT_XRGB8888; + break; + case GBM_BO_FORMAT_ARGB8888: + format = GBM_FORMAT_ABGR8888; + break; + } + return gbm->surface_create(gbm, width, height, format, flags); } -- 2.7.4 From 985b3959ac1d773d72f9086cdd4cf4ada3e92706 Mon Sep 17 00:00:00 2001 From: Sangjin Lee Date: Mon, 21 Dec 2015 20:26:43 +0900 Subject: [PATCH 06/16] update gbm_bo flags Change-Id: I4bc382b37d3a3df9d7537a4366007df57f0dbe61 --- src/gbm.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/gbm.h b/src/gbm.h index 558b512..ca2dd4c 100644 --- a/src/gbm.h +++ b/src/gbm.h @@ -192,10 +192,13 @@ enum gbm_bo_flags { */ GBM_BO_USE_SCANOUT = (1 << 0), /** - * Buffer is going to be used as cursor - the dimensions for the buffer - * must be 64x64 if this flag is passed. + * Buffer is going to be used as cursor */ - GBM_BO_USE_CURSOR_64X64 = (1 << 1), + GBM_BO_USE_CURSOR = (1 << 1), + /** + * Deprecated + */ + GBM_BO_USE_CURSOR_64X64 = GBM_BO_USE_CURSOR, /** * Buffer is to be used for rendering - for example it is going to be used * as the storage for a color buffer @@ -203,10 +206,13 @@ enum gbm_bo_flags { GBM_BO_USE_RENDERING = (1 << 2), /** * Buffer can be used for gbm_bo_write. This is guaranteed to work - * with GBM_BO_USE_CURSOR_64X64. but may not work for other - * combinations. + * with GBM_BO_USE_CURSOR. but may not work for other combinations. */ GBM_BO_USE_WRITE = (1 << 3), + /** + * Buffer is linear, i.e. not tiled. + */ + GBM_BO_USE_LINEAR = (1 << 4), }; int -- 2.7.4 From 6d11fba6ec86e648b038d52e8643e41949543915 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Tue, 15 Mar 2016 16:44:19 +0900 Subject: [PATCH 07/16] do not build gbm_tbm at emulator Change-Id: Id875ebab821418dce9fca4dc8f26d42efab094c5 --- Makefile.am | 3 ++- configure.ac | 9 +++++++-- packaging/libgbm.spec | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8289c37..5740071 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,11 +38,12 @@ AM_CFLAGS += \ libgbm_la_LIBADD += \ $(TBM_LIBS) +endif + libgbmtbmincludedir=$(includedir)/gbm libgbmtbminclude_HEADERS = \ backends/tbm/gbm_tbm.h \ backends/tbm/gbm_tbmint.h -endif CLEANFILES = diff --git a/configure.ac b/configure.ac index 7f2eb5b..274c567 100644 --- a/configure.ac +++ b/configure.ac @@ -10,19 +10,24 @@ AM_SILENT_RULES([yes]) AC_PROG_CC AC_PROG_LIBTOOL -PKG_CHECK_MODULES([TBM], [libtbm wayland-tbm-server], [have_tbm=yes], [have_tbm=no]) +AC_ARG_ENABLE(tbm, AS_HELP_STRING([--disable-tbm], + [use tbm or not (default: enabled)]), + [have_tbm=$enableval], [have_tbm=yes]) + if test x$have_tbm = xyes; then + PKG_CHECK_MODULES([TBM], [libtbm wayland-tbm-server]) AC_DEFINE([HAVE_TBM], [1], [Build the tbm backend]) AC_ARG_ENABLE(tbm-queue, [--enable-tbm-queue],, enable_tbm_queue=no) - AM_CONDITIONAL(USE_TBM_QUEUE, test x$enable_tbm_queue = xyes) if test x$enable_tbm_queue = xyes; then AC_DEFINE([USE_TBM_QUEUE], [1], [Build gbm_tbm with TBM surface queue]) fi fi AM_CONDITIONAL(HAVE_TBM, test "x$have_tbm" = "xyes") +AM_CONDITIONAL(USE_TBM_QUEUE, test x$enable_tbm_queue = xyes) + AC_CONFIG_FILES([ Makefile gbm.pc diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index adc4da5..c32acea 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -30,7 +30,11 @@ Development header files for use with Wayland GBM %setup -q -n %{name} %build -%reconfigure --disable-static --enable-tbm-queue +%if "%_repository" == "emulator32-wayland" || "%_repository" == "emulator64-wayland" +%reconfigure --disable-static --disable-tbm +%else +%reconfigure --disable-static --enable-tbm --enable-tbm-queue +%endif make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER} %install -- 2.7.4 From fbeecc5f03c8bf7cc09d2e093d4ab1d0afb580ca Mon Sep 17 00:00:00 2001 From: "Mun, Gwan-gyeong" Date: Sat, 30 Apr 2016 01:00:42 +0900 Subject: [PATCH 08/16] enable tbm backend and tbm-queue on emulator environment. Change-Id: I0d9117cced57e69212aa463bc8c361915ba315d3 --- packaging/libgbm.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index c32acea..02568af 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -30,11 +30,7 @@ Development header files for use with Wayland GBM %setup -q -n %{name} %build -%if "%_repository" == "emulator32-wayland" || "%_repository" == "emulator64-wayland" -%reconfigure --disable-static --disable-tbm -%else %reconfigure --disable-static --enable-tbm --enable-tbm-queue -%endif make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER} %install -- 2.7.4 From fd3bc8d03f065c807c8dd12d22e67851cecf0e52 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Tue, 3 May 2016 20:40:46 +0900 Subject: [PATCH 09/16] Fix handle leak Change-Id: Ic4128016668f77e35657b1fe32817408727596d9 --- src/backend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend.c b/src/backend.c index a0aa744..332d960 100644 --- a/src/backend.c +++ b/src/backend.c @@ -82,8 +82,10 @@ load_backend(const struct backend_desc *backend) } init = dlsym(module, entrypoint); - if (!init) + if (!init) { + dlclose(module); return NULL; + } } return init; -- 2.7.4 From f37dc48624157b3cb0bdbd902151b6efe1d4adaa Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Tue, 10 May 2016 09:51:38 +0900 Subject: [PATCH 10/16] fix open module lost Change-Id: I2ebae8d762513fc68fccb90649b27a37ac596407 Signed-off-by: Junkyeong Kim --- src/backend.c | 16 ++++++++++++++++ src/backend.h | 2 ++ src/gbm.c | 4 +++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/backend.c b/src/backend.c index 332d960..13f705f 100644 --- a/src/backend.c +++ b/src/backend.c @@ -37,6 +37,8 @@ #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) +static void *g_gbm_module; + #if HAVE_TBM extern const struct gbm_backend gbm_tbm_backend; #endif @@ -64,6 +66,9 @@ load_backend(const struct backend_desc *backend) if (backend == NULL) return NULL; + if (g_gbm_module) + return NULL; + name = backend->name; if (backend->builtin) { @@ -87,6 +92,7 @@ load_backend(const struct backend_desc *backend) return NULL; } } + g_gbm_module = module; return init; } @@ -132,3 +138,13 @@ _gbm_create_device(int fd) return dev; } + +void +_gbm_close_device(void) +{ + if (g_gbm_module) { + dlclose(g_gbm_module); + g_gbm_module = NULL; + } +} + diff --git a/src/backend.h b/src/backend.h index 4a64375..8609196 100644 --- a/src/backend.h +++ b/src/backend.h @@ -32,5 +32,7 @@ struct gbm_device * _gbm_create_device(int fd); +void +_gbm_close_device(void); #endif diff --git a/src/gbm.c b/src/gbm.c index b6d207c..e62b694 100644 --- a/src/gbm.c +++ b/src/gbm.c @@ -104,8 +104,10 @@ GBM_EXPORT void gbm_device_destroy(struct gbm_device *gbm) { gbm->refcount--; - if (gbm->refcount == 0) + if (gbm->refcount == 0) { gbm->destroy(gbm); + _gbm_close_device(); + } } /** Create a gbm device for allocating buffers -- 2.7.4 From 1df80a91f82dbad6a6727868eab659fb864c5d34 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 19 May 2016 17:42:58 +0900 Subject: [PATCH 11/16] null initialization fix the build warning Change-Id: I6377b63cff5da7953a91eb91c6bf23204d5b3416 --- src/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend.c b/src/backend.c index 13f705f..8749f57 100644 --- a/src/backend.c +++ b/src/backend.c @@ -59,7 +59,7 @@ load_backend(const struct backend_desc *backend) { char path[PATH_MAX]; const void *init = NULL; - void *module; + void *module = NULL; const char *name; const char *entrypoint = "gbm_backend"; -- 2.7.4 From ae5d34445eee38daa4349a9ea0340b3faa324ded Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 19 May 2016 17:43:36 +0900 Subject: [PATCH 12/16] add -Werror to catch the build warnings Change-Id: I98966a119c753c9f1848b217dea046a7484f2501 --- packaging/libgbm.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index 02568af..757853c 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -30,7 +30,8 @@ Development header files for use with Wayland GBM %setup -q -n %{name} %build -%reconfigure --disable-static --enable-tbm --enable-tbm-queue +%reconfigure --disable-static --enable-tbm --enable-tbm-queue \ + CFLAGS="${CFLAGS} -Wall -Werror" make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER} %install -- 2.7.4 From 42d8ac517adfb5c6f10829da6856c21f2fd66188 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Fri, 26 May 2017 11:21:50 +0900 Subject: [PATCH 13/16] put the *.so file in the devel package *.so file should be in the devel package. and binary package does not need .so file Change-Id: I11ad4a33b756b14d42302bc625f96fbb1918f380 --- packaging/libgbm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index 757853c..1b246cd 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -49,7 +49,6 @@ ln -sf libgbm.so.%{MAJOR_VER} %{buildroot}%{_libdir}/libgbm.so %manifest packaging/libgbm.manifest %license COPYING %defattr(-,root,root,-) -%{_libdir}/libgbm.so %{_libdir}/libgbm.so.%{MAJOR_VER} %{_libdir}/libgbm.so.%{MAJOR_VER}.%{MINOR_VER}.0 @@ -59,3 +58,4 @@ ln -sf libgbm.so.%{MAJOR_VER} %{buildroot}%{_libdir}/libgbm.so %{_includedir}/gbmint.h %{_includedir}/gbm/* %{_libdir}/pkgconfig/gbm.pc +%{_libdir}/libgbm.so -- 2.7.4 From 4f61e70ad3d0b450871f70e3ec2c4a71d60e9278 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Tue, 1 Aug 2017 13:45:28 +0900 Subject: [PATCH 14/16] add alloc fail checking Change-Id: I8d901efb6ae2cb5c75b882ed2f56b529e020db1a Signed-off-by: Junkyeong Kim --- backends/tbm/gbm_tbm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backends/tbm/gbm_tbm.c b/backends/tbm/gbm_tbm.c index 92527c3..b000f34 100644 --- a/backends/tbm/gbm_tbm.c +++ b/backends/tbm/gbm_tbm.c @@ -366,6 +366,8 @@ __tbm_device_create(int fd) struct gbm_tbm_device *dri; dri = calloc(1, sizeof *dri); + if (dri == NULL) + return NULL; dri->bufmgr = tbm_bufmgr_init(fd); if (dri->bufmgr == NULL) -- 2.7.4 From cae1345fea77c2164ac337274a3a78e986ca19d8 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Tue, 1 Aug 2017 15:00:02 +0900 Subject: [PATCH 15/16] package version up to 1.0.1 Change-Id: Ie992fce1bff29942e48a2c4740b2d7949c0de7bd --- packaging/libgbm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index 1b246cd..1b5d749 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -3,7 +3,7 @@ Summary: Wayland GBM for TIZEN Name: libgbm -Version: %{MAJOR_VER}.%{MINOR_VER} +Version: %{MAJOR_VER}.%{MINOR_VER}.1 Release: 1 Group: System/Libraries License: MIT -- 2.7.4 From 263ab8b8e0e44a3d66af299daa163082f63cb5ac Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Mon, 15 Jul 2019 11:54:24 +0900 Subject: [PATCH 16/16] spec: Changed not to create libgbm-devel. - This package will no longer be used, and the gbm.h provided by mesa will be used for the build. Change-Id: Ie7ca176ae155a7828e5a63dd870bb0c8a6fc6d37 Signed-off-by: Joonbum Ko --- packaging/libgbm.spec | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/packaging/libgbm.spec b/packaging/libgbm.spec index 1b5d749..0b7c816 100644 --- a/packaging/libgbm.spec +++ b/packaging/libgbm.spec @@ -1,3 +1,5 @@ +%define _unpackaged_files_terminate_build 0 + %define MAJOR_VER 1 %define MINOR_VER 0 @@ -18,14 +20,6 @@ BuildRequires: pkgconfig(wayland-tbm-server) %description Wayland Generic Buffer Management for TIZEN -%package devel -Summary: Development header files for use with GBM -Group: System/Libraries -Requires: %{name} - -%description devel -Development header files for use with Wayland GBM - %prep %setup -q -n %{name} @@ -39,7 +33,6 @@ make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER} rm -f %{buildroot}/%{_libdir}/*.la ln -sf libgbm.so.%{MAJOR_VER}.%{MINOR_VER}.0 %{buildroot}%{_libdir}/libgbm.so.%{MAJOR_VER} -ln -sf libgbm.so.%{MAJOR_VER} %{buildroot}%{_libdir}/libgbm.so %post -p /sbin/ldconfig @@ -51,11 +44,3 @@ ln -sf libgbm.so.%{MAJOR_VER} %{buildroot}%{_libdir}/libgbm.so %defattr(-,root,root,-) %{_libdir}/libgbm.so.%{MAJOR_VER} %{_libdir}/libgbm.so.%{MAJOR_VER}.%{MINOR_VER}.0 - -%files devel -%defattr(-,root,root,-) -%{_includedir}/gbm.h -%{_includedir}/gbmint.h -%{_includedir}/gbm/* -%{_libdir}/pkgconfig/gbm.pc -%{_libdir}/libgbm.so -- 2.7.4