Lines Matching refs:ast

35 static void ast_cursor_fini(struct ast_private *ast)  in ast_cursor_fini()  argument
40 for (i = 0; i < ARRAY_SIZE(ast->cursor.gbo); ++i) { in ast_cursor_fini()
41 gbo = ast->cursor.gbo[i]; in ast_cursor_fini()
42 drm_gem_vram_vunmap(gbo, ast->cursor.vaddr[i]); in ast_cursor_fini()
50 struct ast_private *ast = to_ast_private(dev); in ast_cursor_release() local
52 ast_cursor_fini(ast); in ast_cursor_release()
58 int ast_cursor_init(struct ast_private *ast) in ast_cursor_init() argument
60 struct drm_device *dev = &ast->base; in ast_cursor_init()
68 for (i = 0; i < ARRAY_SIZE(ast->cursor.gbo); ++i) { in ast_cursor_init()
88 ast->cursor.gbo[i] = gbo; in ast_cursor_init()
89 ast->cursor.vaddr[i] = vaddr; in ast_cursor_init()
97 gbo = ast->cursor.gbo[i]; in ast_cursor_init()
98 drm_gem_vram_vunmap(gbo, ast->cursor.vaddr[i]); in ast_cursor_init()
169 int ast_cursor_blit(struct ast_private *ast, struct drm_framebuffer *fb) in ast_cursor_blit() argument
171 struct drm_device *dev = &ast->base; in ast_cursor_blit()
192 dst = ast->cursor.vaddr[ast->cursor.next_index]; in ast_cursor_blit()
207 static void ast_cursor_set_base(struct ast_private *ast, u64 address) in ast_cursor_set_base() argument
213 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc8, addr0); in ast_cursor_set_base()
214 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc9, addr1); in ast_cursor_set_base()
215 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xca, addr2); in ast_cursor_set_base()
218 void ast_cursor_page_flip(struct ast_private *ast) in ast_cursor_page_flip() argument
220 struct drm_device *dev = &ast->base; in ast_cursor_page_flip()
224 gbo = ast->cursor.gbo[ast->cursor.next_index]; in ast_cursor_page_flip()
230 ast_cursor_set_base(ast, off); in ast_cursor_page_flip()
232 ++ast->cursor.next_index; in ast_cursor_page_flip()
233 ast->cursor.next_index %= ARRAY_SIZE(ast->cursor.gbo); in ast_cursor_page_flip()
236 static void ast_cursor_set_location(struct ast_private *ast, u16 x, u16 y, in ast_cursor_set_location() argument
244 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc2, x_offset); in ast_cursor_set_location()
245 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc3, y_offset); in ast_cursor_set_location()
246 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc4, x0); in ast_cursor_set_location()
247 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc5, x1); in ast_cursor_set_location()
248 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc6, y0); in ast_cursor_set_location()
249 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc7, y1); in ast_cursor_set_location()
252 void ast_cursor_show(struct ast_private *ast, int x, int y, in ast_cursor_show() argument
260 dst = ast->cursor.vaddr[ast->cursor.next_index]; in ast_cursor_show()
279 ast_cursor_set_location(ast, x, y, x_offset, y_offset); in ast_cursor_show()
284 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, jreg); in ast_cursor_show()
287 void ast_cursor_hide(struct ast_private *ast) in ast_cursor_hide() argument
289 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, 0x00); in ast_cursor_hide()