diff options
author | Rashika <rashika.kheria@gmail.com> | 2014-01-06 10:01:42 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-01-13 21:59:19 -0500 |
commit | cdd73306674e49b2b47f8eb644f1a01fd21e8c2d (patch) | |
tree | 7b3b569c41fbf806fd885bea1e2a8225fa7f35b0 | |
parent | 5e89440f49936a14bac2af269037cc7f51a4747e (diff) |
drivers: gpu: Mark functions as static and remove unused function in cirrus_ttm.c
Mark functions cirrus_ttm_global_release(), cirrus_ttm_bo_is_cirrus_bo()
and cirrus_ttm_tt_create() as static in drm/cirrus/cirrus_ttm.c because
they are not used outside this file. Remove unused function
cirrus_bo_unpin() from drm/cirrus/cirrus_ttm.c.
This eliminates the following warnings in drm/cirrus/cirrus_ttm.c:
drivers/gpu/drm/cirrus/cirrus_ttm.c:84:1: warning: no previous prototype for ‘cirrus_ttm_global_release’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_ttm.c:105:6: warning: no previous prototype for ‘cirrus_ttm_bo_is_cirrus_bo’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_ttm.c:211:16: warning: no previous prototype for ‘cirrus_ttm_tt_create’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_ttm.c:378:5: warning: no previous prototype for ‘cirrus_bo_unpin’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_ttm.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 75becdeac07d..8b37c25ff9bd 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c | |||
@@ -80,7 +80,7 @@ static int cirrus_ttm_global_init(struct cirrus_device *cirrus) | |||
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | void | 83 | static void |
84 | cirrus_ttm_global_release(struct cirrus_device *cirrus) | 84 | cirrus_ttm_global_release(struct cirrus_device *cirrus) |
85 | { | 85 | { |
86 | if (cirrus->ttm.mem_global_ref.release == NULL) | 86 | if (cirrus->ttm.mem_global_ref.release == NULL) |
@@ -102,7 +102,7 @@ static void cirrus_bo_ttm_destroy(struct ttm_buffer_object *tbo) | |||
102 | kfree(bo); | 102 | kfree(bo); |
103 | } | 103 | } |
104 | 104 | ||
105 | bool cirrus_ttm_bo_is_cirrus_bo(struct ttm_buffer_object *bo) | 105 | static bool cirrus_ttm_bo_is_cirrus_bo(struct ttm_buffer_object *bo) |
106 | { | 106 | { |
107 | if (bo->destroy == &cirrus_bo_ttm_destroy) | 107 | if (bo->destroy == &cirrus_bo_ttm_destroy) |
108 | return true; | 108 | return true; |
@@ -208,7 +208,7 @@ static struct ttm_backend_func cirrus_tt_backend_func = { | |||
208 | }; | 208 | }; |
209 | 209 | ||
210 | 210 | ||
211 | struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev, | 211 | static struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev, |
212 | unsigned long size, uint32_t page_flags, | 212 | unsigned long size, uint32_t page_flags, |
213 | struct page *dummy_read_page) | 213 | struct page *dummy_read_page) |
214 | { | 214 | { |
@@ -375,26 +375,6 @@ int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr) | |||
375 | return 0; | 375 | return 0; |
376 | } | 376 | } |
377 | 377 | ||
378 | int cirrus_bo_unpin(struct cirrus_bo *bo) | ||
379 | { | ||
380 | int i, ret; | ||
381 | if (!bo->pin_count) { | ||
382 | DRM_ERROR("unpin bad %p\n", bo); | ||
383 | return 0; | ||
384 | } | ||
385 | bo->pin_count--; | ||
386 | if (bo->pin_count) | ||
387 | return 0; | ||
388 | |||
389 | for (i = 0; i < bo->placement.num_placement ; i++) | ||
390 | bo->placements[i] &= ~TTM_PL_FLAG_NO_EVICT; | ||
391 | ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); | ||
392 | if (ret) | ||
393 | return ret; | ||
394 | |||
395 | return 0; | ||
396 | } | ||
397 | |||
398 | int cirrus_bo_push_sysram(struct cirrus_bo *bo) | 378 | int cirrus_bo_push_sysram(struct cirrus_bo *bo) |
399 | { | 379 | { |
400 | int i, ret; | 380 | int i, ret; |