May 25, 2018 updates: Privacy Policy

Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-drm_gralloc: Commit

external/drm_gralloc


Commit MetaInfo

Révision9b65142921951368fa53e48508b388cadeb55854 (tree)
l'heure2015-11-14 01:18:41
AuteurMauro Rossi <issor.oruam@gmai...>
CommiterChih-Wei Huang

Message de Log

fix GRALLOC_DRM_HANDLE_NUM_INTS definition for 64-bit

As highlighted by pstglia current definition of GRALLOC_DRM_HANDLE_NUM_INTS
causes issues with 64-bit, because a pointer is accounted as having size of
an integer, which is not applicable to 64-bit pointer

The same definition adopted in AOSP hardware/drm_gralloc master branch has
been used, without changing the structure of gralloc_drm_handle_t.

Change Summary

Modification

--- a/gralloc_drm_handle.h
+++ b/gralloc_drm_handle.h
@@ -36,9 +36,6 @@ struct gralloc_drm_bo_t;
3636 struct gralloc_drm_handle_t {
3737 native_handle_t base;
3838
39-#define GRALLOC_DRM_HANDLE_MAGIC 0x12345678
40-#define GRALLOC_DRM_HANDLE_NUM_INTS 10
41-#define GRALLOC_DRM_HANDLE_NUM_FDS 0
4239 int magic;
4340
4441 int width;
@@ -55,6 +52,12 @@ struct gralloc_drm_handle_t {
5552 struct gralloc_drm_bo_t *data; /* pointer to struct gralloc_drm_bo_t */
5653 };
5754
55+#define GRALLOC_DRM_HANDLE_MAGIC 0x12345678
56+#define GRALLOC_DRM_HANDLE_NUM_FDS 0
57+#define GRALLOC_DRM_HANDLE_NUM_INTS ( \
58+ ((sizeof(struct gralloc_drm_handle_t) - sizeof(native_handle_t))/sizeof(int)) \
59+ - GRALLOC_DRM_HANDLE_NUM_FDS)
60+
5861 static inline struct gralloc_drm_handle_t *gralloc_drm_handle(buffer_handle_t _handle)
5962 {
6063 struct gralloc_drm_handle_t *handle =
Afficher sur ancien navigateur de dépôt.