diff options
author | Rashika <rashika.kheria@gmail.com> | 2014-01-06 09:30:40 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-01-13 21:59:15 -0500 |
commit | f6109803f24131efd23fc0f2a4aa5eef5d6c1197 (patch) | |
tree | 2a4fa583a294d7b04150df6c215bbc820a99bf13 /drivers/gpu | |
parent | 8eed55be964c091449258d8f8ae1e109070f376a (diff) |
drivers: gpu: Mark function as static and remove unused function in ast_main.c
Mark function ast_bo_unref() as static because it is not used outside
file ast_main.c and remove unused function ast_get_max_dclk() in
ast_main.c.
This eliminates the following warning in drm/ast/ast_main.c:
drivers/gpu/drm/ast/ast_main.c:192:10: warning: no previous prototype
for ‘ast_get_max_dclk’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_main.c:452:6: warning: no previous prototype for
‘ast_bo_unref’ [-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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index af0b868a9dfd..50535fd5a88d 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c | |||
@@ -189,53 +189,6 @@ static int ast_get_dram_info(struct drm_device *dev) | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | uint32_t ast_get_max_dclk(struct drm_device *dev, int bpp) | ||
193 | { | ||
194 | struct ast_private *ast = dev->dev_private; | ||
195 | uint32_t dclk, jreg; | ||
196 | uint32_t dram_bus_width, mclk, dram_bandwidth, actual_dram_bandwidth, dram_efficency = 500; | ||
197 | |||
198 | dram_bus_width = ast->dram_bus_width; | ||
199 | mclk = ast->mclk; | ||
200 | |||
201 | if (ast->chip == AST2100 || | ||
202 | ast->chip == AST1100 || | ||
203 | ast->chip == AST2200 || | ||
204 | ast->chip == AST2150 || | ||
205 | ast->dram_bus_width == 16) | ||
206 | dram_efficency = 600; | ||
207 | else if (ast->chip == AST2300) | ||
208 | dram_efficency = 400; | ||
209 | |||
210 | dram_bandwidth = mclk * dram_bus_width * 2 / 8; | ||
211 | actual_dram_bandwidth = dram_bandwidth * dram_efficency / 1000; | ||
212 | |||
213 | if (ast->chip == AST1180) | ||
214 | dclk = actual_dram_bandwidth / ((bpp + 1) / 8); | ||
215 | else { | ||
216 | jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd0, 0xff); | ||
217 | if ((jreg & 0x08) && (ast->chip == AST2000)) | ||
218 | dclk = actual_dram_bandwidth / ((bpp + 1 + 16) / 8); | ||
219 | else if ((jreg & 0x08) && (bpp == 8)) | ||
220 | dclk = actual_dram_bandwidth / ((bpp + 1 + 24) / 8); | ||
221 | else | ||
222 | dclk = actual_dram_bandwidth / ((bpp + 1) / 8); | ||
223 | } | ||
224 | |||
225 | if (ast->chip == AST2100 || | ||
226 | ast->chip == AST2200 || | ||
227 | ast->chip == AST2300 || | ||
228 | ast->chip == AST1180) { | ||
229 | if (dclk > 200) | ||
230 | dclk = 200; | ||
231 | } else { | ||
232 | if (dclk > 165) | ||
233 | dclk = 165; | ||
234 | } | ||
235 | |||
236 | return dclk; | ||
237 | } | ||
238 | |||
239 | static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb) | 192 | static void ast_user_framebuffer_destroy(struct drm_framebuffer *fb) |
240 | { | 193 | { |
241 | struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb); | 194 | struct ast_framebuffer *ast_fb = to_ast_framebuffer(fb); |
@@ -449,7 +402,7 @@ int ast_dumb_create(struct drm_file *file, | |||
449 | return 0; | 402 | return 0; |
450 | } | 403 | } |
451 | 404 | ||
452 | void ast_bo_unref(struct ast_bo **bo) | 405 | static void ast_bo_unref(struct ast_bo **bo) |
453 | { | 406 | { |
454 | struct ttm_buffer_object *tbo; | 407 | struct ttm_buffer_object *tbo; |
455 | 408 | ||