diff options
Diffstat (limited to 'omap')
-rw-r--r-- | omap/omap_drm.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/omap/omap_drm.c b/omap/omap_drm.c index 7bc89842..ff83a930 100644 --- a/omap/omap_drm.c +++ b/omap/omap_drm.c | |||
@@ -92,7 +92,7 @@ static struct omap_device * omap_device_new_impl(int fd) | |||
92 | return dev; | 92 | return dev; |
93 | } | 93 | } |
94 | 94 | ||
95 | drm_public struct omap_device * omap_device_new(int fd) | 95 | struct omap_device * omap_device_new(int fd) |
96 | { | 96 | { |
97 | struct omap_device *dev = NULL; | 97 | struct omap_device *dev = NULL; |
98 | 98 | ||
@@ -115,13 +115,13 @@ drm_public struct omap_device * omap_device_new(int fd) | |||
115 | return dev; | 115 | return dev; |
116 | } | 116 | } |
117 | 117 | ||
118 | drm_public struct omap_device * omap_device_ref(struct omap_device *dev) | 118 | struct omap_device * omap_device_ref(struct omap_device *dev) |
119 | { | 119 | { |
120 | atomic_inc(&dev->refcnt); | 120 | atomic_inc(&dev->refcnt); |
121 | return dev; | 121 | return dev; |
122 | } | 122 | } |
123 | 123 | ||
124 | drm_public void omap_device_del(struct omap_device *dev) | 124 | void omap_device_del(struct omap_device *dev) |
125 | { | 125 | { |
126 | if (!atomic_dec_and_test(&dev->refcnt)) | 126 | if (!atomic_dec_and_test(&dev->refcnt)) |
127 | return; | 127 | return; |
@@ -132,7 +132,7 @@ drm_public void omap_device_del(struct omap_device *dev) | |||
132 | free(dev); | 132 | free(dev); |
133 | } | 133 | } |
134 | 134 | ||
135 | drm_public int | 135 | int |
136 | omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) | 136 | omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) |
137 | { | 137 | { |
138 | struct drm_omap_param req = { | 138 | struct drm_omap_param req = { |
@@ -150,7 +150,7 @@ omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) | |||
150 | return 0; | 150 | return 0; |
151 | } | 151 | } |
152 | 152 | ||
153 | drm_public int | 153 | int |
154 | omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value) | 154 | omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value) |
155 | { | 155 | { |
156 | struct drm_omap_param req = { | 156 | struct drm_omap_param req = { |
@@ -229,7 +229,7 @@ fail: | |||
229 | 229 | ||
230 | 230 | ||
231 | /* allocate a new (un-tiled) buffer object */ | 231 | /* allocate a new (un-tiled) buffer object */ |
232 | drm_public struct omap_bo * | 232 | struct omap_bo * |
233 | omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) | 233 | omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) |
234 | { | 234 | { |
235 | union omap_gem_size gsize = { | 235 | union omap_gem_size gsize = { |
@@ -242,7 +242,7 @@ omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | /* allocate a new buffer object */ | 244 | /* allocate a new buffer object */ |
245 | drm_public struct omap_bo * | 245 | struct omap_bo * |
246 | omap_bo_new_tiled(struct omap_device *dev, uint32_t width, | 246 | omap_bo_new_tiled(struct omap_device *dev, uint32_t width, |
247 | uint32_t height, uint32_t flags) | 247 | uint32_t height, uint32_t flags) |
248 | { | 248 | { |
@@ -258,7 +258,7 @@ omap_bo_new_tiled(struct omap_device *dev, uint32_t width, | |||
258 | return omap_bo_new_impl(dev, gsize, flags); | 258 | return omap_bo_new_impl(dev, gsize, flags); |
259 | } | 259 | } |
260 | 260 | ||
261 | drm_public struct omap_bo *omap_bo_ref(struct omap_bo *bo) | 261 | struct omap_bo *omap_bo_ref(struct omap_bo *bo) |
262 | { | 262 | { |
263 | atomic_inc(&bo->refcnt); | 263 | atomic_inc(&bo->refcnt); |
264 | return bo; | 264 | return bo; |
@@ -284,7 +284,7 @@ static int get_buffer_info(struct omap_bo *bo) | |||
284 | } | 284 | } |
285 | 285 | ||
286 | /* import a buffer object from DRI2 name */ | 286 | /* import a buffer object from DRI2 name */ |
287 | drm_public struct omap_bo * | 287 | struct omap_bo * |
288 | omap_bo_from_name(struct omap_device *dev, uint32_t name) | 288 | omap_bo_from_name(struct omap_device *dev, uint32_t name) |
289 | { | 289 | { |
290 | struct omap_bo *bo = NULL; | 290 | struct omap_bo *bo = NULL; |
@@ -318,7 +318,7 @@ fail: | |||
318 | * fd so caller should close() the fd when it is otherwise done | 318 | * fd so caller should close() the fd when it is otherwise done |
319 | * with it (even if it is still using the 'struct omap_bo *') | 319 | * with it (even if it is still using the 'struct omap_bo *') |
320 | */ | 320 | */ |
321 | drm_public struct omap_bo * | 321 | struct omap_bo * |
322 | omap_bo_from_dmabuf(struct omap_device *dev, int fd) | 322 | omap_bo_from_dmabuf(struct omap_device *dev, int fd) |
323 | { | 323 | { |
324 | struct omap_bo *bo = NULL; | 324 | struct omap_bo *bo = NULL; |
@@ -350,7 +350,7 @@ fail: | |||
350 | } | 350 | } |
351 | 351 | ||
352 | /* destroy a buffer object */ | 352 | /* destroy a buffer object */ |
353 | drm_public void omap_bo_del(struct omap_bo *bo) | 353 | void omap_bo_del(struct omap_bo *bo) |
354 | { | 354 | { |
355 | if (!bo) { | 355 | if (!bo) { |
356 | return; | 356 | return; |
@@ -383,7 +383,7 @@ drm_public void omap_bo_del(struct omap_bo *bo) | |||
383 | } | 383 | } |
384 | 384 | ||
385 | /* get the global flink/DRI2 buffer name */ | 385 | /* get the global flink/DRI2 buffer name */ |
386 | drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) | 386 | int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) |
387 | { | 387 | { |
388 | if (!bo->name) { | 388 | if (!bo->name) { |
389 | struct drm_gem_flink req = { | 389 | struct drm_gem_flink req = { |
@@ -404,7 +404,7 @@ drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) | |||
404 | return 0; | 404 | return 0; |
405 | } | 405 | } |
406 | 406 | ||
407 | drm_public uint32_t omap_bo_handle(struct omap_bo *bo) | 407 | uint32_t omap_bo_handle(struct omap_bo *bo) |
408 | { | 408 | { |
409 | return bo->handle; | 409 | return bo->handle; |
410 | } | 410 | } |
@@ -412,7 +412,7 @@ drm_public uint32_t omap_bo_handle(struct omap_bo *bo) | |||
412 | /* caller owns the dmabuf fd that is returned and is responsible | 412 | /* caller owns the dmabuf fd that is returned and is responsible |
413 | * to close() it when done | 413 | * to close() it when done |
414 | */ | 414 | */ |
415 | drm_public int omap_bo_dmabuf(struct omap_bo *bo) | 415 | int omap_bo_dmabuf(struct omap_bo *bo) |
416 | { | 416 | { |
417 | if (!bo->fd) { | 417 | if (!bo->fd) { |
418 | struct drm_prime_handle req = { | 418 | struct drm_prime_handle req = { |
@@ -431,7 +431,7 @@ drm_public int omap_bo_dmabuf(struct omap_bo *bo) | |||
431 | return dup(bo->fd); | 431 | return dup(bo->fd); |
432 | } | 432 | } |
433 | 433 | ||
434 | drm_public uint32_t omap_bo_size(struct omap_bo *bo) | 434 | uint32_t omap_bo_size(struct omap_bo *bo) |
435 | { | 435 | { |
436 | if (!bo->size) { | 436 | if (!bo->size) { |
437 | get_buffer_info(bo); | 437 | get_buffer_info(bo); |
@@ -439,7 +439,7 @@ drm_public uint32_t omap_bo_size(struct omap_bo *bo) | |||
439 | return bo->size; | 439 | return bo->size; |
440 | } | 440 | } |
441 | 441 | ||
442 | drm_public void *omap_bo_map(struct omap_bo *bo) | 442 | void *omap_bo_map(struct omap_bo *bo) |
443 | { | 443 | { |
444 | if (!bo->map) { | 444 | if (!bo->map) { |
445 | if (!bo->offset) { | 445 | if (!bo->offset) { |
@@ -455,7 +455,7 @@ drm_public void *omap_bo_map(struct omap_bo *bo) | |||
455 | return bo->map; | 455 | return bo->map; |
456 | } | 456 | } |
457 | 457 | ||
458 | drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) | 458 | int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) |
459 | { | 459 | { |
460 | struct drm_omap_gem_cpu_prep req = { | 460 | struct drm_omap_gem_cpu_prep req = { |
461 | .handle = bo->handle, | 461 | .handle = bo->handle, |
@@ -465,7 +465,7 @@ drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) | |||
465 | DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req)); | 465 | DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req)); |
466 | } | 466 | } |
467 | 467 | ||
468 | drm_public int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) | 468 | int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) |
469 | { | 469 | { |
470 | struct drm_omap_gem_cpu_fini req = { | 470 | struct drm_omap_gem_cpu_fini req = { |
471 | .handle = bo->handle, | 471 | .handle = bo->handle, |