• Home
  • Raw
  • Download

Lines Matching refs:ast

48 static inline void ast_load_palette_index(struct ast_private *ast,  in ast_load_palette_index()  argument
52 ast_io_write8(ast, AST_IO_DAC_INDEX_WRITE, index); in ast_load_palette_index()
53 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
54 ast_io_write8(ast, AST_IO_DAC_DATA, red); in ast_load_palette_index()
55 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
56 ast_io_write8(ast, AST_IO_DAC_DATA, green); in ast_load_palette_index()
57 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
58 ast_io_write8(ast, AST_IO_DAC_DATA, blue); in ast_load_palette_index()
59 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
64 struct ast_private *ast = crtc->dev->dev_private; in ast_crtc_load_lut() local
72 ast_load_palette_index(ast, i, ast_crtc->lut_r[i], in ast_crtc_load_lut()
80 struct ast_private *ast = crtc->dev->dev_private; in ast_get_vbios_mode_info() local
199 if (ast->chip == AST1180) { in ast_get_vbios_mode_info()
202 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8c, (u8)((color_index & 0xf) << 4)); in ast_get_vbios_mode_info()
203 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8d, refresh_rate_index & 0xff); in ast_get_vbios_mode_info()
204 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8e, mode_id & 0xff); in ast_get_vbios_mode_info()
206 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0x00); in ast_get_vbios_mode_info()
208 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0xa8); in ast_get_vbios_mode_info()
209 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, crtc->primary->fb->bits_per_pixel); in ast_get_vbios_mode_info()
210 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x93, adjusted_mode->clock / 1000); in ast_get_vbios_mode_info()
211 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x94, adjusted_mode->crtc_hdisplay); in ast_get_vbios_mode_info()
212 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x95, adjusted_mode->crtc_hdisplay >> 8); in ast_get_vbios_mode_info()
214 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x96, adjusted_mode->crtc_vdisplay); in ast_get_vbios_mode_info()
215 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x97, adjusted_mode->crtc_vdisplay >> 8); in ast_get_vbios_mode_info()
226 struct ast_private *ast = crtc->dev->dev_private; in ast_set_std_reg() local
234 ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg); in ast_set_std_reg()
237 ast_set_index_reg(ast, AST_IO_SEQ_PORT, 0x00, 0x03); in ast_set_std_reg()
242 ast_set_index_reg(ast, AST_IO_SEQ_PORT, (i + 1) , jreg); in ast_set_std_reg()
246 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x00); in ast_set_std_reg()
248 ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, stdtable->crtc[i]); in ast_set_std_reg()
251 jreg = ast_io_read8(ast, AST_IO_INPUT_STATUS1_READ); in ast_set_std_reg()
254 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, (u8)i); in ast_set_std_reg()
255 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, jreg); in ast_set_std_reg()
257 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, 0x14); in ast_set_std_reg()
258 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, 0x00); in ast_set_std_reg()
260 jreg = ast_io_read8(ast, AST_IO_INPUT_STATUS1_READ); in ast_set_std_reg()
261 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, 0x20); in ast_set_std_reg()
265 ast_set_index_reg(ast, AST_IO_GR_PORT, i, stdtable->gr[i]); in ast_set_std_reg()
271 struct ast_private *ast = crtc->dev->dev_private; in ast_set_crtc_reg() local
275 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x00); in ast_set_crtc_reg()
280 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x00, 0x00, temp); in ast_set_crtc_reg()
285 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x01, 0x00, temp); in ast_set_crtc_reg()
290 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x02, 0x00, temp); in ast_set_crtc_reg()
297 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x03, 0xE0, (temp & 0x1f)); in ast_set_crtc_reg()
302 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x04, 0x00, temp); in ast_set_crtc_reg()
307 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x05, 0x60, (u8)((temp & 0x1f) | jreg05)); in ast_set_crtc_reg()
309 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xAC, 0x00, jregAC); in ast_set_crtc_reg()
310 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xAD, 0x00, jregAD); in ast_set_crtc_reg()
320 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x06, 0x00, temp); in ast_set_crtc_reg()
329 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x10, 0x00, temp); in ast_set_crtc_reg()
336 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x70, temp & 0xf); in ast_set_crtc_reg()
345 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x12, 0x00, temp); in ast_set_crtc_reg()
354 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x15, 0x00, temp); in ast_set_crtc_reg()
359 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x16, 0x00, temp); in ast_set_crtc_reg()
361 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x07, 0x00, jreg07); in ast_set_crtc_reg()
362 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x09, 0xdf, jreg09); in ast_set_crtc_reg()
363 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xAE, 0x00, (jregAE | 0x80)); in ast_set_crtc_reg()
365 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x80); in ast_set_crtc_reg()
370 struct ast_private *ast = crtc->dev->dev_private; in ast_set_offset_reg() local
375 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x13, (offset & 0xff)); in ast_set_offset_reg()
376 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xb0, (offset >> 8) & 0x3f); in ast_set_offset_reg()
382 struct ast_private *ast = dev->dev_private; in ast_set_dclk_reg() local
387 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xc0, 0x00, clk_info->param1); in ast_set_dclk_reg()
388 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xc1, 0x00, clk_info->param2); in ast_set_dclk_reg()
389 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xbb, 0x0f, in ast_set_dclk_reg()
396 struct ast_private *ast = crtc->dev->dev_private; in ast_set_ext_reg() local
418 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa0, 0x8f, jregA0); in ast_set_ext_reg()
419 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xf0, jregA3); in ast_set_ext_reg()
420 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa8, 0xfd, jregA8); in ast_set_ext_reg()
423 if (ast->chip == AST2300 || ast->chip == AST2400) { in ast_set_ext_reg()
424 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x78); in ast_set_ext_reg()
425 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x60); in ast_set_ext_reg()
426 } else if (ast->chip == AST2100 || in ast_set_ext_reg()
427 ast->chip == AST1100 || in ast_set_ext_reg()
428 ast->chip == AST2200 || in ast_set_ext_reg()
429 ast->chip == AST2150) { in ast_set_ext_reg()
430 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x3f); in ast_set_ext_reg()
431 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x2f); in ast_set_ext_reg()
433 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x2f); in ast_set_ext_reg()
434 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x1f); in ast_set_ext_reg()
441 struct ast_private *ast = dev->dev_private; in ast_set_sync_reg() local
444 jreg = ast_io_read8(ast, AST_IO_MISC_PORT_READ); in ast_set_sync_reg()
448 ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg); in ast_set_sync_reg()
465 struct ast_private *ast = crtc->dev->dev_private; in ast_set_start_address_crt1() local
469 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x0d, (u8)(addr & 0xff)); in ast_set_start_address_crt1()
470 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x0c, (u8)((addr >> 8) & 0xff)); in ast_set_start_address_crt1()
471 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xaf, (u8)((addr >> 16) & 0xff)); in ast_set_start_address_crt1()
477 struct ast_private *ast = crtc->dev->dev_private; in ast_crtc_dpms() local
479 if (ast->chip == AST1180) in ast_crtc_dpms()
486 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x1, 0xdf, 0); in ast_crtc_dpms()
487 if (ast->tx_chip_type == AST_TX_DP501) in ast_crtc_dpms()
492 if (ast->tx_chip_type == AST_TX_DP501) in ast_crtc_dpms()
494 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x1, 0xdf, 0x20); in ast_crtc_dpms()
511 struct ast_private *ast = crtc->dev->dev_private; in ast_crtc_do_set_base() local
544 if (&ast->fbdev->afb == ast_fb) { in ast_crtc_do_set_base()
570 struct ast_private *ast = crtc->dev->dev_private; in ast_crtc_mode_set() local
573 if (ast->chip == AST1180) { in ast_crtc_mode_set()
581 ast_open_key(ast); in ast_crtc_mode_set()
583 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa1, 0xff, 0x04); in ast_crtc_mode_set()
610 struct ast_private *ast = crtc->dev->dev_private; in ast_crtc_commit() local
611 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x1, 0xdf, 0); in ast_crtc_commit()
761 struct ast_private *ast = connector->dev->dev_private; in ast_get_modes() local
765 if (ast->tx_chip_type == AST_TX_DP501) { in ast_get_modes()
766 ast->dp501_maxclk = 0xff; in ast_get_modes()
773 ast->dp501_maxclk = ast_get_dp501_max_clk(connector->dev); in ast_get_modes()
792 struct ast_private *ast = connector->dev->dev_private; in ast_mode_valid() local
796 if (ast->support_wide_screen) { in ast_mode_valid()
808 …if ((ast->chip == AST2100) || (ast->chip == AST2200) || (ast->chip == AST2300) || (ast->chip == AS… in ast_mode_valid()
813 jtemp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff); in ast_mode_valid()
907 struct ast_private *ast = dev->dev_private; in ast_cursor_init() local
930 ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &ast->cache_kmap); in ast_cursor_init()
934 ast->cursor_cache = obj; in ast_cursor_init()
935 ast->cursor_cache_gpu_addr = gpu_addr; in ast_cursor_init()
936 DRM_DEBUG_KMS("pinned cursor cache at %llx\n", ast->cursor_cache_gpu_addr); in ast_cursor_init()
944 struct ast_private *ast = dev->dev_private; in ast_cursor_fini() local
945 ttm_bo_kunmap(&ast->cache_kmap); in ast_cursor_fini()
946 drm_gem_object_unreference_unlocked(ast->cursor_cache); in ast_cursor_fini()
966 struct ast_private *ast = i2c->dev->dev_private; in get_clock() local
969 val = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4; in get_clock()
976 struct ast_private *ast = i2c->dev->dev_private; in get_data() local
979 val = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x20) >> 5; in get_data()
986 struct ast_private *ast = i2c->dev->dev_private; in set_clock() local
992 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xfe, ujcrb7); in set_clock()
993 jtemp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x01); in set_clock()
1002 struct ast_private *ast = i2c->dev->dev_private; in set_data() local
1008 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xfb, ujcrb7); in set_data()
1009 jtemp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x04); in set_data()
1062 struct ast_private *ast = crtc->dev->dev_private; in ast_show_cursor() local
1068 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, jreg); in ast_show_cursor()
1073 struct ast_private *ast = crtc->dev->dev_private; in ast_hide_cursor() local
1074 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, 0x00); in ast_hide_cursor()
1139 struct ast_private *ast = crtc->dev->dev_private; in ast_cursor_set() local
1171 dst = ttm_kmap_obj_virtual(&ast->cache_kmap, &dst_isiomem); in ast_cursor_set()
1178 dst += (AST_HWC_SIZE + AST_HWC_SIGNATURE_SIZE)*ast->next_cursor; in ast_cursor_set()
1187 …u8 *dst = (u8 *)ast->cache_kmap.virtual + (AST_HWC_SIZE + AST_HWC_SIGNATURE_SIZE)*ast->next_cursor… in ast_cursor_set()
1195 gpu_addr = ast->cursor_cache_gpu_addr; in ast_cursor_set()
1196 gpu_addr += (AST_HWC_SIZE + AST_HWC_SIGNATURE_SIZE)*ast->next_cursor; in ast_cursor_set()
1198 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc8, gpu_addr & 0xff); in ast_cursor_set()
1199 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc9, (gpu_addr >> 8) & 0xff); in ast_cursor_set()
1200 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xca, (gpu_addr >> 16) & 0xff); in ast_cursor_set()
1207 ast->next_cursor = (ast->next_cursor + 1) % AST_DEFAULT_HWC_NUM; in ast_cursor_set()
1222 struct ast_private *ast = crtc->dev->dev_private; in ast_cursor_move() local
1226 …sig = (u8 *)ast->cache_kmap.virtual + (AST_HWC_SIZE + AST_HWC_SIGNATURE_SIZE)*ast->next_cursor + A… in ast_cursor_move()
1241 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc2, x_offset); in ast_cursor_move()
1242 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc3, y_offset); in ast_cursor_move()
1243 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc4, (x & 0xff)); in ast_cursor_move()
1244 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc5, ((x >> 8) & 0x0f)); in ast_cursor_move()
1245 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc6, (y & 0xff)); in ast_cursor_move()
1246 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc7, ((y >> 8) & 0x07)); in ast_cursor_move()
1249 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xCB, 0xFF, 0x00); in ast_cursor_move()