Revert "radeonfb: accelerate imageblit and other improvements"

This reverts commit b1ee26bab14886350ba12a5c10cbc0696ac679bf, along with
the "fixes" for it that all just caused problems:

- c4c6fa9891f3d1bcaae4f39fb751d5302965b566 "radeonfb: fix problem with
color expansion & alignment"

- f3179748a157c21d44d929fd3779421ebfbeaa93 "radeonfb: Disable new color
expand acceleration unless explicitely enabled"

because even when disabled, it breaks for people. See

http://bugzilla.kernel.org/show_bug.cgi?id=12191

for the latest example.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: James Cloos <cloos@jhcloos.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Jean-Luc Coulon <jean.luc.coulon@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+124 -277
+83 -206
drivers/video/aty/radeon_accel.c
··· 5 * --dte 6 */ 7 8 - #define FLUSH_CACHE_WORKAROUND 1 9 - 10 - void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries) 11 { 12 - int i; 13 14 - for (i=0; i<2000000; i++) { 15 - rinfo->fifo_free = INREG(RBBM_STATUS) & 0x7f; 16 - if (rinfo->fifo_free >= entries) 17 - return; 18 - udelay(10); 19 - } 20 - printk(KERN_ERR "radeonfb: FIFO Timeout !\n"); 21 - /* XXX Todo: attempt to reset the engine */ 22 - } 23 24 - static inline void radeon_fifo_wait(struct radeonfb_info *rinfo, int entries) 25 - { 26 - if (entries <= rinfo->fifo_free) 27 - rinfo->fifo_free -= entries; 28 - else 29 - radeon_fifo_update_and_wait(rinfo, entries); 30 - } 31 - 32 - static inline void radeonfb_set_creg(struct radeonfb_info *rinfo, u32 reg, 33 - u32 *cache, u32 new_val) 34 - { 35 - if (new_val == *cache) 36 return; 37 - *cache = new_val; 38 - radeon_fifo_wait(rinfo, 1); 39 - OUTREG(reg, new_val); 40 } 41 42 static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, 43 const struct fb_fillrect *region) 44 { 45 - radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, 46 - rinfo->dp_gui_mc_base | GMC_BRUSH_SOLID_COLOR | ROP3_P); 47 - radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache, 48 - DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM); 49 - radeonfb_set_creg(rinfo, DP_BRUSH_FRGD_CLR, &rinfo->dp_brush_fg_cache, 50 - region->color); 51 52 - /* Ensure the dst cache is flushed and the engine idle before 53 - * issuing the operation. 54 - * 55 - * This works around engine lockups on some cards 56 - */ 57 - #if FLUSH_CACHE_WORKAROUND 58 - radeon_fifo_wait(rinfo, 2); 59 OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); 60 OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); 61 - #endif 62 - radeon_fifo_wait(rinfo, 2); 63 OUTREG(DST_Y_X, (region->dy << 16) | region->dx); 64 OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); 65 } ··· 70 struct fb_fillrect modded; 71 int vxres, vyres; 72 73 - WARN_ON(rinfo->gfx_mode); 74 - if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode) 75 return; 76 if (info->flags & FBINFO_HWACCEL_DISABLED) { 77 cfb_fillrect(info, region); 78 return; 79 } 80 81 vxres = info->var.xres_virtual; 82 vyres = info->var.yres_virtual; ··· 90 91 if(modded.dx + modded.width > vxres) modded.width = vxres - modded.dx; 92 if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy; 93 - 94 - if (info->fix.visual == FB_VISUAL_TRUECOLOR || 95 - info->fix.visual == FB_VISUAL_DIRECTCOLOR ) 96 - modded.color = ((u32 *) (info->pseudo_palette))[region->color]; 97 98 radeonfb_prim_fillrect(rinfo, &modded); 99 } ··· 109 if ( xdir < 0 ) { sx += w-1; dx += w-1; } 110 if ( ydir < 0 ) { sy += h-1; dy += h-1; } 111 112 - radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, 113 - rinfo->dp_gui_mc_base | 114 - GMC_BRUSH_NONE | 115 - GMC_SRC_DATATYPE_COLOR | 116 - ROP3_S | 117 - DP_SRC_SOURCE_MEMORY); 118 - radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache, 119 - (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) | 120 - (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); 121 122 - #if FLUSH_CACHE_WORKAROUND 123 - radeon_fifo_wait(rinfo, 2); 124 OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); 125 OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); 126 - #endif 127 - radeon_fifo_wait(rinfo, 3); 128 OUTREG(SRC_Y_X, (sy << 16) | sx); 129 OUTREG(DST_Y_X, (dy << 16) | dx); 130 OUTREG(DST_HEIGHT_WIDTH, (h << 16) | w); ··· 143 modded.width = area->width; 144 modded.height = area->height; 145 146 - WARN_ON(rinfo->gfx_mode); 147 - if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode) 148 return; 149 if (info->flags & FBINFO_HWACCEL_DISABLED) { 150 cfb_copyarea(info, area); 151 return; 152 } 153 154 vxres = info->var.xres_virtual; 155 vyres = info->var.yres_virtual; ··· 168 radeonfb_prim_copyarea(rinfo, &modded); 169 } 170 171 - static void radeonfb_prim_imageblit(struct radeonfb_info *rinfo, 172 - const struct fb_image *image, 173 - u32 fg, u32 bg) 174 - { 175 - unsigned int dwords; 176 - u32 *bits; 177 - 178 - radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache, 179 - rinfo->dp_gui_mc_base | 180 - GMC_BRUSH_NONE | GMC_DST_CLIP_LEAVE | 181 - GMC_SRC_DATATYPE_MONO_FG_BG | 182 - ROP3_S | 183 - GMC_BYTE_ORDER_MSB_TO_LSB | 184 - DP_SRC_SOURCE_HOST_DATA); 185 - radeonfb_set_creg(rinfo, DP_CNTL, &rinfo->dp_cntl_cache, 186 - DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM); 187 - radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg); 188 - radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg); 189 - 190 - /* Ensure the dst cache is flushed and the engine idle before 191 - * issuing the operation. 192 - * 193 - * This works around engine lockups on some cards 194 - */ 195 - #if FLUSH_CACHE_WORKAROUND 196 - radeon_fifo_wait(rinfo, 2); 197 - OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); 198 - OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); 199 - #endif 200 - 201 - /* X here pads width to a multiple of 32 and uses the clipper to 202 - * adjust the result. Is that really necessary ? Things seem to 203 - * work ok for me without that and the doco doesn't seem to imply] 204 - * there is such a restriction. 205 - */ 206 - radeon_fifo_wait(rinfo, 4); 207 - OUTREG(SC_TOP_LEFT, (image->dy << 16) | image->dx); 208 - OUTREG(SC_BOTTOM_RIGHT, ((image->dy + image->height) << 16) | 209 - (image->dx + image->width)); 210 - OUTREG(DST_Y_X, (image->dy << 16) | image->dx); 211 - 212 - OUTREG(DST_HEIGHT_WIDTH, (image->height << 16) | ((image->width + 31) & ~31)); 213 - 214 - dwords = (image->width + 31) >> 5; 215 - dwords *= image->height; 216 - bits = (u32*)(image->data); 217 - 218 - while(dwords >= 8) { 219 - radeon_fifo_wait(rinfo, 8); 220 - #if BITS_PER_LONG == 64 221 - __raw_writeq(*((u64 *)(bits)), rinfo->mmio_base + HOST_DATA0); 222 - __raw_writeq(*((u64 *)(bits+2)), rinfo->mmio_base + HOST_DATA2); 223 - __raw_writeq(*((u64 *)(bits+4)), rinfo->mmio_base + HOST_DATA4); 224 - __raw_writeq(*((u64 *)(bits+6)), rinfo->mmio_base + HOST_DATA6); 225 - bits += 8; 226 - #else 227 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0); 228 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA1); 229 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA2); 230 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA3); 231 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA4); 232 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA5); 233 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA6); 234 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA7); 235 - #endif 236 - dwords -= 8; 237 - } 238 - while(dwords--) { 239 - radeon_fifo_wait(rinfo, 1); 240 - __raw_writel(*(bits++), rinfo->mmio_base + HOST_DATA0); 241 - } 242 - } 243 - 244 void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image) 245 { 246 struct radeonfb_info *rinfo = info->par; 247 - u32 fg, bg; 248 249 - WARN_ON(rinfo->gfx_mode); 250 - if (info->state != FBINFO_STATE_RUNNING || rinfo->gfx_mode) 251 return; 252 - 253 - if (!image->width || !image->height) 254 - return; 255 - 256 - /* We only do 1 bpp color expansion for now */ 257 - if (!accel_cexp || 258 - (info->flags & FBINFO_HWACCEL_DISABLED) || image->depth != 1) 259 - goto fallback; 260 - 261 - /* Fallback if running out of the screen. We may do clipping 262 - * in the future */ 263 - if ((image->dx + image->width) > info->var.xres_virtual || 264 - (image->dy + image->height) > info->var.yres_virtual) 265 - goto fallback; 266 - 267 - if (info->fix.visual == FB_VISUAL_TRUECOLOR || 268 - info->fix.visual == FB_VISUAL_DIRECTCOLOR) { 269 - fg = ((u32*)(info->pseudo_palette))[image->fg_color]; 270 - bg = ((u32*)(info->pseudo_palette))[image->bg_color]; 271 - } else { 272 - fg = image->fg_color; 273 - bg = image->bg_color; 274 - } 275 - 276 - radeonfb_prim_imageblit(rinfo, image, fg, bg); 277 - return; 278 - 279 - fallback: 280 - radeon_engine_idle(rinfo); 281 282 cfb_imageblit(info, image); 283 } ··· 185 186 if (info->state != FBINFO_STATE_RUNNING) 187 return 0; 188 - 189 - radeon_engine_idle(rinfo); 190 191 return 0; 192 } ··· 261 /* disable 3D engine */ 262 OUTREG(RB3D_CNTL, 0); 263 264 - rinfo->fifo_free = 0; 265 radeonfb_engine_reset(rinfo); 266 267 - radeon_fifo_wait(rinfo, 1); 268 if (IS_R300_VARIANT(rinfo)) { 269 OUTREG(RB2D_DSTCACHE_MODE, INREG(RB2D_DSTCACHE_MODE) | 270 RB2D_DC_AUTOFLUSH_ENABLE | ··· 277 OUTREG(RB2D_DSTCACHE_MODE, 0); 278 } 279 280 - radeon_fifo_wait(rinfo, 3); 281 /* We re-read MC_FB_LOCATION from card as it can have been 282 * modified by XFree drivers (ouch !) 283 */ ··· 288 OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); 289 OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); 290 291 - radeon_fifo_wait(rinfo, 1); 292 - #ifdef __BIG_ENDIAN 293 OUTREGP(DP_DATATYPE, HOST_BIG_ENDIAN_EN, ~HOST_BIG_ENDIAN_EN); 294 #else 295 OUTREGP(DP_DATATYPE, 0, ~HOST_BIG_ENDIAN_EN); 296 #endif 297 - radeon_fifo_wait(rinfo, 2); 298 OUTREG(DEFAULT_SC_TOP_LEFT, 0); 299 OUTREG(DEFAULT_SC_BOTTOM_RIGHT, (DEFAULT_SC_RIGHT_MAX | 300 DEFAULT_SC_BOTTOM_MAX)); 301 302 - /* set default DP_GUI_MASTER_CNTL */ 303 temp = radeon_get_dstbpp(rinfo->depth); 304 - rinfo->dp_gui_mc_base = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS); 305 306 - rinfo->dp_gui_mc_cache = rinfo->dp_gui_mc_base | 307 - GMC_BRUSH_SOLID_COLOR | 308 - GMC_SRC_DATATYPE_COLOR; 309 - radeon_fifo_wait(rinfo, 1); 310 - OUTREG(DP_GUI_MASTER_CNTL, rinfo->dp_gui_mc_cache); 311 312 313 /* clear line drawing regs */ 314 - radeon_fifo_wait(rinfo, 2); 315 OUTREG(DST_LINE_START, 0); 316 OUTREG(DST_LINE_END, 0); 317 318 - /* set brush and source color regs */ 319 - rinfo->dp_brush_fg_cache = 0xffffffff; 320 - rinfo->dp_brush_bg_cache = 0x00000000; 321 - rinfo->dp_src_fg_cache = 0xffffffff; 322 - rinfo->dp_src_bg_cache = 0x00000000; 323 - radeon_fifo_wait(rinfo, 4); 324 - OUTREG(DP_BRUSH_FRGD_CLR, rinfo->dp_brush_fg_cache); 325 - OUTREG(DP_BRUSH_BKGD_CLR, rinfo->dp_brush_bg_cache); 326 - OUTREG(DP_SRC_FRGD_CLR, rinfo->dp_src_fg_cache); 327 - OUTREG(DP_SRC_BKGD_CLR, rinfo->dp_src_bg_cache); 328 329 - /* Default direction */ 330 - rinfo->dp_cntl_cache = DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM; 331 - radeon_fifo_wait(rinfo, 1); 332 - OUTREG(DP_CNTL, rinfo->dp_cntl_cache); 333 334 /* default write mask */ 335 - radeon_fifo_wait(rinfo, 1); 336 OUTREG(DP_WRITE_MSK, 0xffffffff); 337 338 - /* Default to no swapping of host data */ 339 - radeon_fifo_wait(rinfo, 1); 340 - OUTREG(RBBM_GUICNTL, RBBM_GUICNTL_HOST_DATA_SWAP_NONE); 341 - 342 - /* Make sure it's settled */ 343 - radeon_engine_idle(rinfo); 344 }
··· 5 * --dte 6 */ 7 8 + static void radeon_fixup_offset(struct radeonfb_info *rinfo) 9 { 10 + u32 local_base; 11 12 + /* *** Ugly workaround *** */ 13 + /* 14 + * On some platforms, the video memory is mapped at 0 in radeon chip space 15 + * (like PPCs) by the firmware. X will always move it up so that it's seen 16 + * by the chip to be at the same address as the PCI BAR. 17 + * That means that when switching back from X, there is a mismatch between 18 + * the offsets programmed into the engine. This means that potentially, 19 + * accel operations done before radeonfb has a chance to re-init the engine 20 + * will have incorrect offsets, and potentially trash system memory ! 21 + * 22 + * The correct fix is for fbcon to never call any accel op before the engine 23 + * has properly been re-initialized (by a call to set_var), but this is a 24 + * complex fix. This workaround in the meantime, called before every accel 25 + * operation, makes sure the offsets are in sync. 26 + */ 27 28 + radeon_fifo_wait (1); 29 + local_base = INREG(MC_FB_LOCATION) << 16; 30 + if (local_base == rinfo->fb_local_base) 31 return; 32 + 33 + rinfo->fb_local_base = local_base; 34 + 35 + radeon_fifo_wait (3); 36 + OUTREG(DEFAULT_PITCH_OFFSET, (rinfo->pitch << 0x16) | 37 + (rinfo->fb_local_base >> 10)); 38 + OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); 39 + OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); 40 } 41 42 static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, 43 const struct fb_fillrect *region) 44 { 45 + radeon_fifo_wait(4); 46 + 47 + OUTREG(DP_GUI_MASTER_CNTL, 48 + rinfo->dp_gui_master_cntl /* contains, like GMC_DST_32BPP */ 49 + | GMC_BRUSH_SOLID_COLOR 50 + | ROP3_P); 51 + if (radeon_get_dstbpp(rinfo->depth) != DST_8BPP) 52 + OUTREG(DP_BRUSH_FRGD_CLR, rinfo->pseudo_palette[region->color]); 53 + else 54 + OUTREG(DP_BRUSH_FRGD_CLR, region->color); 55 + OUTREG(DP_WRITE_MSK, 0xffffffff); 56 + OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM)); 57 58 + radeon_fifo_wait(2); 59 OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); 60 OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); 61 + 62 + radeon_fifo_wait(2); 63 OUTREG(DST_Y_X, (region->dy << 16) | region->dx); 64 OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); 65 } ··· 70 struct fb_fillrect modded; 71 int vxres, vyres; 72 73 + if (info->state != FBINFO_STATE_RUNNING) 74 return; 75 if (info->flags & FBINFO_HWACCEL_DISABLED) { 76 cfb_fillrect(info, region); 77 return; 78 } 79 + 80 + radeon_fixup_offset(rinfo); 81 82 vxres = info->var.xres_virtual; 83 vyres = info->var.yres_virtual; ··· 89 90 if(modded.dx + modded.width > vxres) modded.width = vxres - modded.dx; 91 if(modded.dy + modded.height > vyres) modded.height = vyres - modded.dy; 92 93 radeonfb_prim_fillrect(rinfo, &modded); 94 } ··· 112 if ( xdir < 0 ) { sx += w-1; dx += w-1; } 113 if ( ydir < 0 ) { sy += h-1; dy += h-1; } 114 115 + radeon_fifo_wait(3); 116 + OUTREG(DP_GUI_MASTER_CNTL, 117 + rinfo->dp_gui_master_cntl /* i.e. GMC_DST_32BPP */ 118 + | GMC_BRUSH_NONE 119 + | GMC_SRC_DSTCOLOR 120 + | ROP3_S 121 + | DP_SRC_SOURCE_MEMORY ); 122 + OUTREG(DP_WRITE_MSK, 0xffffffff); 123 + OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) 124 + | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); 125 126 + radeon_fifo_wait(2); 127 OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); 128 OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); 129 + 130 + radeon_fifo_wait(3); 131 OUTREG(SRC_Y_X, (sy << 16) | sx); 132 OUTREG(DST_Y_X, (dy << 16) | dx); 133 OUTREG(DST_HEIGHT_WIDTH, (h << 16) | w); ··· 146 modded.width = area->width; 147 modded.height = area->height; 148 149 + if (info->state != FBINFO_STATE_RUNNING) 150 return; 151 if (info->flags & FBINFO_HWACCEL_DISABLED) { 152 cfb_copyarea(info, area); 153 return; 154 } 155 + 156 + radeon_fixup_offset(rinfo); 157 158 vxres = info->var.xres_virtual; 159 vyres = info->var.yres_virtual; ··· 170 radeonfb_prim_copyarea(rinfo, &modded); 171 } 172 173 void radeonfb_imageblit(struct fb_info *info, const struct fb_image *image) 174 { 175 struct radeonfb_info *rinfo = info->par; 176 177 + if (info->state != FBINFO_STATE_RUNNING) 178 return; 179 + radeon_engine_idle(); 180 181 cfb_imageblit(info, image); 182 } ··· 290 291 if (info->state != FBINFO_STATE_RUNNING) 292 return 0; 293 + radeon_engine_idle(); 294 295 return 0; 296 } ··· 367 /* disable 3D engine */ 368 OUTREG(RB3D_CNTL, 0); 369 370 radeonfb_engine_reset(rinfo); 371 372 + radeon_fifo_wait (1); 373 if (IS_R300_VARIANT(rinfo)) { 374 OUTREG(RB2D_DSTCACHE_MODE, INREG(RB2D_DSTCACHE_MODE) | 375 RB2D_DC_AUTOFLUSH_ENABLE | ··· 384 OUTREG(RB2D_DSTCACHE_MODE, 0); 385 } 386 387 + radeon_fifo_wait (3); 388 /* We re-read MC_FB_LOCATION from card as it can have been 389 * modified by XFree drivers (ouch !) 390 */ ··· 395 OUTREG(DST_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); 396 OUTREG(SRC_PITCH_OFFSET, (rinfo->pitch << 0x16) | (rinfo->fb_local_base >> 10)); 397 398 + radeon_fifo_wait (1); 399 + #if defined(__BIG_ENDIAN) 400 OUTREGP(DP_DATATYPE, HOST_BIG_ENDIAN_EN, ~HOST_BIG_ENDIAN_EN); 401 #else 402 OUTREGP(DP_DATATYPE, 0, ~HOST_BIG_ENDIAN_EN); 403 #endif 404 + radeon_fifo_wait (2); 405 OUTREG(DEFAULT_SC_TOP_LEFT, 0); 406 OUTREG(DEFAULT_SC_BOTTOM_RIGHT, (DEFAULT_SC_RIGHT_MAX | 407 DEFAULT_SC_BOTTOM_MAX)); 408 409 temp = radeon_get_dstbpp(rinfo->depth); 410 + rinfo->dp_gui_master_cntl = ((temp << 8) | GMC_CLR_CMP_CNTL_DIS); 411 412 + radeon_fifo_wait (1); 413 + OUTREG(DP_GUI_MASTER_CNTL, (rinfo->dp_gui_master_cntl | 414 + GMC_BRUSH_SOLID_COLOR | 415 + GMC_SRC_DATATYPE_COLOR)); 416 417 + radeon_fifo_wait (7); 418 419 /* clear line drawing regs */ 420 OUTREG(DST_LINE_START, 0); 421 OUTREG(DST_LINE_END, 0); 422 423 + /* set brush color regs */ 424 + OUTREG(DP_BRUSH_FRGD_CLR, 0xffffffff); 425 + OUTREG(DP_BRUSH_BKGD_CLR, 0x00000000); 426 427 + /* set source color regs */ 428 + OUTREG(DP_SRC_FRGD_CLR, 0xffffffff); 429 + OUTREG(DP_SRC_BKGD_CLR, 0x00000000); 430 431 /* default write mask */ 432 OUTREG(DP_WRITE_MSK, 0xffffffff); 433 434 + radeon_engine_idle (); 435 }
+1 -1
drivers/video/aty/radeon_backlight.c
··· 66 level = bd->props.brightness; 67 68 del_timer_sync(&rinfo->lvds_timer); 69 - radeon_engine_idle(rinfo); 70 71 lvds_gen_cntl = INREG(LVDS_GEN_CNTL); 72 if (level > 0) {
··· 66 level = bd->props.brightness; 67 68 del_timer_sync(&rinfo->lvds_timer); 69 + radeon_engine_idle(); 70 71 lvds_gen_cntl = INREG(LVDS_GEN_CNTL); 72 if (level > 0) {
+15 -31
drivers/video/aty/radeon_base.c
··· 282 static int backlight = 0; 283 #endif 284 285 - int accel_cexp = 0; 286 - 287 /* 288 * prototypes 289 */ ··· 852 if (rinfo->asleep) 853 return 0; 854 855 OUTREG(CRTC_OFFSET, ((var->yoffset * var->xres_virtual + var->xoffset) 856 * var->bits_per_pixel / 8) & ~7); 857 return 0; ··· 882 if (rc) 883 return rc; 884 885 if (value & 0x01) { 886 tmp = INREG(LVDS_GEN_CNTL); 887 ··· 940 if (rinfo->lock_blank) 941 return 0; 942 943 - radeon_engine_idle(rinfo); 944 945 val = INREG(CRTC_EXT_CNTL); 946 val &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS | ··· 1048 1049 if (rinfo->asleep) 1050 return 0; 1051 - 1052 return radeon_screen_blank(rinfo, blank, 0); 1053 } 1054 ··· 1074 pindex = regno; 1075 1076 if (!rinfo->asleep) { 1077 if (rinfo->bpp == 16) { 1078 pindex = regno * 8; 1079 ··· 1244 { 1245 int i; 1246 1247 /* Workaround from XFree */ 1248 if (rinfo->is_mobility) { 1249 /* A temporal workaround for the occational blanking on certain laptop ··· 1341 { 1342 struct radeonfb_info *rinfo = (struct radeonfb_info *)data; 1343 1344 - radeon_engine_idle(rinfo); 1345 1346 OUTREG(LVDS_GEN_CNTL, rinfo->pending_lvds_gen_cntl); 1347 } ··· 1359 if (nomodeset) 1360 return; 1361 1362 - radeon_engine_idle(rinfo); 1363 - 1364 if (!regs_only) 1365 radeon_screen_blank(rinfo, FB_BLANK_NORMAL, 0); 1366 1367 for (i=0; i<10; i++) 1368 OUTREG(common_regs[i].reg, common_regs[i].val); 1369 ··· 1390 radeon_write_pll_regs(rinfo, mode); 1391 1392 if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) { 1393 OUTREG(FP_CRTC_H_TOTAL_DISP, mode->fp_crtc_h_total_disp); 1394 OUTREG(FP_CRTC_V_TOTAL_DISP, mode->fp_crtc_v_total_disp); 1395 OUTREG(FP_H_SYNC_STRT_WID, mode->fp_h_sync_strt_wid); ··· 1405 if (!regs_only) 1406 radeon_screen_blank(rinfo, FB_BLANK_UNBLANK, 0); 1407 1408 OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl); 1409 1410 return; ··· 1556 /* We always want engine to be idle on a mode switch, even 1557 * if we won't actually change the mode 1558 */ 1559 - radeon_engine_idle(rinfo); 1560 1561 hSyncStart = mode->xres + mode->right_margin; 1562 hSyncEnd = hSyncStart + mode->hsync_len; ··· 1851 return 0; 1852 } 1853 1854 static struct fb_ops radeonfb_ops = { 1855 .owner = THIS_MODULE, 1856 .fb_check_var = radeonfb_check_var, ··· 1875 info->par = rinfo; 1876 info->pseudo_palette = rinfo->pseudo_palette; 1877 info->flags = FBINFO_DEFAULT 1878 - | FBINFO_HWACCEL_IMAGEBLIT 1879 | FBINFO_HWACCEL_COPYAREA 1880 | FBINFO_HWACCEL_FILLRECT 1881 | FBINFO_HWACCEL_XPAN ··· 1882 info->fbops = &radeonfb_ops; 1883 info->screen_base = rinfo->fb_base; 1884 info->screen_size = rinfo->mapped_vram; 1885 - 1886 /* Fill fix common fields */ 1887 strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); 1888 info->fix.smem_start = rinfo->fb_base_phys; ··· 1896 info->fix.mmio_len = RADEON_REGSIZE; 1897 info->fix.accel = FB_ACCEL_ATI_RADEON; 1898 1899 - /* Allocate colormap */ 1900 fb_alloc_cmap(&info->cmap, 256, 0); 1901 1902 - /* Setup pixmap used for acceleration */ 1903 - #define PIXMAP_SIZE (2048 * 4) 1904 - 1905 - info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL); 1906 - if (!info->pixmap.addr) { 1907 - printk(KERN_ERR "radeonfb: Failed to allocate pixmap !\n"); 1908 - noaccel = 1; 1909 - goto bail; 1910 - } 1911 - info->pixmap.size = PIXMAP_SIZE; 1912 - info->pixmap.flags = FB_PIXMAP_SYSTEM; 1913 - info->pixmap.scan_align = 4; 1914 - info->pixmap.buf_align = 4; 1915 - info->pixmap.access_align = 32; 1916 - 1917 - bail: 1918 if (noaccel) 1919 info->flags |= FBINFO_HWACCEL_DISABLED; 1920 ··· 2006 u32 tom = INREG(NB_TOM); 2007 tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); 2008 2009 OUTREG(MC_FB_LOCATION, tom); 2010 OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); 2011 OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); ··· 2510 } else if (!strncmp(this_opt, "ignore_devlist", 14)) { 2511 ignore_devlist = 1; 2512 #endif 2513 - } else if (!strncmp(this_opt, "accel_cexp", 12)) { 2514 - accel_cexp = 1; 2515 } else 2516 mode_option = this_opt; 2517 } ··· 2557 MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)"); 2558 module_param(force_measure_pll, bool, 0); 2559 MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)"); 2560 - module_param(accel_cexp, bool, 0); 2561 - MODULE_PARM_DESC(accel_cexp, "Use acceleration engine for color expansion"); 2562 #ifdef CONFIG_MTRR 2563 module_param(nomtrr, bool, 0); 2564 MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers");
··· 282 static int backlight = 0; 283 #endif 284 285 /* 286 * prototypes 287 */ ··· 854 if (rinfo->asleep) 855 return 0; 856 857 + radeon_fifo_wait(2); 858 OUTREG(CRTC_OFFSET, ((var->yoffset * var->xres_virtual + var->xoffset) 859 * var->bits_per_pixel / 8) & ~7); 860 return 0; ··· 883 if (rc) 884 return rc; 885 886 + radeon_fifo_wait(2); 887 if (value & 0x01) { 888 tmp = INREG(LVDS_GEN_CNTL); 889 ··· 940 if (rinfo->lock_blank) 941 return 0; 942 943 + radeon_engine_idle(); 944 945 val = INREG(CRTC_EXT_CNTL); 946 val &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS | ··· 1048 1049 if (rinfo->asleep) 1050 return 0; 1051 + 1052 return radeon_screen_blank(rinfo, blank, 0); 1053 } 1054 ··· 1074 pindex = regno; 1075 1076 if (!rinfo->asleep) { 1077 + radeon_fifo_wait(9); 1078 + 1079 if (rinfo->bpp == 16) { 1080 pindex = regno * 8; 1081 ··· 1242 { 1243 int i; 1244 1245 + radeon_fifo_wait(20); 1246 + 1247 /* Workaround from XFree */ 1248 if (rinfo->is_mobility) { 1249 /* A temporal workaround for the occational blanking on certain laptop ··· 1337 { 1338 struct radeonfb_info *rinfo = (struct radeonfb_info *)data; 1339 1340 + radeon_engine_idle(); 1341 1342 OUTREG(LVDS_GEN_CNTL, rinfo->pending_lvds_gen_cntl); 1343 } ··· 1355 if (nomodeset) 1356 return; 1357 1358 if (!regs_only) 1359 radeon_screen_blank(rinfo, FB_BLANK_NORMAL, 0); 1360 1361 + radeon_fifo_wait(31); 1362 for (i=0; i<10; i++) 1363 OUTREG(common_regs[i].reg, common_regs[i].val); 1364 ··· 1387 radeon_write_pll_regs(rinfo, mode); 1388 1389 if ((primary_mon == MT_DFP) || (primary_mon == MT_LCD)) { 1390 + radeon_fifo_wait(10); 1391 OUTREG(FP_CRTC_H_TOTAL_DISP, mode->fp_crtc_h_total_disp); 1392 OUTREG(FP_CRTC_V_TOTAL_DISP, mode->fp_crtc_v_total_disp); 1393 OUTREG(FP_H_SYNC_STRT_WID, mode->fp_h_sync_strt_wid); ··· 1401 if (!regs_only) 1402 radeon_screen_blank(rinfo, FB_BLANK_UNBLANK, 0); 1403 1404 + radeon_fifo_wait(2); 1405 OUTPLL(VCLK_ECP_CNTL, mode->vclk_ecp_cntl); 1406 1407 return; ··· 1551 /* We always want engine to be idle on a mode switch, even 1552 * if we won't actually change the mode 1553 */ 1554 + radeon_engine_idle(); 1555 1556 hSyncStart = mode->xres + mode->right_margin; 1557 hSyncEnd = hSyncStart + mode->hsync_len; ··· 1846 return 0; 1847 } 1848 1849 + 1850 static struct fb_ops radeonfb_ops = { 1851 .owner = THIS_MODULE, 1852 .fb_check_var = radeonfb_check_var, ··· 1869 info->par = rinfo; 1870 info->pseudo_palette = rinfo->pseudo_palette; 1871 info->flags = FBINFO_DEFAULT 1872 | FBINFO_HWACCEL_COPYAREA 1873 | FBINFO_HWACCEL_FILLRECT 1874 | FBINFO_HWACCEL_XPAN ··· 1877 info->fbops = &radeonfb_ops; 1878 info->screen_base = rinfo->fb_base; 1879 info->screen_size = rinfo->mapped_vram; 1880 /* Fill fix common fields */ 1881 strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id)); 1882 info->fix.smem_start = rinfo->fb_base_phys; ··· 1892 info->fix.mmio_len = RADEON_REGSIZE; 1893 info->fix.accel = FB_ACCEL_ATI_RADEON; 1894 1895 fb_alloc_cmap(&info->cmap, 256, 0); 1896 1897 if (noaccel) 1898 info->flags |= FBINFO_HWACCEL_DISABLED; 1899 ··· 2019 u32 tom = INREG(NB_TOM); 2020 tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024); 2021 2022 + radeon_fifo_wait(6); 2023 OUTREG(MC_FB_LOCATION, tom); 2024 OUTREG(DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); 2025 OUTREG(CRTC2_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16); ··· 2522 } else if (!strncmp(this_opt, "ignore_devlist", 14)) { 2523 ignore_devlist = 1; 2524 #endif 2525 } else 2526 mode_option = this_opt; 2527 } ··· 2571 MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)"); 2572 module_param(force_measure_pll, bool, 0); 2573 MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)"); 2574 #ifdef CONFIG_MTRR 2575 module_param(nomtrr, bool, 0); 2576 MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers");
+3 -3
drivers/video/aty/radeon_pm.c
··· 2653 2654 if (!(info->flags & FBINFO_HWACCEL_DISABLED)) { 2655 /* Make sure engine is reset */ 2656 - radeon_engine_idle(rinfo); 2657 radeonfb_engine_reset(rinfo); 2658 - radeon_engine_idle(rinfo); 2659 } 2660 2661 /* Blank display and LCD */ ··· 2767 2768 rinfo->asleep = 0; 2769 } else 2770 - radeon_engine_idle(rinfo); 2771 2772 /* Restore display & engine */ 2773 radeon_write_mode (rinfo, &rinfo->state, 1);
··· 2653 2654 if (!(info->flags & FBINFO_HWACCEL_DISABLED)) { 2655 /* Make sure engine is reset */ 2656 + radeon_engine_idle(); 2657 radeonfb_engine_reset(rinfo); 2658 + radeon_engine_idle(); 2659 } 2660 2661 /* Blank display and LCD */ ··· 2767 2768 rinfo->asleep = 0; 2769 } else 2770 + radeon_engine_idle(); 2771 2772 /* Restore display & engine */ 2773 radeon_write_mode (rinfo, &rinfo->state, 1);
+17 -23
drivers/video/aty/radeonfb.h
··· 336 int mon2_type; 337 u8 *mon2_EDID; 338 339 - /* accel bits */ 340 - u32 dp_gui_mc_base; 341 - u32 dp_gui_mc_cache; 342 - u32 dp_cntl_cache; 343 - u32 dp_brush_fg_cache; 344 - u32 dp_brush_bg_cache; 345 - u32 dp_src_fg_cache; 346 - u32 dp_src_bg_cache; 347 - u32 fifo_free; 348 349 struct pll_info pll; 350 ··· 348 int lock_blank; 349 int dynclk; 350 int no_schedule; 351 - int gfx_mode; 352 enum radeon_pm_mode pm_mode; 353 reinit_function_ptr reinit_func; 354 ··· 392 #define OUTREG8(addr,val) writeb(val, (rinfo->mmio_base)+addr) 393 #define INREG16(addr) readw((rinfo->mmio_base)+addr) 394 #define OUTREG16(addr,val) writew(val, (rinfo->mmio_base)+addr) 395 - 396 - #ifdef CONFIG_PPC 397 - #define INREG(addr) ({ eieio(); ld_le32(rinfo->mmio_base+(addr)); }) 398 - #define OUTREG(addr,val) do { eieio(); st_le32(rinfo->mmio_base+(addr),(val)); } while(0) 399 - #else 400 #define INREG(addr) readl((rinfo->mmio_base)+addr) 401 #define OUTREG(addr,val) writel(val, (rinfo->mmio_base)+addr) 402 - #endif 403 404 static inline void _OUTREGP(struct radeonfb_info *rinfo, u32 addr, 405 u32 val, u32 mask) ··· 535 * 2D Engine helper routines 536 */ 537 538 - extern void radeon_fifo_update_and_wait(struct radeonfb_info *rinfo, int entries); 539 540 static inline void radeon_engine_flush (struct radeonfb_info *rinfo) 541 { ··· 558 /* Ensure FIFO is empty, ie, make sure the flush commands 559 * has reached the cache 560 */ 561 - radeon_fifo_update_and_wait(rinfo, 64); 562 563 /* Wait for the flush to complete */ 564 for (i=0; i < 2000000; i++) { ··· 570 } 571 572 573 - static inline void radeon_engine_idle(struct radeonfb_info *rinfo) 574 { 575 int i; 576 577 /* ensure FIFO is empty before waiting for idle */ 578 - radeon_fifo_update_and_wait (rinfo, 64); 579 580 for (i=0; i<2000000; i++) { 581 if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) { ··· 588 } 589 590 591 #define radeon_msleep(ms) _radeon_msleep(rinfo,ms) 592 593 ··· 619 extern int radeonfb_sync(struct fb_info *info); 620 extern void radeonfb_engine_init (struct radeonfb_info *rinfo); 621 extern void radeonfb_engine_reset(struct radeonfb_info *rinfo); 622 - extern void radeon_fixup_mem_offset(struct radeonfb_info *rinfo); 623 624 /* Other functions */ 625 extern int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch); ··· 633 static inline void radeonfb_bl_init(struct radeonfb_info *rinfo) {} 634 static inline void radeonfb_bl_exit(struct radeonfb_info *rinfo) {} 635 #endif 636 - 637 - extern int accel_cexp; 638 639 #endif /* __RADEONFB_H__ */
··· 336 int mon2_type; 337 u8 *mon2_EDID; 338 339 + u32 dp_gui_master_cntl; 340 341 struct pll_info pll; 342 ··· 356 int lock_blank; 357 int dynclk; 358 int no_schedule; 359 enum radeon_pm_mode pm_mode; 360 reinit_function_ptr reinit_func; 361 ··· 401 #define OUTREG8(addr,val) writeb(val, (rinfo->mmio_base)+addr) 402 #define INREG16(addr) readw((rinfo->mmio_base)+addr) 403 #define OUTREG16(addr,val) writew(val, (rinfo->mmio_base)+addr) 404 #define INREG(addr) readl((rinfo->mmio_base)+addr) 405 #define OUTREG(addr,val) writel(val, (rinfo->mmio_base)+addr) 406 407 static inline void _OUTREGP(struct radeonfb_info *rinfo, u32 addr, 408 u32 val, u32 mask) ··· 550 * 2D Engine helper routines 551 */ 552 553 + static inline void _radeon_fifo_wait(struct radeonfb_info *rinfo, int entries) 554 + { 555 + int i; 556 + 557 + for (i=0; i<2000000; i++) { 558 + if ((INREG(RBBM_STATUS) & 0x7f) >= entries) 559 + return; 560 + udelay(1); 561 + } 562 + printk(KERN_ERR "radeonfb: FIFO Timeout !\n"); 563 + } 564 565 static inline void radeon_engine_flush (struct radeonfb_info *rinfo) 566 { ··· 563 /* Ensure FIFO is empty, ie, make sure the flush commands 564 * has reached the cache 565 */ 566 + _radeon_fifo_wait (rinfo, 64); 567 568 /* Wait for the flush to complete */ 569 for (i=0; i < 2000000; i++) { ··· 575 } 576 577 578 + static inline void _radeon_engine_idle(struct radeonfb_info *rinfo) 579 { 580 int i; 581 582 /* ensure FIFO is empty before waiting for idle */ 583 + _radeon_fifo_wait (rinfo, 64); 584 585 for (i=0; i<2000000; i++) { 586 if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) { ··· 593 } 594 595 596 + #define radeon_engine_idle() _radeon_engine_idle(rinfo) 597 + #define radeon_fifo_wait(entries) _radeon_fifo_wait(rinfo,entries) 598 #define radeon_msleep(ms) _radeon_msleep(rinfo,ms) 599 600 ··· 622 extern int radeonfb_sync(struct fb_info *info); 623 extern void radeonfb_engine_init (struct radeonfb_info *rinfo); 624 extern void radeonfb_engine_reset(struct radeonfb_info *rinfo); 625 626 /* Other functions */ 627 extern int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_switch); ··· 637 static inline void radeonfb_bl_init(struct radeonfb_info *rinfo) {} 638 static inline void radeonfb_bl_exit(struct radeonfb_info *rinfo) {} 639 #endif 640 641 #endif /* __RADEONFB_H__ */
+5 -13
include/video/radeon.h
··· 525 #define CRTC_DISPLAY_DIS (1 << 10) 526 #define CRTC_CRT_ON (1 << 15) 527 528 - /* DSTCACHE_MODE bits constants */ 529 - #define RB2D_DC_AUTOFLUSH_ENABLE (1 << 8) 530 - #define RB2D_DC_DC_DISABLE_IGNORE_PE (1 << 17) 531 532 /* DSTCACHE_CTLSTAT bit constants */ 533 #define RB2D_DC_FLUSH_2D (1 << 0) ··· 866 #define GMC_DST_16BPP_YVYU422 0x00000c00 867 #define GMC_DST_32BPP_AYUV444 0x00000e00 868 #define GMC_DST_16BPP_ARGB4444 0x00000f00 869 #define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 870 #define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 871 #define GMC_DP_CONVERSION_TEMP_9300 0x00008000 872 #define GMC_DP_CONVERSION_TEMP_6500 0x00000000 873 #define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 874 #define GMC_3D_FCN_EN_CLR 0x00000000 875 #define GMC_3D_FCN_EN_SET 0x08000000 ··· 885 #define GMC_WRITE_MASK_LEAVE 0x00000000 886 #define GMC_WRITE_MASK_SET 0x40000000 887 #define GMC_CLR_CMP_CNTL_DIS (1 << 28) 888 - #define GMC_SRC_DATATYPE_MASK (3 << 12) 889 - #define GMC_SRC_DATATYPE_MONO_FG_BG (0 << 12) 890 - #define GMC_SRC_DATATYPE_MONO_FG_LA (1 << 12) 891 #define GMC_SRC_DATATYPE_COLOR (3 << 12) 892 #define ROP3_S 0x00cc0000 893 #define ROP3_SRCCOPY 0x00cc0000 ··· 893 #define DP_SRC_SOURCE_MASK (7 << 24) 894 #define GMC_BRUSH_NONE (15 << 4) 895 #define DP_SRC_SOURCE_MEMORY (2 << 24) 896 - #define DP_SRC_SOURCE_HOST_DATA (3 << 24) 897 #define GMC_BRUSH_SOLIDCOLOR 0x000000d0 898 899 /* DP_MIX bit constants */ ··· 977 #define DISP_PWR_MAN_DIG_TMDS_ENABLE_RST (1 << 24) 978 #define DISP_PWR_MAN_TV_ENABLE_RST (1 << 25) 979 #define DISP_PWR_MAN_AUTO_PWRUP_EN (1 << 26) 980 - 981 - /* RBBM_GUICNTL constants */ 982 - #define RBBM_GUICNTL_HOST_DATA_SWAP_NONE (0 << 0) 983 - #define RBBM_GUICNTL_HOST_DATA_SWAP_16BIT (1 << 0) 984 - #define RBBM_GUICNTL_HOST_DATA_SWAP_32BIT (2 << 0) 985 - #define RBBM_GUICNTL_HOST_DATA_SWAP_HDW (3 << 0) 986 987 /* masks */ 988
··· 525 #define CRTC_DISPLAY_DIS (1 << 10) 526 #define CRTC_CRT_ON (1 << 15) 527 528 529 /* DSTCACHE_CTLSTAT bit constants */ 530 #define RB2D_DC_FLUSH_2D (1 << 0) ··· 869 #define GMC_DST_16BPP_YVYU422 0x00000c00 870 #define GMC_DST_32BPP_AYUV444 0x00000e00 871 #define GMC_DST_16BPP_ARGB4444 0x00000f00 872 + #define GMC_SRC_MONO 0x00000000 873 + #define GMC_SRC_MONO_LBKGD 0x00001000 874 + #define GMC_SRC_DSTCOLOR 0x00003000 875 #define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 876 #define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 877 #define GMC_DP_CONVERSION_TEMP_9300 0x00008000 878 #define GMC_DP_CONVERSION_TEMP_6500 0x00000000 879 + #define GMC_DP_SRC_RECT 0x02000000 880 + #define GMC_DP_SRC_HOST 0x03000000 881 #define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 882 #define GMC_3D_FCN_EN_CLR 0x00000000 883 #define GMC_3D_FCN_EN_SET 0x08000000 ··· 883 #define GMC_WRITE_MASK_LEAVE 0x00000000 884 #define GMC_WRITE_MASK_SET 0x40000000 885 #define GMC_CLR_CMP_CNTL_DIS (1 << 28) 886 #define GMC_SRC_DATATYPE_COLOR (3 << 12) 887 #define ROP3_S 0x00cc0000 888 #define ROP3_SRCCOPY 0x00cc0000 ··· 894 #define DP_SRC_SOURCE_MASK (7 << 24) 895 #define GMC_BRUSH_NONE (15 << 4) 896 #define DP_SRC_SOURCE_MEMORY (2 << 24) 897 #define GMC_BRUSH_SOLIDCOLOR 0x000000d0 898 899 /* DP_MIX bit constants */ ··· 979 #define DISP_PWR_MAN_DIG_TMDS_ENABLE_RST (1 << 24) 980 #define DISP_PWR_MAN_TV_ENABLE_RST (1 << 25) 981 #define DISP_PWR_MAN_AUTO_PWRUP_EN (1 << 26) 982 983 /* masks */ 984