Lines Matching refs:ast
54 static inline void ast_load_palette_index(struct ast_private *ast, in ast_load_palette_index() argument
58 ast_io_write8(ast, AST_IO_DAC_INDEX_WRITE, index); in ast_load_palette_index()
59 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
60 ast_io_write8(ast, AST_IO_DAC_DATA, red); in ast_load_palette_index()
61 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
62 ast_io_write8(ast, AST_IO_DAC_DATA, green); in ast_load_palette_index()
63 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
64 ast_io_write8(ast, AST_IO_DAC_DATA, blue); in ast_load_palette_index()
65 ast_io_read8(ast, AST_IO_SEQ_PORT); in ast_load_palette_index()
68 static void ast_crtc_set_gamma_linear(struct ast_private *ast, in ast_crtc_set_gamma_linear() argument
78 ast_load_palette_index(ast, i, i, i, i); in ast_crtc_set_gamma_linear()
81 drm_warn_once(&ast->base, "Unsupported format %p4cc for gamma correction\n", in ast_crtc_set_gamma_linear()
87 static void ast_crtc_set_gamma(struct ast_private *ast, in ast_crtc_set_gamma() argument
98 ast_load_palette_index(ast, i, in ast_crtc_set_gamma()
104 drm_warn_once(&ast->base, "Unsupported format %p4cc for gamma correction\n", in ast_crtc_set_gamma()
235 static void ast_set_vbios_color_reg(struct ast_private *ast, in ast_set_vbios_color_reg() argument
256 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8c, (u8)((color_index & 0x0f) << 4)); in ast_set_vbios_color_reg()
258 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0x00); in ast_set_vbios_color_reg()
261 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0xa8); in ast_set_vbios_color_reg()
262 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, format->cpp[0] * 8); in ast_set_vbios_color_reg()
266 static void ast_set_vbios_mode_reg(struct ast_private *ast, in ast_set_vbios_mode_reg() argument
275 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8d, refresh_rate_index & 0xff); in ast_set_vbios_mode_reg()
276 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x8e, mode_id & 0xff); in ast_set_vbios_mode_reg()
278 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0x00); in ast_set_vbios_mode_reg()
281 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0xa8); in ast_set_vbios_mode_reg()
282 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x93, adjusted_mode->clock / 1000); in ast_set_vbios_mode_reg()
283 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x94, adjusted_mode->crtc_hdisplay); in ast_set_vbios_mode_reg()
284 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x95, adjusted_mode->crtc_hdisplay >> 8); in ast_set_vbios_mode_reg()
285 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x96, adjusted_mode->crtc_vdisplay); in ast_set_vbios_mode_reg()
286 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x97, adjusted_mode->crtc_vdisplay >> 8); in ast_set_vbios_mode_reg()
290 static void ast_set_std_reg(struct ast_private *ast, in ast_set_std_reg() argument
301 ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg); in ast_set_std_reg()
304 ast_set_index_reg(ast, AST_IO_SEQ_PORT, 0x00, 0x03); in ast_set_std_reg()
305 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x01, 0xdf, stdtable->seq[0]); in ast_set_std_reg()
308 ast_set_index_reg(ast, AST_IO_SEQ_PORT, (i + 1), jreg); in ast_set_std_reg()
312 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x00); in ast_set_std_reg()
314 ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, stdtable->crtc[i]); in ast_set_std_reg()
316 ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, stdtable->crtc[i]); in ast_set_std_reg()
318 ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, stdtable->crtc[i]); in ast_set_std_reg()
321 jreg = ast_io_read8(ast, AST_IO_INPUT_STATUS1_READ); in ast_set_std_reg()
324 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, (u8)i); in ast_set_std_reg()
325 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, jreg); in ast_set_std_reg()
327 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, 0x14); in ast_set_std_reg()
328 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, 0x00); in ast_set_std_reg()
330 jreg = ast_io_read8(ast, AST_IO_INPUT_STATUS1_READ); in ast_set_std_reg()
331 ast_io_write8(ast, AST_IO_AR_PORT_WRITE, 0x20); in ast_set_std_reg()
335 ast_set_index_reg(ast, AST_IO_GR_PORT, i, stdtable->gr[i]); in ast_set_std_reg()
338 static void ast_set_crtc_reg(struct ast_private *ast, in ast_set_crtc_reg() argument
345 if ((ast->chip == AST2500 || ast->chip == AST2600) && in ast_set_crtc_reg()
349 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x00); in ast_set_crtc_reg()
354 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x00, 0x00, temp); in ast_set_crtc_reg()
359 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x01, 0x00, temp); in ast_set_crtc_reg()
364 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x02, 0x00, temp); in ast_set_crtc_reg()
371 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x03, 0xE0, (temp & 0x1f)); in ast_set_crtc_reg()
376 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x04, 0x00, temp); in ast_set_crtc_reg()
381 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x05, 0x60, (u8)((temp & 0x1f) | jreg05)); in ast_set_crtc_reg()
383 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xAC, 0x00, jregAC); in ast_set_crtc_reg()
384 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xAD, 0x00, jregAD); in ast_set_crtc_reg()
387 if ((ast->chip == AST2600) && (mode->crtc_vdisplay == 1080)) in ast_set_crtc_reg()
388 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xFC, 0xFD, 0x02); in ast_set_crtc_reg()
390 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xFC, 0xFD, 0x00); in ast_set_crtc_reg()
400 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x06, 0x00, temp); in ast_set_crtc_reg()
409 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x10, 0x00, temp); in ast_set_crtc_reg()
416 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x70, temp & 0xf); in ast_set_crtc_reg()
425 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x12, 0x00, temp); in ast_set_crtc_reg()
434 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x15, 0x00, temp); in ast_set_crtc_reg()
439 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x16, 0x00, temp); in ast_set_crtc_reg()
441 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x07, 0x00, jreg07); in ast_set_crtc_reg()
442 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x09, 0xdf, jreg09); in ast_set_crtc_reg()
443 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xAE, 0x00, (jregAE | 0x80)); in ast_set_crtc_reg()
446 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0x3f, 0x80); in ast_set_crtc_reg()
448 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0x3f, 0x00); in ast_set_crtc_reg()
450 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x80); in ast_set_crtc_reg()
453 static void ast_set_offset_reg(struct ast_private *ast, in ast_set_offset_reg() argument
459 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x13, (offset & 0xff)); in ast_set_offset_reg()
460 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xb0, (offset >> 8) & 0x3f); in ast_set_offset_reg()
463 static void ast_set_dclk_reg(struct ast_private *ast, in ast_set_dclk_reg() argument
469 if ((ast->chip == AST2500) || (ast->chip == AST2600)) in ast_set_dclk_reg()
474 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xc0, 0x00, clk_info->param1); in ast_set_dclk_reg()
475 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xc1, 0x00, clk_info->param2); in ast_set_dclk_reg()
476 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xbb, 0x0f, in ast_set_dclk_reg()
481 static void ast_set_color_reg(struct ast_private *ast, in ast_set_color_reg() argument
505 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa0, 0x8f, jregA0); in ast_set_color_reg()
506 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xf0, jregA3); in ast_set_color_reg()
507 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa8, 0xfd, jregA8); in ast_set_color_reg()
510 static void ast_set_crtthd_reg(struct ast_private *ast) in ast_set_crtthd_reg() argument
513 if (ast->chip == AST2600) { in ast_set_crtthd_reg()
514 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0xe0); in ast_set_crtthd_reg()
515 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0xa0); in ast_set_crtthd_reg()
516 } else if (ast->chip == AST2300 || ast->chip == AST2400 || in ast_set_crtthd_reg()
517 ast->chip == AST2500) { in ast_set_crtthd_reg()
518 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x78); in ast_set_crtthd_reg()
519 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x60); in ast_set_crtthd_reg()
520 } else if (ast->chip == AST2100 || in ast_set_crtthd_reg()
521 ast->chip == AST1100 || in ast_set_crtthd_reg()
522 ast->chip == AST2200 || in ast_set_crtthd_reg()
523 ast->chip == AST2150) { in ast_set_crtthd_reg()
524 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x3f); in ast_set_crtthd_reg()
525 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x2f); in ast_set_crtthd_reg()
527 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa7, 0x2f); in ast_set_crtthd_reg()
528 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa6, 0x1f); in ast_set_crtthd_reg()
532 static void ast_set_sync_reg(struct ast_private *ast, in ast_set_sync_reg() argument
538 jreg = ast_io_read8(ast, AST_IO_MISC_PORT_READ); in ast_set_sync_reg()
544 ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg); in ast_set_sync_reg()
547 static void ast_set_start_address_crt1(struct ast_private *ast, in ast_set_start_address_crt1() argument
553 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x0d, (u8)(addr & 0xff)); in ast_set_start_address_crt1()
554 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x0c, (u8)((addr >> 8) & 0xff)); in ast_set_start_address_crt1()
555 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xaf, (u8)((addr >> 16) & 0xff)); in ast_set_start_address_crt1()
559 static void ast_wait_for_vretrace(struct ast_private *ast) in ast_wait_for_vretrace() argument
565 vgair1 = ast_io_read8(ast, AST_IO_INPUT_STATUS1_READ); in ast_wait_for_vretrace()
648 struct ast_private *ast = to_ast_private(dev); in ast_primary_plane_helper_atomic_update() local
664 ast_set_color_reg(ast, fb->format); in ast_primary_plane_helper_atomic_update()
665 ast_set_vbios_color_reg(ast, fb->format, vbios_mode_info); in ast_primary_plane_helper_atomic_update()
681 ast_set_offset_reg(ast, fb); in ast_primary_plane_helper_atomic_update()
683 ast_set_start_address_crt1(ast, (u32)ast_plane->offset); in ast_primary_plane_helper_atomic_update()
684 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x1, 0xdf, 0x00); in ast_primary_plane_helper_atomic_update()
691 struct ast_private *ast = to_ast_private(plane->dev); in ast_primary_plane_helper_atomic_disable() local
693 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x1, 0xdf, 0x20); in ast_primary_plane_helper_atomic_disable()
710 static int ast_primary_plane_init(struct ast_private *ast) in ast_primary_plane_init() argument
712 struct drm_device *dev = &ast->base; in ast_primary_plane_init()
713 struct ast_plane *ast_primary_plane = &ast->primary_plane; in ast_primary_plane_init()
715 void __iomem *vaddr = ast->vram; in ast_primary_plane_init()
718 unsigned long size = ast->vram_fb_available - cursor_size; in ast_primary_plane_init()
803 static void ast_set_cursor_base(struct ast_private *ast, u64 address) in ast_set_cursor_base() argument
809 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc8, addr0); in ast_set_cursor_base()
810 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc9, addr1); in ast_set_cursor_base()
811 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xca, addr2); in ast_set_cursor_base()
814 static void ast_set_cursor_location(struct ast_private *ast, u16 x, u16 y, in ast_set_cursor_location() argument
822 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc2, x_offset); in ast_set_cursor_location()
823 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc3, y_offset); in ast_set_cursor_location()
824 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc4, x0); in ast_set_cursor_location()
825 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc5, x1); in ast_set_cursor_location()
826 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc6, y0); in ast_set_cursor_location()
827 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc7, y1); in ast_set_cursor_location()
830 static void ast_set_cursor_enabled(struct ast_private *ast, bool enabled) in ast_set_cursor_enabled() argument
840 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, mask, vgacrcb); in ast_set_cursor_enabled()
879 struct ast_private *ast = to_ast_private(plane->dev); in ast_cursor_plane_helper_atomic_update() local
897 ast_set_cursor_base(ast, dst_off); in ast_cursor_plane_helper_atomic_update()
925 ast_set_cursor_location(ast, x, y, x_offset, y_offset); in ast_cursor_plane_helper_atomic_update()
928 ast_set_cursor_enabled(ast, true); in ast_cursor_plane_helper_atomic_update()
934 struct ast_private *ast = to_ast_private(plane->dev); in ast_cursor_plane_helper_atomic_disable() local
936 ast_set_cursor_enabled(ast, false); in ast_cursor_plane_helper_atomic_disable()
953 static int ast_cursor_plane_init(struct ast_private *ast) in ast_cursor_plane_init() argument
955 struct drm_device *dev = &ast->base; in ast_cursor_plane_init()
956 struct ast_plane *ast_cursor_plane = &ast->cursor_plane; in ast_cursor_plane_init()
970 if (ast->vram_fb_available < size) in ast_cursor_plane_init()
973 vaddr = ast->vram + ast->vram_fb_available - size; in ast_cursor_plane_init()
974 offset = ast->vram_fb_available - size; in ast_cursor_plane_init()
987 ast->vram_fb_available -= size; in ast_cursor_plane_init()
998 struct ast_private *ast = to_ast_private(crtc->dev); in ast_crtc_dpms() local
1009 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x01, 0xdf, 0); in ast_crtc_dpms()
1010 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, 0); in ast_crtc_dpms()
1011 if (ast->tx_chip_types & AST_TX_DP501_BIT) in ast_crtc_dpms()
1014 if (ast->tx_chip_types & AST_TX_ASTDP_BIT) { in ast_crtc_dpms()
1016 ast_wait_for_vretrace(ast); in ast_crtc_dpms()
1026 ast_set_color_reg(ast, format); in ast_crtc_dpms()
1027 ast_set_vbios_color_reg(ast, format, vbios_mode_info); in ast_crtc_dpms()
1029 ast_crtc_set_gamma(ast, format, crtc->state->gamma_lut->data); in ast_crtc_dpms()
1031 ast_crtc_set_gamma_linear(ast, format); in ast_crtc_dpms()
1038 if (ast->tx_chip_types & AST_TX_DP501_BIT) in ast_crtc_dpms()
1041 if (ast->tx_chip_types & AST_TX_ASTDP_BIT) { in ast_crtc_dpms()
1046 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x01, 0xdf, 0x20); in ast_crtc_dpms()
1047 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, ch); in ast_crtc_dpms()
1055 struct ast_private *ast = to_ast_private(crtc->dev); in ast_crtc_helper_mode_valid() local
1059 if (ast->support_wide_screen) { in ast_crtc_helper_mode_valid()
1073 if ((ast->chip == AST2100) || (ast->chip == AST2200) || in ast_crtc_helper_mode_valid()
1074 (ast->chip == AST2300) || (ast->chip == AST2400) || in ast_crtc_helper_mode_valid()
1075 (ast->chip == AST2500) || (ast->chip == AST2600)) { in ast_crtc_helper_mode_valid()
1080 jtemp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff); in ast_crtc_helper_mode_valid()
1180 struct ast_private *ast = to_ast_private(dev); in ast_crtc_helper_atomic_flush() local
1190 ast_crtc_set_gamma(ast, in ast_crtc_helper_atomic_flush()
1194 ast_crtc_set_gamma_linear(ast, ast_crtc_state->format); in ast_crtc_helper_atomic_flush()
1198 if (ast->tx_chip_types & AST_TX_ASTDP_BIT) in ast_crtc_helper_atomic_flush()
1205 struct ast_private *ast = to_ast_private(dev); in ast_crtc_helper_atomic_enable() local
1212 ast_set_vbios_mode_reg(ast, adjusted_mode, vbios_mode_info); in ast_crtc_helper_atomic_enable()
1213 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x06); in ast_crtc_helper_atomic_enable()
1214 ast_set_std_reg(ast, adjusted_mode, vbios_mode_info); in ast_crtc_helper_atomic_enable()
1215 ast_set_crtc_reg(ast, adjusted_mode, vbios_mode_info); in ast_crtc_helper_atomic_enable()
1216 ast_set_dclk_reg(ast, adjusted_mode, vbios_mode_info); in ast_crtc_helper_atomic_enable()
1217 ast_set_crtthd_reg(ast); in ast_crtc_helper_atomic_enable()
1218 ast_set_sync_reg(ast, adjusted_mode, vbios_mode_info); in ast_crtc_helper_atomic_enable()
1227 struct ast_private *ast = to_ast_private(dev); in ast_crtc_helper_atomic_disable() local
1247 ast_wait_for_vretrace(ast); in ast_crtc_helper_atomic_disable()
1315 struct ast_private *ast = to_ast_private(dev); in ast_crtc_init() local
1316 struct drm_crtc *crtc = &ast->crtc; in ast_crtc_init()
1319 ret = drm_crtc_init_with_planes(dev, crtc, &ast->primary_plane.base, in ast_crtc_init()
1320 &ast->cursor_plane.base, &ast_crtc_funcs, in ast_crtc_init()
1341 struct ast_private *ast = to_ast_private(dev); in ast_vga_connector_helper_get_modes() local
1352 mutex_lock(&ast->ioregs_lock); in ast_vga_connector_helper_get_modes()
1358 mutex_unlock(&ast->ioregs_lock); in ast_vga_connector_helper_get_modes()
1366 mutex_unlock(&ast->ioregs_lock); in ast_vga_connector_helper_get_modes()
1414 static int ast_vga_output_init(struct ast_private *ast) in ast_vga_output_init() argument
1416 struct drm_device *dev = &ast->base; in ast_vga_output_init()
1417 struct drm_crtc *crtc = &ast->crtc; in ast_vga_output_init()
1418 struct drm_encoder *encoder = &ast->output.vga.encoder; in ast_vga_output_init()
1419 struct ast_vga_connector *ast_vga_connector = &ast->output.vga.vga_connector; in ast_vga_output_init()
1447 struct ast_private *ast = to_ast_private(dev); in ast_sil164_connector_helper_get_modes() local
1458 mutex_lock(&ast->ioregs_lock); in ast_sil164_connector_helper_get_modes()
1464 mutex_unlock(&ast->ioregs_lock); in ast_sil164_connector_helper_get_modes()
1472 mutex_unlock(&ast->ioregs_lock); in ast_sil164_connector_helper_get_modes()
1520 static int ast_sil164_output_init(struct ast_private *ast) in ast_sil164_output_init() argument
1522 struct drm_device *dev = &ast->base; in ast_sil164_output_init()
1523 struct drm_crtc *crtc = &ast->crtc; in ast_sil164_output_init()
1524 struct drm_encoder *encoder = &ast->output.sil164.encoder; in ast_sil164_output_init()
1525 struct ast_sil164_connector *ast_sil164_connector = &ast->output.sil164.sil164_connector; in ast_sil164_output_init()
1607 static int ast_dp501_output_init(struct ast_private *ast) in ast_dp501_output_init() argument
1609 struct drm_device *dev = &ast->base; in ast_dp501_output_init()
1610 struct drm_crtc *crtc = &ast->crtc; in ast_dp501_output_init()
1611 struct drm_encoder *encoder = &ast->output.dp501.encoder; in ast_dp501_output_init()
1612 struct drm_connector *connector = &ast->output.dp501.connector; in ast_dp501_output_init()
1694 static int ast_astdp_output_init(struct ast_private *ast) in ast_astdp_output_init() argument
1696 struct drm_device *dev = &ast->base; in ast_astdp_output_init()
1697 struct drm_crtc *crtc = &ast->crtc; in ast_astdp_output_init()
1698 struct drm_encoder *encoder = &ast->output.astdp.encoder; in ast_astdp_output_init()
1699 struct drm_connector *connector = &ast->output.astdp.connector; in ast_astdp_output_init()
1724 struct ast_private *ast = to_ast_private(state->dev); in ast_mode_config_helper_atomic_commit_tail() local
1732 mutex_lock(&ast->ioregs_lock); in ast_mode_config_helper_atomic_commit_tail()
1734 mutex_unlock(&ast->ioregs_lock); in ast_mode_config_helper_atomic_commit_tail()
1745 struct ast_private *ast = to_ast_private(dev); in ast_mode_config_mode_valid() local
1748 max_fbpages = (ast->vram_fb_available) >> PAGE_SHIFT; in ast_mode_config_mode_valid()
1766 int ast_mode_config_init(struct ast_private *ast) in ast_mode_config_init() argument
1768 struct drm_device *dev = &ast->base; in ast_mode_config_init()
1780 if (ast->chip == AST2100 || in ast_mode_config_init()
1781 ast->chip == AST2200 || in ast_mode_config_init()
1782 ast->chip == AST2300 || in ast_mode_config_init()
1783 ast->chip == AST2400 || in ast_mode_config_init()
1784 ast->chip == AST2500 || in ast_mode_config_init()
1785 ast->chip == AST2600) { in ast_mode_config_init()
1795 ret = ast_primary_plane_init(ast); in ast_mode_config_init()
1799 ret = ast_cursor_plane_init(ast); in ast_mode_config_init()
1805 if (ast->tx_chip_types & AST_TX_NONE_BIT) { in ast_mode_config_init()
1806 ret = ast_vga_output_init(ast); in ast_mode_config_init()
1810 if (ast->tx_chip_types & AST_TX_SIL164_BIT) { in ast_mode_config_init()
1811 ret = ast_sil164_output_init(ast); in ast_mode_config_init()
1815 if (ast->tx_chip_types & AST_TX_DP501_BIT) { in ast_mode_config_init()
1816 ret = ast_dp501_output_init(ast); in ast_mode_config_init()
1820 if (ast->tx_chip_types & AST_TX_ASTDP_BIT) { in ast_mode_config_init()
1821 ret = ast_astdp_output_init(ast); in ast_mode_config_init()