Lines Matching refs:par

40 void aty_reset_engine(struct atyfb_par *par)  in aty_reset_engine()  argument
44 aty_ld_le32(GEN_TEST_CNTL, par) & in aty_reset_engine()
45 ~(GUI_ENGINE_ENABLE | HWCURSOR_ENABLE), par); in aty_reset_engine()
48 aty_ld_le32(GEN_TEST_CNTL, par) | GUI_ENGINE_ENABLE, par); in aty_reset_engine()
52 aty_ld_le32(BUS_CNTL, par) | BUS_HOST_ERR_ACK | BUS_FIFO_ERR_ACK, par); in aty_reset_engine()
54 par->fifo_space = 0; in aty_reset_engine()
57 static void reset_GTC_3D_engine(const struct atyfb_par *par) in reset_GTC_3D_engine() argument
59 aty_st_le32(SCALE_3D_CNTL, 0xc0, par); in reset_GTC_3D_engine()
61 aty_st_le32(SETUP_CNTL, 0x00, par); in reset_GTC_3D_engine()
63 aty_st_le32(SCALE_3D_CNTL, 0x00, par); in reset_GTC_3D_engine()
67 void aty_init_engine(struct atyfb_par *par, struct fb_info *info) in aty_init_engine() argument
85 reset_GTC_3D_engine(par); in aty_init_engine()
88 aty_reset_engine(par); in aty_init_engine()
92 aty_st_le32(MEM_VGA_WP_SEL, 0x00010000, par); in aty_init_engine()
93 aty_st_le32(MEM_VGA_RP_SEL, 0x00010000, par); in aty_init_engine()
99 wait_for_fifo(14, par); in aty_init_engine()
102 aty_st_le32(CONTEXT_MASK, 0xFFFFFFFF, par); in aty_init_engine()
105 aty_st_le32(DST_OFF_PITCH, (pitch_value / 8) << 22, par); in aty_init_engine()
108 aty_st_le32(DST_Y_X, 0, par); in aty_init_engine()
109 aty_st_le32(DST_HEIGHT, 0, par); in aty_init_engine()
110 aty_st_le32(DST_BRES_ERR, 0, par); in aty_init_engine()
111 aty_st_le32(DST_BRES_INC, 0, par); in aty_init_engine()
112 aty_st_le32(DST_BRES_DEC, 0, par); in aty_init_engine()
116 DST_X_LEFT_TO_RIGHT, par); in aty_init_engine()
119 aty_st_le32(SRC_OFF_PITCH, (pitch_value / 8) << 22, par); in aty_init_engine()
122 aty_st_le32(SRC_Y_X, 0, par); in aty_init_engine()
123 aty_st_le32(SRC_HEIGHT1_WIDTH1, 1, par); in aty_init_engine()
124 aty_st_le32(SRC_Y_X_START, 0, par); in aty_init_engine()
125 aty_st_le32(SRC_HEIGHT2_WIDTH2, 1, par); in aty_init_engine()
128 aty_st_le32(SRC_CNTL, SRC_LINE_X_LEFT_TO_RIGHT, par); in aty_init_engine()
131 wait_for_fifo(13, par); in aty_init_engine()
132 aty_st_le32(HOST_CNTL, HOST_BYTE_ALIGN, par); in aty_init_engine()
135 aty_st_le32(PAT_REG0, 0, par); in aty_init_engine()
136 aty_st_le32(PAT_REG1, 0, par); in aty_init_engine()
137 aty_st_le32(PAT_CNTL, 0, par); in aty_init_engine()
140 aty_st_le32(SC_LEFT, 0, par); in aty_init_engine()
141 aty_st_le32(SC_TOP, 0, par); in aty_init_engine()
142 aty_st_le32(SC_BOTTOM, par->crtc.vyres - 1, par); in aty_init_engine()
143 aty_st_le32(SC_RIGHT, vxres - 1, par); in aty_init_engine()
146 aty_st_le32(DP_BKGD_CLR, 0, par); in aty_init_engine()
149 aty_st_le32(DP_FRGD_CLR, 0xFFFFFFFF, par); in aty_init_engine()
152 aty_st_le32(DP_WRITE_MASK, 0xFFFFFFFF, par); in aty_init_engine()
156 aty_st_le32(DP_MIX, FRGD_MIX_S | BKGD_MIX_D, par); in aty_init_engine()
160 aty_st_le32(DP_SRC, FRGD_SRC_FRGD_CLR, par); in aty_init_engine()
164 wait_for_fifo(3, par); in aty_init_engine()
165 aty_st_le32(CLR_CMP_CLR, 0, par); in aty_init_engine()
166 aty_st_le32(CLR_CMP_MASK, 0xFFFFFFFF, par); in aty_init_engine()
167 aty_st_le32(CLR_CMP_CNTL, 0, par); in aty_init_engine()
170 wait_for_fifo(2, par); in aty_init_engine()
171 aty_st_le32(DP_PIX_WIDTH, par->crtc.dp_pix_width, par); in aty_init_engine()
172 aty_st_le32(DP_CHAIN_MASK, par->crtc.dp_chain_mask, par); in aty_init_engine()
174 wait_for_fifo(5, par); in aty_init_engine()
175 aty_st_le32(SCALE_3D_CNTL, 0, par); in aty_init_engine()
176 aty_st_le32(Z_CNTL, 0, par); in aty_init_engine()
177 aty_st_le32(CRTC_INT_CNTL, aty_ld_le32(CRTC_INT_CNTL, par) & ~0x20, in aty_init_engine()
178 par); in aty_init_engine()
179 aty_st_le32(GUI_TRAJ_CNTL, 0x100023, par); in aty_init_engine()
182 wait_for_idle(par); in aty_init_engine()
190 struct atyfb_par *par) in draw_rect() argument
193 wait_for_fifo(2, par); in draw_rect()
194 aty_st_le32(DST_Y_X, (x << 16) | y, par); in draw_rect()
195 aty_st_le32(DST_HEIGHT_WIDTH, (width << 16) | height, par); in draw_rect()
196 par->blitter_may_be_busy = 1; in draw_rect()
201 struct atyfb_par *par = (struct atyfb_par *) info->par; in atyfb_copyarea() local
205 if (par->asleep) in atyfb_copyarea()
209 if (!par->accel_flags) { in atyfb_copyarea()
238 wait_for_fifo(5, par); in atyfb_copyarea()
239 aty_st_le32(DP_PIX_WIDTH, par->crtc.dp_pix_width, par); in atyfb_copyarea()
240 aty_st_le32(DP_SRC, FRGD_SRC_BLIT, par); in atyfb_copyarea()
241 aty_st_le32(SRC_Y_X, (sx << 16) | sy, par); in atyfb_copyarea()
242 aty_st_le32(SRC_HEIGHT1_WIDTH1, (width << 16) | area->height, par); in atyfb_copyarea()
243 aty_st_le32(DST_CNTL, direction | rotation, par); in atyfb_copyarea()
244 draw_rect(dx, dy, width, area->height, par); in atyfb_copyarea()
249 struct atyfb_par *par = (struct atyfb_par *) info->par; in atyfb_fillrect() local
252 if (par->asleep) in atyfb_fillrect()
256 if (!par->accel_flags) { in atyfb_fillrect()
275 wait_for_fifo(4, par); in atyfb_fillrect()
276 aty_st_le32(DP_PIX_WIDTH, par->crtc.dp_pix_width, par); in atyfb_fillrect()
277 aty_st_le32(DP_FRGD_CLR, color, par); in atyfb_fillrect()
280 par); in atyfb_fillrect()
283 DST_X_LEFT_TO_RIGHT | rotation, par); in atyfb_fillrect()
284 draw_rect(dx, rect->dy, width, rect->height, par); in atyfb_fillrect()
289 struct atyfb_par *par = (struct atyfb_par *) info->par; in atyfb_imageblit() local
293 if (par->asleep) in atyfb_imageblit()
297 if (!par->accel_flags || in atyfb_imageblit()
303 pix_width = par->crtc.dp_pix_width; in atyfb_imageblit()
366 wait_for_fifo(2, par); in atyfb_imageblit()
367 aty_st_le32(DP_BKGD_CLR, bg, par); in atyfb_imageblit()
368 aty_st_le32(DP_FRGD_CLR, fg, par); in atyfb_imageblit()
376 wait_for_fifo(5, par); in atyfb_imageblit()
377 aty_st_le32(DP_PIX_WIDTH, pix_width, par); in atyfb_imageblit()
378 aty_st_le32(DP_MIX, mix, par); in atyfb_imageblit()
379 aty_st_le32(DP_SRC, src, par); in atyfb_imageblit()
380 aty_st_le32(HOST_CNTL, HOST_BYTE_ALIGN, par); in atyfb_imageblit()
381 aty_st_le32(DST_CNTL, DST_Y_TOP_TO_BOTTOM | DST_X_LEFT_TO_RIGHT | rotation, par); in atyfb_imageblit()
383 draw_rect(dx, dy, width, image->height, par); in atyfb_imageblit()
419 wait_for_fifo(1, par); in atyfb_imageblit()
420 aty_st_le32(HOST_DATA0, le32_to_cpu(hostdword), par); in atyfb_imageblit()
425 wait_for_fifo(1, par); in atyfb_imageblit()
426 aty_st_le32(HOST_DATA0, get_unaligned_le32(pbitmap), par); in atyfb_imageblit()