Lines Matching refs:crtc

436 	struct aty128_crtc crtc;  member
730 pitch_value = par->crtc.pitch; in aty128_init_engine()
731 if (par->crtc.bpp == 24) { in aty128_init_engine()
752 (depth_to_dst(par->crtc.depth) << 8) | in aty128_init_engine()
1014 static void aty128_set_crtc(const struct aty128_crtc *crtc, in aty128_set_crtc() argument
1017 aty_st_le32(CRTC_GEN_CNTL, crtc->gen_cntl); in aty128_set_crtc()
1018 aty_st_le32(CRTC_H_TOTAL_DISP, crtc->h_total); in aty128_set_crtc()
1019 aty_st_le32(CRTC_H_SYNC_STRT_WID, crtc->h_sync_strt_wid); in aty128_set_crtc()
1020 aty_st_le32(CRTC_V_TOTAL_DISP, crtc->v_total); in aty128_set_crtc()
1021 aty_st_le32(CRTC_V_SYNC_STRT_WID, crtc->v_sync_strt_wid); in aty128_set_crtc()
1022 aty_st_le32(CRTC_PITCH, crtc->pitch); in aty128_set_crtc()
1023 aty_st_le32(CRTC_OFFSET, crtc->offset); in aty128_set_crtc()
1024 aty_st_le32(CRTC_OFFSET_CNTL, crtc->offset_cntl); in aty128_set_crtc()
1031 struct aty128_crtc *crtc, in aty128_var_to_crtc() argument
1128 crtc->gen_cntl = 0x3000000L | c_sync | (dst << 8); in aty128_var_to_crtc()
1130 crtc->h_total = h_total | (h_disp << 16); in aty128_var_to_crtc()
1131 crtc->v_total = v_total | (v_disp << 16); in aty128_var_to_crtc()
1133 crtc->h_sync_strt_wid = h_sync_strt | (h_sync_wid << 16) | in aty128_var_to_crtc()
1135 crtc->v_sync_strt_wid = v_sync_strt | (v_sync_wid << 16) | in aty128_var_to_crtc()
1138 crtc->pitch = vxres >> 3; in aty128_var_to_crtc()
1140 crtc->offset = 0; in aty128_var_to_crtc()
1143 crtc->offset_cntl = 0x00010000; in aty128_var_to_crtc()
1145 crtc->offset_cntl = 0; in aty128_var_to_crtc()
1147 crtc->vxres = vxres; in aty128_var_to_crtc()
1148 crtc->vyres = vyres; in aty128_var_to_crtc()
1149 crtc->xoffset = xoffset; in aty128_var_to_crtc()
1150 crtc->yoffset = yoffset; in aty128_var_to_crtc()
1151 crtc->depth = depth; in aty128_var_to_crtc()
1152 crtc->bpp = bpp; in aty128_var_to_crtc()
1221 static int aty128_crtc_to_var(const struct aty128_crtc *crtc, in aty128_crtc_to_var() argument
1230 h_total = crtc->h_total & 0x1ff; in aty128_crtc_to_var()
1231 h_disp = (crtc->h_total >> 16) & 0xff; in aty128_crtc_to_var()
1232 h_sync_strt = (crtc->h_sync_strt_wid >> 3) & 0x1ff; in aty128_crtc_to_var()
1233 h_sync_dly = crtc->h_sync_strt_wid & 0x7; in aty128_crtc_to_var()
1234 h_sync_wid = (crtc->h_sync_strt_wid >> 16) & 0x3f; in aty128_crtc_to_var()
1235 h_sync_pol = (crtc->h_sync_strt_wid >> 23) & 0x1; in aty128_crtc_to_var()
1236 v_total = crtc->v_total & 0x7ff; in aty128_crtc_to_var()
1237 v_disp = (crtc->v_total >> 16) & 0x7ff; in aty128_crtc_to_var()
1238 v_sync_strt = crtc->v_sync_strt_wid & 0x7ff; in aty128_crtc_to_var()
1239 v_sync_wid = (crtc->v_sync_strt_wid >> 16) & 0x1f; in aty128_crtc_to_var()
1240 v_sync_pol = (crtc->v_sync_strt_wid >> 23) & 0x1; in aty128_crtc_to_var()
1241 c_sync = crtc->gen_cntl & CRTC_CSYNC_EN ? 1 : 0; in aty128_crtc_to_var()
1242 pix_width = crtc->gen_cntl & CRTC_PIX_WIDTH_MASK; in aty128_crtc_to_var()
1261 var->xres_virtual = crtc->vxres; in aty128_crtc_to_var()
1262 var->yres_virtual = crtc->vyres; in aty128_crtc_to_var()
1263 var->xoffset = crtc->xoffset; in aty128_crtc_to_var()
1264 var->yoffset = crtc->yoffset; in aty128_crtc_to_var()
1510 aty128_set_crtc(&par->crtc, par); in aty128fb_set_par()
1517 if (par->crtc.bpp == 32) in aty128fb_set_par()
1519 else if (par->crtc.bpp == 16) in aty128fb_set_par()
1526 info->fix.line_length = (par->crtc.vxres * par->crtc.bpp) >> 3; in aty128fb_set_par()
1527 info->fix.visual = par->crtc.bpp == 8 ? FB_VISUAL_PSEUDOCOLOR in aty128fb_set_par()
1539 (((par->crtc.h_total>>16) & 0xff)+1)*8, in aty128fb_set_par()
1540 ((par->crtc.v_total>>16) & 0x7ff)+1, in aty128fb_set_par()
1541 par->crtc.bpp, in aty128fb_set_par()
1542 par->crtc.vxres*par->crtc.bpp/8); in aty128fb_set_par()
1556 struct aty128_crtc crtc; in aty128_decode_var() local
1560 if ((err = aty128_var_to_crtc(var, &crtc, par))) in aty128_decode_var()
1566 if ((err = aty128_ddafifo(&fifo_reg, &pll, crtc.depth, par))) in aty128_decode_var()
1569 par->crtc = crtc; in aty128_decode_var()
1583 if ((err = aty128_crtc_to_var(&par->crtc, var))) in aty128_encode_var()
1625 xres = (((par->crtc.h_total >> 16) & 0xff) + 1) << 3; in aty128fb_pan_display()
1626 yres = ((par->crtc.v_total >> 16) & 0x7ff) + 1; in aty128fb_pan_display()
1631 if (xoffset+xres > par->crtc.vxres || yoffset+yres > par->crtc.vyres) in aty128fb_pan_display()
1634 par->crtc.xoffset = xoffset; in aty128fb_pan_display()
1635 par->crtc.yoffset = yoffset; in aty128fb_pan_display()
1637 offset = ((yoffset * par->crtc.vxres + xoffset) * (par->crtc.bpp >> 3)) in aty128fb_pan_display()
1640 if (par->crtc.bpp == 24) in aty128fb_pan_display()
2237 || (par->crtc.depth == 16 && regno > 63) in aty128fb_setcolreg()
2238 || (par->crtc.depth == 15 && regno > 31)) in aty128fb_setcolreg()
2249 switch (par->crtc.depth) { in aty128fb_setcolreg()
2266 if (par->crtc.depth == 16 && regno > 0) { in aty128fb_setcolreg()
2284 } else if (par->crtc.bpp == 16) in aty128fb_setcolreg()