• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

external/gbm_gralloc


Commit MetaInfo

Revision5a1b30eb410bf88f9804a7bd29554f52a86348a6 (tree)
Zeit2017-07-07 06:08:12
AutorAleksander Morgado <aleksander@alek...>
CommiterRob Herring

Log Message

Sync with the gbm API to import FD with modifier

Commit 4026744fcb31f1d27c1b32e6945aadd4da415c6d in mesa introduced an
updated struct gbm_import_fd_modifier_data' with arrays for fds,
strides and offsets, instead of single values.

Fix just by specifying one single item in the arrays.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>

Ändern Zusammenfassung

Diff

--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -132,10 +132,8 @@ static struct gralloc_gbm_bo_t *gbm_import(struct gbm_device *gbm,
132132 return NULL;
133133 }
134134
135- data.fd = handle->prime_fd;
136135 data.width = handle->width;
137136 data.height = handle->height;
138- data.stride = handle->stride;
139137 data.format = format;
140138 /* Adjust the width and height for a GBM GR88 buffer */
141139 if (handle->format == HAL_PIXEL_FORMAT_YV12) {
@@ -144,9 +142,14 @@ static struct gralloc_gbm_bo_t *gbm_import(struct gbm_device *gbm,
144142 }
145143
146144 #ifdef GBM_BO_IMPORT_FD_MODIFIER
145+ data.num_fds = 1;
146+ data.fds[0] = handle->prime_fd;
147+ data.strides[0] = handle->stride;
147148 data.modifier = handle->modifier;
148149 buf->bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD_MODIFIER, &data, 0);
149150 #else
151+ data.fd = handle->prime_fd;
152+ data.stride = handle->stride;
150153 buf->bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD, &data, 0);
151154 #endif
152155 if (!buf->bo) {