linux/drivers/video
David Miller 969830b2fe radeonfb: fix accel engine hangs
Some chips appear to have the 2D engine hang during screen redraw,
typically in a sequence of copyarea operations. This appear to be
solved by adding a flush of the engine destination pixel cache
and waiting for the engine to be idle before issuing the accel
operation. The performance impact seems to be fairly small.

Here is a trace on an RV370 (PCI device ID 0x5b64), it records the
RBBM_STATUS register, then the source x/y, destination x/y, and
width/height used for the copy:

----------------------------------------
radeonfb_prim_copyarea: STATUS[00000140] src[210:70] dst[210:60] wh[a0:10]
radeonfb_prim_copyarea: STATUS[00000140] src[2b8:70] dst[2b8:60] wh[88:10]
radeonfb_prim_copyarea: STATUS[00000140] src[348:70] dst[348:60] wh[40:10]
radeonfb_prim_copyarea: STATUS[80020140] src[390:70] dst[390:60] wh[88:10]
radeonfb_prim_copyarea: STATUS[8002613f] src[40:80] dst[40:70] wh[28:10]
radeonfb_prim_copyarea: STATUS[80026139] src[a8:80] dst[a8:70] wh[38:10]
radeonfb_prim_copyarea: STATUS[80026133] src[e8:80] dst[e8:70] wh[80:10]
radeonfb_prim_copyarea: STATUS[8002612d] src[170:80] dst[170:70] wh[30:10]
radeonfb_prim_copyarea: STATUS[80026127] src[1a8:80] dst[1a8:70] wh[8:10]
radeonfb_prim_copyarea: STATUS[80026121] src[1b8:80] dst[1b8:70] wh[88:10]
radeonfb_prim_copyarea: STATUS[8002611b] src[248:80] dst[248:70] wh[68:10]
----------------------------------------

When things are going fine the copies complete before the next ROP is
even issued, but all of a sudden the 2D unit becomes active (bit 17 in
RBBM_STATUS) and the FIFO retry (bit 13) and FIFO pipeline busy (bit
14) are set as well.  The FIFO begins to backup until it becomes full.

What happens next is the radeon_fifo_wait() times out, and we access
the chip illegally leading to a bus error which usually wedges the
box.  None of this makes it to the console screen, of course :-)
radeon_fifo_wait() should be modified to reset the accelerator when
this timeout happens instead of programming the chip anyways.

----------------------------------------
radeonfb: FIFO Timeout !
ERROR(0): Cheetah error trap taken afsr[0010080005000000] afar[000007f900800e40] TL1(0)
ERROR(0): TPC[595114] TNPC[595118] O7[459788] TSTATE[11009601]
ERROR(0): TPC<radeonfb_copyarea+0xfc/0x248>
ERROR(0): M_SYND(0),  E_SYND(0), Privileged
ERROR(0): Highest priority error (0000080000000000) "Bus error response from system bus"
ERROR(0): D-cache idx[0] tag[0000000000000000] utag[0000000000000000] stag[0000000000000000]
ERROR(0): D-cache data0[0000000000000000] data1[0000000000000000] data2[0000000000000000] data3[0000000000000000]
ERROR(0): I-cache idx[0] tag[0000000000000000] utag[0000000000000000] stag[0000000000000000] u[0000000000000000] l[00\

ERROR(0): I-cache INSN0[0000000000000000] INSN1[0000000000000000] INSN2[0000000000000000] INSN3[0000000000000000]
ERROR(0): I-cache INSN4[0000000000000000] INSN5[0000000000000000] INSN6[0000000000000000] INSN7[0000000000000000]
ERROR(0): E-cache idx[800e40] tag[000000000e049f4c]
ERROR(0): E-cache data0[fffff8127d300180] data1[00000000004b5384] data2[0000000000000000] data3[0000000000000000]
Ker:xnel panic - not syncing: Irrecoverable deferred error trap.
----------------------------------------

Another quirk is that these copyarea calls will not happen until the
first drivers/char/vt.c:redraw_screen() occurs.  This will only happen
if you 1) VC switch or 2) run "consolechars" or 3) unblank the screen.

This seems to happen because until a redraw_screen() the screen scrolling
method used by fbcon is not finalized yet.  I've seen this with other fb
drivers too.

So if all you do is boot straight into X you will never see this bug on
the relevant chips.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-12 16:07:28 -07:00
..
aty radeonfb: fix accel engine hangs 2008-08-12 16:07:28 -07:00
backlight [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
console Revert "fbcon: bgcolor fix" 2008-08-11 10:29:11 -07:00
display fbdev: fix race in device_create 2008-05-20 13:31:53 -07:00
geode lxfb: fix console blanking 2008-07-24 10:47:40 -07:00
i810 i810fb: fix console switch regression 2008-03-19 18:53:36 -07:00
intelfb i2c: Let framebuffer drivers set their I2C bus class to DDC 2008-07-14 22:38:28 +02:00
kyro fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
logo video/logo: add support for Blackfin/Linux logo for framebuffer console 2008-05-14 19:11:14 -07:00
matrox Remove newline from the description of module parameters 2008-08-01 12:46:41 -07:00
mbx mbxfb: fix incorrect argument type 2008-03-10 18:01:20 -07:00
nvidia video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
omap [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
pnx4008 [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
riva video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
savage savagefb: speed up the I2C bus 2008-04-28 08:58:38 -07:00
sis video/sis/: remove compat code 2008-07-24 10:47:37 -07:00
vermilion mm: remove nopage 2008-04-28 08:58:18 -07:00
68328fb.c
acornfb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
acornfb.h
am200epd.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
amba-clcd.c
amifb.c drivers/video/amifb.c cleanups 2008-07-24 10:47:40 -07:00
arcfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
arkfb.c vt8623fb: fix kernel oops 2008-08-05 14:33:46 -07:00
asiliantfb.c
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c atafb: test virtual screen range before subtraction on unsigned 2008-07-24 10:47:37 -07:00
atafb.h
atmel_lcdfb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
au1100fb.c au1100fb: fix modpost warnings 2007-10-18 14:37:17 -07:00
au1100fb.h
au1200fb.c
au1200fb.h
bf54x-lq043fb.c lcd: add lcd_device to check_fb() entry in lcd_ops 2008-07-24 10:47:40 -07:00
bfin-t350mcqb-fb.c lcd: add lcd_device to check_fb() entry in lcd_ops 2008-07-24 10:47:40 -07:00
bt431.h
bt455.h
bw2.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
c2p.c export c2p 2008-07-20 17:24:39 -07:00
c2p.h
carminefb_regs.h fbdev: add the carmine FB driver 2008-07-24 10:47:34 -07:00
carminefb.c fbdev: add the carmine FB driver 2008-07-24 10:47:34 -07:00
carminefb.h fbdev: add the carmine FB driver 2008-07-24 10:47:34 -07:00
cfbcopyarea.c fb: add support for foreign endianness 2008-04-28 08:58:35 -07:00
cfbfillrect.c fb: add support for foreign endianness 2008-04-28 08:58:35 -07:00
cfbimgblt.c video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
cg3.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
cg6.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
cg14.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
chipsfb.c PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
cirrusfb.c drivers/video/cirrusfb: fix RAM address printk 2008-06-12 18:05:41 -07:00
clps711xfb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
cobalt_lcdfb.c fbdev: add new Cobalt LCD framebuffer driver 2008-07-24 10:47:40 -07:00
controlfb.c
controlfb.h
cyber2000fb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
cyber2000fb.h
cyblafb.c drivers/video/: Spelling fixes 2008-02-03 17:31:49 +02:00
dnfb.c m68k: dnfb doesnt check for Apollo 2008-05-18 13:28:49 -07:00
edid.h
efifb.c x86_64 EFI boot support: EFI frame buffer driver 2007-11-29 09:24:54 -08:00
epson1355fb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
fb_ddc.c i2c: Let framebuffer drivers set their I2C bus class to DDC 2008-07-14 22:38:28 +02:00
fb_defio.c fbdev: bugfix for multiprocess defio 2008-07-12 14:33:41 -07:00
fb_draw.h fb: add support for foreign endianness 2008-04-28 08:58:35 -07:00
fb_notify.c
fb_sys_fops.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fbcmap.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fbcvt.c
fbmem.c drivers/video/fbmem.c: removed duplicated include 2008-07-26 13:22:56 -07:00
fbmon.c fbdev: width and height are unsigned 2008-07-24 10:47:39 -07:00
fbsysfs.c
ffb.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
fm2fb.c
fsl-diu-fb.c drivers/video/fsl-diu-fb.c: add missing of_node_put 2008-08-05 14:33:49 -07:00
fsl-diu-fb.h fbdev: powerpc: driver for Freescale 8610 and 5121 DIU 2008-04-28 08:58:40 -07:00
g364fb.c
gbefb.c gbefb: cmap FIFO timeout 2008-07-30 09:41:47 -07:00
gxt4500.c fbdev: use DIV_ROUND_UP or roundup 2008-04-28 08:58:35 -07:00
hecubafb.c fbdev: platforming hecubafb and n411 2008-04-28 08:58:41 -07:00
hgafb.c hgafb: convert to new platform driver API 2008-07-24 10:47:39 -07:00
hitfb.c video: Fix up hp6xx driver build regressions. 2008-07-30 02:16:12 +09:00
hpfb.c m68k: Return -ENODEV if no device is found 2008-05-18 13:28:50 -07:00
igafb.c drivers/video: add missing pci_dev_get 2008-02-06 10:41:16 -08:00
imacfb.c imacfb: remove reference to otherwise-unused, non-existent screen_info.imacpm_seg 2007-11-29 09:24:53 -08:00
imsttfb.c video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
imxfb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
imxfb.h
Kconfig video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver 2008-07-24 10:47:41 -07:00
leo.c sparc: get leo framebuffer working 2008-06-10 14:13:09 -07:00
macfb.c make macfb_setup() static 2008-07-26 12:00:12 -07:00
macmodes.c
macmodes.h
Makefile video: Kill off leaked CONFIG_FB_SH7343VOU reference. 2008-07-29 06:39:26 +09:00
maxinefb.c
metronomefb.c video: use get/put_unaligned_* helpers 2008-04-29 08:06:28 -07:00
modedb.c fbdev: export symbol fb_mode_option 2008-06-06 11:29:12 -07:00
n411.c fbdev: platforming hecubafb and n411 2008-04-28 08:58:41 -07:00
neofb.c neofb: drop the xtimings structure 2008-07-24 10:47:41 -07:00
offb.c fbdev: Teaches offb about palette on radeon r5xx/r6xx 2008-07-22 10:39:36 +10:00
output.c Convert from class_device to device for drivers/video 2007-10-12 14:51:04 -07:00
p9100.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
platinumfb.c platinumfb: Use linux/of_{device,platform}.h instead of asm 2008-06-09 13:46:38 +10:00
platinumfb.h
pm2fb.c video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
pm3fb.c video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
pmag-aa-fb.c fbcon: fix color generation for monochrome framebuffer 2008-02-06 10:41:18 -08:00
pmag-ba-fb.c drivers/video/pmag-ba-fb.c: improve diagnostics 2007-10-16 09:43:19 -07:00
pmagb-b-fb.c pmagb-b-fb: improve diagnostics 2007-10-16 09:43:20 -07:00
ps3fb.c powerpc/ps3: Add a sub-match id to ps3_system_bus 2008-07-22 10:39:33 +10:00
pvr2fb.c sh: More header path fixups for mach dir refactoring. 2008-07-29 22:10:01 +09:00
pxafb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
pxafb.h pxafb: convert ctrlr_sem in a mutex 2008-07-24 10:47:37 -07:00
q40fb.c
s1d13xxxfb.c drivers/video/s1d13xxxfb.c: fix build as module with dbg 2007-11-14 18:45:38 -08:00
s3c2410fb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
s3c2410fb.h S3C2410: clean out changelog header and tidy 2008-05-24 09:56:13 -07:00
s3fb.c vt8623fb: fix kernel oops 2008-08-05 14:33:46 -07:00
sa1100fb.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
sa1100fb.h sa1100fb: convert ctrlr_sem in a mutex 2008-07-24 10:47:37 -07:00
sbuslib.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
sbuslib.h sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
sgivwfb.c x86, VisWS: turn into generic arch, move definitions 2008-07-10 18:55:40 +02:00
sh7760fb.c sh7760fb: write colormap value to hardware 2008-07-28 16:30:21 -07:00
sh_mobile_lcdcfb.c fbdev: SuperH Mobile LCDC Driver 2008-07-24 10:47:38 -07:00
skeletonfb.c skeletonfb: update to correct platform driver usage 2008-07-24 10:47:39 -07:00
sm501fb.c sm501: fixup allocation code to be 64bit resource compliant 2008-07-24 10:47:40 -07:00
sstfb.c video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
sticore.h video/console/stico{n,re}.c: make code static 2008-07-26 12:00:12 -07:00
stifb.c video/stifb.c: make 2 functions static 2008-07-26 12:00:12 -07:00
sunxvr500.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
sunxvr2500.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
svgalib.c svgalib: mode selection updates 2007-10-16 09:43:22 -07:00
syscopyarea.c fb: add support for foreign endianness 2008-04-28 08:58:35 -07:00
sysfillrect.c fb: add support for foreign endianness 2008-04-28 08:58:35 -07:00
sysimgblt.c video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
tcx.c sparc video: remove open boot prom code 2008-05-08 21:37:30 -07:00
tdfxfb.c tdfxfb: remove ypan checks done by a higher layer 2008-07-24 10:47:38 -07:00
tgafb.c tgafb: remove a redundant non-mono test in mono imageblit 2007-10-16 09:43:23 -07:00
tridentfb.c tridentfb: remove warning message that cyblafb driver should be used 2008-07-24 10:47:36 -07:00
uvesafb.c uvesafb: change mode parameter to mode_option 2008-07-24 10:47:37 -07:00
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c vfb: only enable if explicitly requested when compiled in 2008-07-24 10:47:39 -07:00
vga16fb.c vga16fb: source code improvement 2008-07-24 10:47:38 -07:00
vgastate.c
vt8623fb.c vt8623fb: fix kernel oops 2008-08-05 14:33:46 -07:00
w100fb.c w100fb: add 80 MHz modeline 2008-07-04 10:40:08 -07:00
w100fb.h
xen-fbfront.c xen pvfb: Dynamic mode support (screen resizing) 2008-05-27 10:11:36 +02:00
xilinxfb.c [POWERPC] Xilinx: Update compatible to use values generated by BSP generator. 2008-02-06 10:23:21 -07:00