SooChan Lim [Wed, 23 Jun 2021 02:54:10 +0000 (11:54 +0900)]
tbm_surface_internal: refactor the creation of a surface
Reduce the duplicated codes and Be easy to handle an error
at the time of the surface creation.
Change-Id: I0327d332d8c7ec1a4b0919f562826a7ff5476b83
SooChan Lim [Wed, 23 Jun 2021 02:52:30 +0000 (11:52 +0900)]
tbm_bufmgr: add error as a parameter
add an error parameter to tbm_bufmgr_internal_alloc_bo_with_bo_data
to get the error.
Change-Id: I4def2716f5e749b9a768dfec5f6416d527cb2144
SooChan Lim [Tue, 22 Jun 2021 07:17:19 +0000 (16:17 +0900)]
tbm_bufmgr: do not include the backend header files
tbm_module include the backend header files, so
tbm_bufmgr does not need to include the backend header files.
Change-Id: I923c6ffcc44d372983c6e26bf064e020c13718aa
SooChan Lim [Tue, 22 Jun 2021 07:03:37 +0000 (16:03 +0900)]
tbm_bo: remove the priv at tbm_bo structure
Change-Id: I190924c2f30fece7e2bab6a559df7aeef58a2257
SooChan Lim [Tue, 22 Jun 2021 07:03:09 +0000 (16:03 +0900)]
tbm_bo: swap the bo_data intead of priv
Change-Id: I00deb3af0a346eb48a545a9f7a0397086c6539c3
SooChan Lim [Tue, 22 Jun 2021 06:47:45 +0000 (15:47 +0900)]
tbm_module: change the tbm_module_bo_xxx signature
remove tbm_module and tbm_bo arguments.
change the prefix of the name from tbm_module_bo_xxx to tbm_bo_data_xxx
Change-Id: I03f133e90e141e4ed7f843043919871e2a97c09b
SooChan Lim [Tue, 22 Jun 2021 06:24:37 +0000 (15:24 +0900)]
tbm_module: add tbm_bo_data structure and use it
The tbm_bo_data encapsulates the backend bo_data.
The tbm_module can manage the backend bo_data with this
tbm_bo_data.
Change-Id: I299475b9c6f1619ef00e0968f0c43152cddf9bdd
SooChan Lim [Tue, 22 Jun 2021 04:16:52 +0000 (13:16 +0900)]
tbm_module: change tbm_backend_surface_data into tbm_surface_data
Change-Id: Ib8b0cc86f82ed4cd4dd32ac5ed0ec08aa75baefa
SooChan Lim [Tue, 22 Jun 2021 03:25:31 +0000 (12:25 +0900)]
tbm_bufmgr: use tbm_module
The tbm_module has the information about the backend modules of libtbm.
The tbm_bufmgr does not access the backend module information directly
instead tbm_module has taken in charge of the managememt of the backend
module of libtbm.
Change-Id: I5422fa077f9924dc31afc4bf76c390c26d3dcaa2
SooChan Lim [Tue, 22 Jun 2021 03:24:06 +0000 (12:24 +0900)]
tbm_bufmgr_backend: use module
The bufmgr argument is the tbm_module at libtbm.
Change-Id: Ice96d5dcd457d1da65f8ac9982bb9dc1aa0978d8
SooChan Lim [Tue, 22 Jun 2021 03:23:07 +0000 (12:23 +0900)]
tbm_module: use backend pointer instead of bo->bufmgr->backend pointer
Change-Id: Ib625067f80dc896b6313c93302a87364bf750df6
SooChan Lim [Tue, 22 Jun 2021 02:52:25 +0000 (11:52 +0900)]
tbm_bo: change the name of the member vars
change the name from get_from_hal_surface to get_from_surface_data.
Change-Id: I09504455e35cc9cb77e78675db44cbb7e21392cb
SooChan Lim [Tue, 22 Jun 2021 02:44:05 +0000 (11:44 +0900)]
tc: skip the testcase when api does not support.
skip some tbm_surface api which may not be supported.
Change-Id: I0e143746004c5a81c8ab87501bc9eaa57907361a
SooChan Lim [Tue, 22 Jun 2021 02:33:34 +0000 (11:33 +0900)]
tbm_surface_internal: implement tbm_surface functions with tbm_suface_data api
Use tbm_surface_data instead of hal_tbm_surface at tbm_surface_internal.c
Change-Id: I137edbfd63756c1c975731baae05cedd554de4be
SooChan Lim [Tue, 22 Jun 2021 02:29:08 +0000 (11:29 +0900)]
tbm_surface: add tbm_backend_surface_data to tbm_surface structure
tbm_backend_surface_data is the surface_data from HAL-TBM backend
module.
Change-Id: Ieb8ec6ae10dbbc8e5ef49dd4598567778ae58dc2
SooChan Lim [Tue, 22 Jun 2021 02:24:29 +0000 (11:24 +0900)]
tbm_module: add tbm_module_support_surface_data
This tells whether the module support surface_data.
Change-Id: I84bfa7849daad784feab9c2d7779adbe3bcea934
SooChan Lim [Tue, 22 Jun 2021 02:23:04 +0000 (11:23 +0900)]
tbm_module: add tbm_surface_data_export
This exports the buffer_data from surface_data.
Change-Id: If4731f1acd61a4498139549fd49fd39d10dca4fe
SooChan Lim [Tue, 22 Jun 2021 02:21:56 +0000 (11:21 +0900)]
tbm_module: add tbm_surface_data_get_bo_data_array
This gets the bo_data array from the surface_data
Change-Id: I3f22258b732a26664152f4668195a968678cb3ab
SooChan Lim [Tue, 22 Jun 2021 02:20:17 +0000 (11:20 +0900)]
tbm_module: add tbm_surface_data_get_plane_data
This gets the plane data from the surface_data
Change-Id: I4dc59461c28941c0f4184b3a70ea6d5922925b42
SooChan Lim [Tue, 22 Jun 2021 02:17:31 +0000 (11:17 +0900)]
tbm_module: add tbm_surface_data_free
This frees tbm_surface_data resource.
Change-Id: I2b54f218f08ed2cb63f7a651539ccb8334ff34ee
SooChan Lim [Tue, 22 Jun 2021 01:40:50 +0000 (10:40 +0900)]
tbm_module: add tbm_module_import_surface_data
This imports a tbm_backend_surface_data resource with
tbm_surface_buffer_data.
Change-Id: I3ea0507aab1c64e8906d5d9c59298ce41c897e57
SooChan Lim [Tue, 22 Jun 2021 01:39:41 +0000 (10:39 +0900)]
tbm_module: add tbm_module_alloc_surface_data
This allocates a tbm_backend_surface_data resource.
Change-Id: I3548be16f63fa616feff4e740749f8ac1356a548
SooChan Lim [Tue, 22 Jun 2021 01:10:51 +0000 (10:10 +0900)]
tbm_module: add tbm_backend_surface_data structure
The tbm_backend_surface_data is a resource information from HAL-TBM.
Change-Id: Iec3dfc8630dd0e2059a64d22e53c9edb91cb570d
SooChan Lim [Tue, 22 Jun 2021 01:23:27 +0000 (10:23 +0900)]
tbm_module: change the api name for allocation of bo_data
use bo_data instead of bo
Change-Id: I5b13bc8b4fdfd4fa3881f1027df7cc6e95299497
SooChan Lim [Tue, 22 Jun 2021 01:17:24 +0000 (10:17 +0900)]
tbm_module: change tbm_module_bufmgr_ to tbm_module_
Change-Id: If69b109fdc88d36c36f11349a97d1e334a0e8ae9
SooChan Lim [Mon, 21 Jun 2021 01:29:41 +0000 (10:29 +0900)]
Package version up to 4.1.5
Change-Id: If451967746b33eabfca3e74304d596e178db6f8b
SooChan Lim [Mon, 21 Jun 2021 01:28:45 +0000 (10:28 +0900)]
tbm_module: free bo when it is not from hal_surface.
This patch fix the memory leak.
Change-Id: I60dc2669aadeffdfa286a06108f448f450b43f56
Changyeon Lee [Fri, 18 Jun 2021 08:58:11 +0000 (17:58 +0900)]
tbm_surface_internal: Support XBGR, ABGR format in capture
Change-Id: I19bad30aa8ee6931a7d48495d052d0aab5543cd7
SooChan Lim [Fri, 18 Jun 2021 04:51:49 +0000 (13:51 +0900)]
Package version up to 4.1.4
Change-Id: Ie91ee1b6320a3e77150feaa714012ad833f41e8f
SooChan Lim [Fri, 18 Jun 2021 02:16:09 +0000 (11:16 +0900)]
tbm_module: make tbm_module.h
make tbm_module.h and move structures and symbols
form tbm_bufmgr_int.h to tbm_module.h
Change-Id: I3064ebb93c049daf36c834418e0b004761382191
SooChan Lim [Fri, 18 Jun 2021 01:30:21 +0000 (10:30 +0900)]
tbm_module: initialize the bo_handle to be null.
Change-Id: Iaff9f5ecec556bdf611cd44c5a013ad800923948
SooChan Lim [Thu, 17 Jun 2021 10:49:24 +0000 (19:49 +0900)]
tbm_module: change tbm_module_bufmgr symbol names
The changed symbols are below.
- tbm_module_bufmgr_alloc_bo
- tbm_module_bufmgr_alloc_bo_with_format
- tbm_module_bufmgr_import_bo_with_fd
- tbm_module_bufmgr_import_bo_with_key
Change-Id: Ia91b4fabc15777c06d153062d498eb38650df140
SooChan Lim [Thu, 17 Jun 2021 10:29:16 +0000 (19:29 +0900)]
tbm_module: do not print error message
do not print error message when the bufmgr_func->bufmgr_alloc_bo_with_format
does not exists. when it does not exists, allocation logic call the
fallback alloc_bo function.
Change-Id: If760eab7372ad67bc032f1ae99c28829ff7fc834
SooChan Lim [Thu, 17 Jun 2021 10:20:52 +0000 (19:20 +0900)]
tbm_module: add tbm_module_bo_exportd_key and use it
The tbm_module_bo_export_key calls it's backend function
Change-Id: I24be15e2e60829bb4d4da0d562f032447c232c22
SooChan Lim [Thu, 17 Jun 2021 10:10:35 +0000 (19:10 +0900)]
tbm_module: add tbm_module_bo_exportd_fd and use it
The tbm_module_bo_export_fd calls it's backend function
Change-Id: I806c6fb60545ee0777d837ab3ada36f7a511017e
SooChan Lim [Thu, 17 Jun 2021 09:59:14 +0000 (18:59 +0900)]
tbm_module: add tbm_module_bo_unlock and use it
The tbm_module_bo_unlock calls it's backend function
Change-Id: Ic9b5f241223780dd39bed1c508a58140245c09d0
SooChan Lim [Thu, 17 Jun 2021 09:45:19 +0000 (18:45 +0900)]
tbm_module: add tbm_module_bo_lock and use it
The tbm_module_bo_lock calls it's backend function
Change-Id: Ie409832d92c73d11ce205b25dd2a296fd4cd74f4
SooChan Lim [Thu, 17 Jun 2021 08:27:33 +0000 (17:27 +0900)]
tbm_module: add tbm_module_bo_unmap and use it
The tbm_module_bo_unmap calls it's backend function
Change-Id: I4dbd8164bf1cbd7d67af0e22ce40d46be24dabd1
SooChan Lim [Thu, 17 Jun 2021 08:18:14 +0000 (17:18 +0900)]
tbm_module: add tbm_module_bo_map and use it
The tbm_module_bo_map calls it's backend function
Change-Id: I73cd41c9fe283a3e8d406a1a80d5468a494e98be
SooChan Lim [Thu, 17 Jun 2021 08:08:48 +0000 (17:08 +0900)]
tbm_module: add tbm_module_bo_get_bo_handle and use it
The tbm_module_bo_get_bo_handle calls it's backend function
Change-Id: I14f12650031bc1ca250de953724e8ac9f91e7664
SooChan Lim [Thu, 17 Jun 2021 07:45:54 +0000 (16:45 +0900)]
tbm_module: add tbm_module_bo_get_memory_types and use it
The tbm_module_bo_get_memory_types calls it's backend function
Change-Id: I1d56ab9485bc1cccf089c65cd66da87fae288823
SooChan Lim [Thu, 17 Jun 2021 07:30:08 +0000 (16:30 +0900)]
tbm_module: add tbm_module_bo_get_size and use it
The tbm_module_bo_get_size calls it's backend function.
Change-Id: I8b06b99e565b673de3a192537658b1bb0e63e1dd
SooChan Lim [Thu, 17 Jun 2021 07:07:21 +0000 (16:07 +0900)]
tbm_module: add tbm_module_bo_free and use it
The tbm_module_bo_free calls it's backend function.
Change-Id: Ic0aa305f742ef543119d607061c8abe59cf1bae9
SooChan Lim [Thu, 17 Jun 2021 04:56:58 +0000 (13:56 +0900)]
Package version up to 4.1.3
Change-Id: Iff89a3f9519d316f2ba49598ba7c47481082b66e
SooChan Lim [Thu, 17 Jun 2021 01:34:36 +0000 (10:34 +0900)]
tbm_surface_internal: donot set error type
the error type should be set by hal backend.
Change-Id: I4a7c47d8a091c01c124d09072462ae18a317ea8b
SooChan Lim [Thu, 17 Jun 2021 01:18:30 +0000 (10:18 +0900)]
tbm_surface_internal: remove dead code
Change-Id: I540255281d74ade6a96c0e98ed50f4ffc6c5eeeb
SooChan Lim [Thu, 17 Jun 2021 01:02:08 +0000 (10:02 +0900)]
tbm_module: fix the wrong condition
A fd has to be checked if it is less than 0.
Change-Id: Ia71d5208060e4d1e6e6965c3f3848e0d77aaea6c
SooChan Lim [Thu, 17 Jun 2021 01:00:44 +0000 (10:00 +0900)]
tbm_bufmgr: make a reset function for initializing module_data
This static function will be deleted after refactoring tbm_module.
Change-Id: Icb63be6362f3b03f1eb99d2444f569f8b75cc70b
SooChan Lim [Thu, 17 Jun 2021 00:48:11 +0000 (09:48 +0900)]
tbm_surface_internal: check the memory validation at macro
checkt the validataion of the error pointer at TBM_SURFACE_RETURN_VAL_SET_ERR_IF_FAIL
Change-Id: Idd6815577e1e03d0bfc0ad1e234e348e18b7055f
SooChan Lim [Wed, 16 Jun 2021 08:20:54 +0000 (17:20 +0900)]
tbm_bufmgr: add tbm_bufmgr_internal_import_bo_with_fd and use it
The tbm_bufmgr generates tbm_bo and manages them
Change-Id: Ie292badda463f17a7e0eba0b4320c9ea537ab7c1
SooChan Lim [Wed, 16 Jun 2021 07:55:13 +0000 (16:55 +0900)]
tbm_bufmgr: add tbm_bufmgr_internal_import_bo_with_key and use it
The tbm_bufmgr generates tbm_bo and manages them
Change-Id: Iac149b45c70a38eefc887a11770dde0d61faeeb7
SooChan Lim [Wed, 16 Jun 2021 07:42:24 +0000 (16:42 +0900)]
tbm_bufmgr: add tbm_bufmgr_internal_alloc_bo and use it
The tbm_bufmgr generates tbm_bo and manages them.
Change-Id: I2dae9758aba658c28c26ba595a049edc45f914c8
SooChan Lim [Wed, 16 Jun 2021 06:00:00 +0000 (15:00 +0900)]
tbm_bufmgr: change tbm_bo_alloc_with_bo_data name
change tbm_bo_alloc_with_bo_data into tbm_bufmgr_internal_alloc_bo_with_bo_data
and move this function to tbm_bufmgr.c
Change-Id: I7266e1630043d9ee64ea228070b6f78940d4acc0
SooChan Lim [Wed, 16 Jun 2021 05:40:40 +0000 (14:40 +0900)]
tbm_bufmgr: change tbm_bo_alloc_with_format name
change tbm_bo_alloc_with_format into tbm_bufmgr_internal_alloc_bo_with_format
and move this function to tbm_bufmgr.c
Change-Id: I1827f2ee05534ad7a56221b4c704a33dc965c432
SooChan Lim [Wed, 16 Jun 2021 05:17:50 +0000 (14:17 +0900)]
tbm_bo: remove error log.
Change-Id: Id8928e5abbfea8873e55f2e79e1f3b5059f2dc9f
SooChan Lim [Wed, 16 Jun 2021 03:14:02 +0000 (12:14 +0900)]
tbm_bufmgr: add tbm_bufmgr_internal_find_bo
The tbm_bufmgr_internal_find_bo find the bo which has
the same bo_data in the bufmgr->bo_list.
Change-Id: I6fe4cda6bac1714a8c9d69fb938a179f09cc701a
SooChan Lim [Tue, 15 Jun 2021 11:56:54 +0000 (20:56 +0900)]
tbm_module: make tbm_module_bufmgr_import_key
encapsulate the bufmgr_import_key with this function.
Change-Id: I45c098c07caa00038e1ec983dd11b535bb030f0d
SooChan Lim [Tue, 15 Jun 2021 11:42:35 +0000 (20:42 +0900)]
tbm_module: make tbm_module_bufmgr_import_fd
encapsulate the bufmgr_import_fd with this function.
Change-Id: I8a5ed58ba688123875e7d26a1bb0545a7004d54d
SooChan Lim [Tue, 15 Jun 2021 08:46:19 +0000 (17:46 +0900)]
tbm_module: make tbm_module_bufmgr_get_plane_data
encapsulate the bufmgr_get_plane_data with this function.
Change-Id: I8eb465b3a72e1831c0e46ca14e020fdc4af5e971
SooChan Lim [Tue, 15 Jun 2021 05:42:31 +0000 (14:42 +0900)]
tbm_module: check coverage with the TBM_MODULE_TYPE_HAL_TBM
We do not check coverage with old module type.
Change-Id: If62e1a813a5117f0d3fcd0e60d84f67334b1e40c
SooChan Lim [Tue, 15 Jun 2021 05:39:00 +0000 (14:39 +0900)]
tbm_module: make tbm_module_bufmgr_get_supported_format
encapsulate the bufmgr_get_supported_format with this function.
Change-Id: Ia816a505b2a0bfa7cd01997c44f0b1317696761a
SooChan Lim [Tue, 15 Jun 2021 05:20:36 +0000 (14:20 +0900)]
tbm_module: TBM_MODULE_TYPE_BUFMGR_BACKEND is deprecated after Tizen 6.5
Change-Id: I84d24e9b3de06de9f72cf1f85a3e40354b64d435
SooChan Lim [Tue, 15 Jun 2021 05:19:37 +0000 (14:19 +0900)]
tbm_module: make tbm_module_bufmgr_bind_native_display
encapsulate the bufmgr_bind_native_display with this function.
Change-Id: I777a9ff365b9211eaacb7a350623c8974cd77324
SooChan Lim [Tue, 15 Jun 2021 04:38:08 +0000 (13:38 +0900)]
tbm_bo: remove tbm_bo_alloc_with_surface
The tbm_bo_alloc_with_surface does not use anymore.
The bufmgr->backend will be deprecated.
Change-Id: I032df2de270e2fd4bbe7f5829bdede962213d8ab
SooChan Lim [Tue, 15 Jun 2021 03:25:35 +0000 (12:25 +0900)]
tbm_surface_internal: remove direct alls of backend functions
The tbm_bo_alloc_with_format calls tbm_module_bo_alloc_with_format.
The tbm_module_bo_alloc_with_format calls the backend functions.
Change-Id: Ic5cac77257e95e567367b6f16c395c55dd22beba
SooChan Lim [Tue, 15 Jun 2021 03:11:43 +0000 (12:11 +0900)]
tbm_bo: remove tbm_bo_alloc_with_tiled_format
This function is internal function and it is not used anymore.
The bufmgr_func->bufmgr_alloc_bo_with_tiled_format backend func will
be deprecated.
Change-Id: Id933ac57cdbf337734d430570399725f7a218dac
SooChan Lim [Tue, 15 Jun 2021 04:20:42 +0000 (13:20 +0900)]
tbm_module: check the bufmgr_func symbol at tbm_module_bufmgr_get_capabilities
This avoids a crash when the bufmgr_funcs does not have a symbol.
Change-Id: I27109d06403d974629badf17bc6ed8eb49cfd6cb
SooChan Lim [Mon, 14 Jun 2021 08:56:51 +0000 (17:56 +0900)]
tbm_module: make tbm_module_bufmgr_bo_alloc_with_format function
encapsulate the bufmgr_bo_alloce_with_format with this function.
Change-Id: Ic68228a4204aaec28c4887bf9fd87194fd3e1937
SooChan Lim [Fri, 11 Jun 2021 08:10:36 +0000 (17:10 +0900)]
tbm_module: get the error type at tbm_module_bufmgr_get_capabilities
return the error type which is returned by
tbm_module_bufmgr_get_capabilities
Change-Id: I7199e8e44ad802c1e743439321f1c2b5ac965739
SooChan Lim [Fri, 11 Jun 2021 07:53:55 +0000 (16:53 +0900)]
tbm_module: make tbm_module_bufmgr_bo_alloc function
encapsulate the bufmgr_bo_allocation with this function.
Change-Id: I28f3d6196950ca3a7e41757b63f8da64fc45a237
SooChan Lim [Fri, 11 Jun 2021 08:06:15 +0000 (17:06 +0900)]
tbm_log: add the condition check macro with error
Change-Id: I064a9d7588a4d8ec0f02fa5da770b5c12c3bbcb6
SooChan Lim [Fri, 11 Jun 2021 07:27:25 +0000 (16:27 +0900)]
tc: fix the prefix of the definition in tc_tbm.h
Change-Id: If82a337d08ddc8a632a40679e7feaa13f8cf4a7a
SooChan Lim [Tue, 15 Jun 2021 08:53:18 +0000 (17:53 +0900)]
tbm_bo: initialize the bo2
Change-Id: I56c25746dabf86426ab632bcbfc8b6a6674da8d8
SooChan Lim [Fri, 11 Jun 2021 06:36:05 +0000 (15:36 +0900)]
Package version up to 4.1.2
Change-Id: If75f028c54562ee417cdbe93440fb4cf03ba3906
SooChan Lim [Fri, 11 Jun 2021 06:34:42 +0000 (15:34 +0900)]
tc: skip the test case when it does not have hal-tbm module
Change-Id: I989c46b00750fc4b6d4a683dec44f6a015cea3df
SooChan Lim [Fri, 11 Jun 2021 06:33:43 +0000 (15:33 +0900)]
tc: fix the macros for logging.
fix the build break when it uses the log macro of logging
Change-Id: I6dff92297fcf0de224c32477df163b90d604353d
SooChan Lim [Fri, 11 Jun 2021 06:32:28 +0000 (15:32 +0900)]
tbm_backend: fix the handle casting.
use tbm_modlue instead of tbm_bufmgr in libtbm because of refactoring of tbm_module.
Change-Id: I600299e09eef8facbbc9b7d4c5dbfd10bc70f540
SooChan Lim [Fri, 11 Jun 2021 00:45:40 +0000 (09:45 +0900)]
tbm_module: remove bufmgr variable at tbm_module
The tbm_modlue does not have a dependency of tbm_bufmgr anymore.
Remove all tbm_bufmgr variables at tbm_module.
Change-Id: Ia8be69be53aaaac2985e820b368d265fa32f7149
SooChan Lim [Thu, 10 Jun 2021 23:56:31 +0000 (08:56 +0900)]
tbm_bufmgr: move copy functions for module information to tbm_bufmgr
The copy function for module information is moved from tbm_module to
tbm_bufmgr.
Change-Id: I99d0910042020839ce7efd728a5cb7127bd9f6f8
SooChan Lim [Thu, 10 Jun 2021 06:49:47 +0000 (15:49 +0900)]
tbm_bufmgr: remove the included header file.
Change-Id: I9e6a5f79785f3101c0ef8170cd7a17ab52ca3f80
SooChan Lim [Thu, 10 Jun 2021 06:47:23 +0000 (15:47 +0900)]
tbm_bufmgr: use tbm_module_bufmgr_get_capabilities
Use tbm_module_bufmgr_get_capabilities and
remove the code for getting capabilities at tbm_module.c
Change-Id: Iff76fa966f202a1a28e2a518733ba7901e43b490
SooChan Lim [Thu, 10 Jun 2021 06:42:04 +0000 (15:42 +0900)]
tbm_module : add tbm_module_bufmgr_get_capabilities
This function returns the capabilities of the bufmgr module.
Change-Id: I9279fe2b025e46526931e0c063993723410ce61e
SooChan Lim [Thu, 10 Jun 2021 06:37:05 +0000 (15:37 +0900)]
tbm_module: change if-statement into switch-case
Change-Id: Ibba1869f6851bbc6a5a1d4074752c50b46ab7f46
SooChan Lim [Thu, 10 Jun 2021 06:22:28 +0000 (15:22 +0900)]
tbm_module: use module instead of bufmgr
set the information to tbm_module and
copy the information of tbm_module to bufmgr.
During the refactoring, the module infomation
in the bufmgr will be removed.
Change-Id: I94c9c121acf6af5bd8dea6377dd71fb29ee31eb6
SooChan Lim [Thu, 10 Jun 2021 02:04:13 +0000 (11:04 +0900)]
tbm_bufmgr: use tbm_module_load/unload functions
Use tbm_module_load/unload functions and
remove the useless codes.
Change-Id: I1f239b514632a639c20874c1bdd4db2a397a9b4d
SooChan Lim [Thu, 10 Jun 2021 01:50:39 +0000 (10:50 +0900)]
tbm_module: migrate the module funtions from tbm_bufmgr.c
Copy the module functions in tbm_bufmgr.c to tbm_module.c
Change-Id: I7a5e18a82064a78a6239e8623e2431fee39dd08c
SooChan Lim [Thu, 10 Jun 2021 01:25:26 +0000 (10:25 +0900)]
tbm_module: add tbm_module.c file
Change-Id: I5e8d4d9454f453d66381dacba1905817e04db245
SooChan Lim [Thu, 10 Jun 2021 01:21:13 +0000 (10:21 +0900)]
tbm_bufmgr: define tbm_module structure.
The tbm_module manages the backend modules of tbm.
1. manage the backend types.
2. manage the backend resources.
2. control the backend functions.
Change-Id: I4c59c10b291acce91b98fe6013398b0c501011c2
SooChan Lim [Thu, 10 Jun 2021 00:53:13 +0000 (09:53 +0900)]
Package version up to 4.1.1
Change-Id: Ia0b360300f1ae0734a87dfacc7759656277058ff
SooChan Lim [Thu, 10 Jun 2021 00:36:08 +0000 (09:36 +0900)]
tbm_bo: add get_from_hal_surface flag at tbm_bo
The bo_data has to be freed at hal backend when
the get_from_hal_surface flag at tbm_bo is set.
Otherwise, the bo_data is freed at libtbm.
hal_tbm_surface has to deal with the life-cycle
of the hal_tbm_bo created by hal_tbm_surface.
Change-Id: I9342e5990796543bf6cf4a366fce6753a279f1e2
Signed-off-by: SooChan Lim <sc1.lim@samsung.com>
SooChan Lim [Fri, 28 May 2021 06:10:33 +0000 (15:10 +0900)]
Package version up to 4.1.0
Change-Id: Ibbeb5b4679f4d691e2ff127a4f7bc97864d44db4
SooChan Lim [Tue, 11 May 2021 23:42:01 +0000 (08:42 +0900)]
tbm_bo: check the bo which has the same bo_data
There is just one bo with a bo_data, so increase the
reference count when it has the same bo_data.
Change-Id: I6258a6a8bf1f8a268619c70278f7b0d57a20b9ac
SooChan Lim [Tue, 11 May 2021 23:40:45 +0000 (08:40 +0900)]
tbm_surface_internal: tbm_surface_internal_import
It returns tbm_surface_h from buffer_data.
Change-Id: Ib7f91c092d0c73cc9b707ad6ad3d8262d365b4cd
SooChan Lim [Tue, 11 May 2021 23:39:07 +0000 (08:39 +0900)]
tbm_surface_internal: implement tbm_surface_internal_export
It returns a buffer_data.
Change-Id: I4cb6cdfd86815abe478429e5cfb792b9b9d66594
SooChan Lim [Tue, 11 May 2021 23:37:40 +0000 (08:37 +0900)]
tbm_surface_internal: add some error log macros
this macros deals with the tbm_error types when a condition is failed.
Change-Id: Ie458e7b84b3d39565a5b535dac7beac111330e51
SooChan Lim [Mon, 10 May 2021 12:50:14 +0000 (21:50 +0900)]
tc: add tcs for tbm_surface_internal_export/import
Change-Id: Id65e71408a5a165db99d693325f118c2d22c54b0
SooChan Lim [Fri, 30 Apr 2021 07:03:46 +0000 (16:03 +0900)]
tbm_bo: free hal_tbm_bo when it is allocated by tbm_bo_alloc
The hal_tbm_do which is allocated by tbm_bo_alloc_with_tbm_backend_data
is not freed at this _tbm_bo_free. The hal_tbm_bo from hal_tbm_surface
will be and should be freed at the hal-tbm-api backend module.
Change-Id: Ie10ecc370d1365a2c4a1067d3295d3fb632d7a0d
SooChan Lim [Fri, 30 Apr 2021 04:35:43 +0000 (13:35 +0900)]
allocate the tbm_surface when it has hal_tbm.
When libtbm uses hal-tbm-api, it creates a tbm_surface_h with a new
hal_tbm_surface.
Change-Id: Ic3aeb3d0d3b2b1a11b02b8f61ca57858a57ddbc9
SooChan Lim [Fri, 30 Apr 2021 04:33:54 +0000 (13:33 +0900)]
add tbm_bo_alloc_with_bo_data
The tbm_bo_alloc_with_bo_data allocate tbm_bo with tbm_backend_bo_data.
Change-Id: I2980170d99e907e64c263468ade10be8bf40fe17
SooChan Lim [Thu, 29 Apr 2021 07:49:23 +0000 (16:49 +0900)]
tbm_surface_internal: set an error when the refcnt of a surface is less than 0
Only at TW3, we can watch that the refcnt of a surface is less than 0
when we run tbm-haltests all.
Change-Id: I614c48c412783bbbe7a21cca905da3440e7057f0