From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>
Cc: Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Kernel Testers List
<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
James Cloos <cloos-GRsvFm/Gh/pBDgjK7y7TUQ@public.gmane.org>,
Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [Bug #11875] radeonfb lockup in .28-rc (bisected)
Date: Sun, 23 Nov 2008 10:15:58 +1100 [thread overview]
Message-ID: <1227395758.7185.293.camel@pasglop> (raw)
In-Reply-To: <vyitTh0pP2N.A.qBE.B9HKJB@chimera>
On Sat, 2008-11-22 at 21:28 +0100, Rafael J. Wysocki wrote:
> This message has been generated automatically as a part of a report
> of recent regressions.
>
> The following bug entry is on the current list of known regressions
> from 2.6.27. Please verify if it still should be listed and let me know
> (either way).
The patch should definitely be merged as it fixes a problem. Andrew,
will you send it to Linus ? There's no fbdev maintainer anymore...
Here's the up to date patch (same as previously posted minus a warning
that was due to a now unused variable that I removed in this one). It
doesn't fix -other- problems reported with suspend & shutdown that have
been elusive so far (I really haven't reproduced despite some serious
torturing) and could be X bugs in the first place. I'll continue
investigating them but in the meantime, this should go in.
radeonfb: Fix problem with color expansion & alignment
The engine on some radeon variants locks up if color expansion is
called for non aligned source data. This patch enables a feature of
the core fbdev to request aligned input pixmaps and uses the HW
clipping engine to clip the output to the requested size
Signed-off-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
---
Index: linux-work/drivers/video/aty/radeon_accel.c
===================================================================
--- linux-work.orig/drivers/video/aty/radeon_accel.c 2008-11-23 10:10:16.000000000 +1100
+++ linux-work/drivers/video/aty/radeon_accel.c 2008-11-23 10:12:34.000000000 +1100
@@ -174,12 +174,12 @@ static void radeonfb_prim_imageblit(stru
const struct fb_image *image,
u32 fg, u32 bg)
{
- unsigned int src_bytes, dwords;
+ unsigned int dwords;
u32 *bits;
radeonfb_set_creg(rinfo, DP_GUI_MASTER_CNTL, &rinfo->dp_gui_mc_cache,
rinfo->dp_gui_mc_base |
- GMC_BRUSH_NONE |
+ GMC_BRUSH_NONE | GMC_DST_CLIP_LEAVE |
GMC_SRC_DATATYPE_MONO_FG_BG |
ROP3_S |
GMC_BYTE_ORDER_MSB_TO_LSB |
@@ -189,9 +189,6 @@ static void radeonfb_prim_imageblit(stru
radeonfb_set_creg(rinfo, DP_SRC_FRGD_CLR, &rinfo->dp_src_fg_cache, fg);
radeonfb_set_creg(rinfo, DP_SRC_BKGD_CLR, &rinfo->dp_src_bg_cache, bg);
- radeon_fifo_wait(rinfo, 1);
- OUTREG(DST_Y_X, (image->dy << 16) | image->dx);
-
/* Ensure the dst cache is flushed and the engine idle before
* issuing the operation.
*
@@ -205,13 +202,19 @@ static void radeonfb_prim_imageblit(stru
/* X here pads width to a multiple of 32 and uses the clipper to
* adjust the result. Is that really necessary ? Things seem to
- * work ok for me without that and the doco doesn't seem to imply
+ * work ok for me without that and the doco doesn't seem to imply]
* there is such a restriction.
*/
- OUTREG(DST_WIDTH_HEIGHT, (image->width << 16) | image->height);
+ radeon_fifo_wait(rinfo, 4);
+ OUTREG(SC_TOP_LEFT, (image->dy << 16) | image->dx);
+ OUTREG(SC_BOTTOM_RIGHT, ((image->dy + image->height) << 16) |
+ (image->dx + image->width));
+ OUTREG(DST_Y_X, (image->dy << 16) | image->dx);
+
+ OUTREG(DST_HEIGHT_WIDTH, (image->height << 16) | ((image->width + 31) & ~31));
- src_bytes = (((image->width * image->depth) + 7) / 8) * image->height;
- dwords = (src_bytes + 3) / 4;
+ dwords = (image->width + 31) >> 5;
+ dwords *= image->height;
bits = (u32*)(image->data);
while(dwords >= 8) {
Index: linux-work/drivers/video/aty/radeon_base.c
===================================================================
--- linux-work.orig/drivers/video/aty/radeon_base.c 2008-11-23 10:10:16.000000000 +1100
+++ linux-work/drivers/video/aty/radeon_base.c 2008-11-23 10:11:02.000000000 +1100
@@ -1875,6 +1875,7 @@ static int __devinit radeon_set_fbinfo (
info->fbops = &radeonfb_ops;
info->screen_base = rinfo->fb_base;
info->screen_size = rinfo->mapped_vram;
+
/* Fill fix common fields */
strlcpy(info->fix.id, rinfo->name, sizeof(info->fix.id));
info->fix.smem_start = rinfo->fb_base_phys;
@@ -1889,8 +1890,25 @@ static int __devinit radeon_set_fbinfo (
info->fix.mmio_len = RADEON_REGSIZE;
info->fix.accel = FB_ACCEL_ATI_RADEON;
+ /* Allocate colormap */
fb_alloc_cmap(&info->cmap, 256, 0);
+ /* Setup pixmap used for acceleration */
+#define PIXMAP_SIZE (2048 * 4)
+
+ info->pixmap.addr = kmalloc(PIXMAP_SIZE, GFP_KERNEL);
+ if (!info->pixmap.addr) {
+ printk(KERN_ERR "radeonfb: Failed to allocate pixmap !\n");
+ noaccel = 1;
+ goto bail;
+ }
+ info->pixmap.size = PIXMAP_SIZE;
+ info->pixmap.flags = FB_PIXMAP_SYSTEM;
+ info->pixmap.scan_align = 4;
+ info->pixmap.buf_align = 4;
+ info->pixmap.access_align = 32;
+
+bail:
if (noaccel)
info->flags |= FBINFO_HWACCEL_DISABLED;
next prev parent reply other threads:[~2008-11-22 23:15 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 20:24 2.6.28-rc6-git1: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-11-22 20:24 ` [Bug #11822] ACPI Warning (nspredef-0858): _SB_.PCI0.LPC_.EC__.BAT0._BIF: Return Package type mismatch at index 9 - found Buffer, expected String [20080926] Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11875] radeonfb lockup in .28-rc (bisected) Rafael J. Wysocki
2008-11-22 23:15 ` Benjamin Herrenschmidt [this message]
2008-11-22 20:28 ` [Bug #11858] Timeout regression introduced by 242f9dcb8ba6f68fcd217a119a7648a4f69290e9 Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11849] default IRQ affinity change in v2.6.27 (breaking several SMP PPC based systems) Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11828] Linux 2.6.27-git3: no SD card reader Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11898] mke2fs hang on AIC79 device Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11913] USB/INPUT: slab error in cache_alloc_debugcheck_after(): double free? Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11906] 2.6.28-rc2 seems to fail at powering down the monitor when it should Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11925] cdrom: missing compat ioctls Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11965] regression introduced by - timers: fix itimer/many thread hang Rafael J. Wysocki
2008-11-23 7:39 ` Ingo Molnar
[not found] ` <20081123073929.GA23229-X9Un+BFzKDI@public.gmane.org>
2008-11-23 12:43 ` Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11947] 2.6.28-rc VC switching with Intel graphics broken Rafael J. Wysocki
2008-11-24 8:47 ` Romano Giannetti (lists)
2008-11-24 19:01 ` Jesse Barnes
2008-11-24 19:13 ` Bernhard Schmidt
2008-11-24 19:35 ` Jesse Barnes
[not found] ` <492AFCC3.4090602-wpePDvIxQxvMZTq/7ZfH4Q@public.gmane.org>
2008-11-26 8:35 ` Ingo Molnar
[not found] ` <20081126083528.GM26036-X9Un+BFzKDI@public.gmane.org>
2008-11-26 14:44 ` Rafael J. Wysocki
[not found] ` <200811241101.55121.jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
2008-11-25 11:01 ` Romano Giannetti (lists)
2008-11-22 20:28 ` [Bug #11958] [2.6.27.x => 2.6.28-rc3] Xorg crash with xf86MapVidMem error Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11970] gettimeofday return a old time in mmbench Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #11996] Tracing framework regression in 2.6.28-rc3 Rafael J. Wysocki
2008-11-23 13:12 ` Pekka Paalanen
[not found] ` <20081123151258.2e5ed008-cxYvVS3buNOdIgDiPM52R8c4bpwCjbIv@public.gmane.org>
2008-11-23 13:14 ` Ingo Molnar
2008-11-22 20:28 ` [Bug #11982] Fan level 7 after resume wit 2.6.28-rc3 Rafael J. Wysocki
2008-11-24 7:26 ` Tino Keitel
2008-11-22 20:28 ` [Bug #12020] scsi_times_out NULL pointer dereference Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12034] snd-hda-intel on Realtek ALC268 chip shows only Master volume (for playback) Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12031] DRM enabled kernel hangs hard on resume on x60 Rafael J. Wysocki
2008-11-24 13:36 ` Rafael J. Wysocki
2008-11-24 17:50 ` Jesse Barnes
2008-11-22 20:28 ` [Bug #12028] i915 DRM is broken in 2.6.28-rc4 Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12038] Suspend regression in stable kernel 2.6.27.4 on Mac mini Core Duo Rafael J. Wysocki
2008-11-24 8:03 ` Tino Keitel
[not found] ` <20081124080334.GA4598-z7fNteJZwjmqk56C3691EA@public.gmane.org>
2008-11-24 8:32 ` Justin P. Mattock
2008-11-22 20:28 ` [Bug #12064] [regression] Measured 688 cycles TSC warp; marking TSC unstable Rafael J. Wysocki
2008-11-23 16:29 ` Frans Pop
[not found] ` <200811231729.59256.elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>
2008-11-23 16:32 ` Ingo Molnar
2008-11-22 20:28 ` [Bug #12047] ACPI toshiba: only register rfkill if bt is enabled Rafael J. Wysocki
2008-11-22 23:44 ` Frederik Deweerdt
2008-11-22 20:28 ` [Bug #12061] snd_hda_intel: power_save: sound cracks on powerdown Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12081] xen: pin correct PGD on suspend Rafael J. Wysocki
2008-11-22 20:28 ` [Bug #12082] IRQ and MSI allocations broken without sparse irq Rafael J. Wysocki
2008-11-23 17:15 ` [linux-pm] 2.6.28-rc6-git1: Reported regressions from 2.6.27 Alan Stern
-- strict thread matches above, loose matches on Subject: below --
2008-11-16 16:24 2.6.28-rc5: " Rafael J. Wysocki
2008-11-16 16:35 ` [Bug #11875] radeonfb lockup in .28-rc (bisected) Rafael J. Wysocki
2008-11-09 17:53 2.6.28-rc3-git6: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-11-09 17:59 ` [Bug #11875] radeonfb lockup in .28-rc (bisected) Rafael J. Wysocki
2008-11-09 21:15 ` Benjamin Herrenschmidt
2008-11-10 5:46 ` Benjamin Herrenschmidt
2008-11-10 7:13 ` Paul Collins
[not found] ` <87abc8rr3m.fsf-D7l3p2TGOOdLdt5/z87VRY6ehsQQaF5K@public.gmane.org>
2008-11-10 9:05 ` Benjamin Herrenschmidt
2008-11-10 9:06 ` David Miller
2008-11-10 20:39 ` Andreas Schwab
[not found] ` <jetzafiad4.fsf-+JVCjXrnBTholqkO4TVVkw@public.gmane.org>
2008-11-10 21:52 ` Benjamin Herrenschmidt
2008-11-10 23:20 ` Andreas Schwab
[not found] ` <jefxlzi2x0.fsf-+JVCjXrnBTholqkO4TVVkw@public.gmane.org>
2008-11-10 23:34 ` Benjamin Herrenschmidt
2008-11-10 23:54 ` Andreas Schwab
[not found] ` <je1vxji1br.fsf-+JVCjXrnBTholqkO4TVVkw@public.gmane.org>
2008-11-11 1:49 ` Benjamin Herrenschmidt
2008-11-11 2:47 ` Linus Torvalds
[not found] ` <alpine.LFD.2.00.0811101822350.3468-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
2008-11-11 3:21 ` Benjamin Herrenschmidt
2008-11-11 9:31 ` Andreas Schwab
[not found] ` <jeskpy7gnl.fsf-+JVCjXrnBTholqkO4TVVkw@public.gmane.org>
2008-11-11 11:30 ` Benjamin Herrenschmidt
2008-11-21 2:55 ` Benjamin Herrenschmidt
2008-11-21 3:02 ` Benjamin Herrenschmidt
2008-11-13 23:11 ` David Miller
[not found] ` <20081113.151116.139760511.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-11-14 0:54 ` Benjamin Herrenschmidt
2008-11-14 2:50 ` David Miller
[not found] ` <20081113.185059.154690040.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-11-14 3:04 ` David Miller
[not found] ` <20081113.190447.252605555.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-11-14 3:29 ` Benjamin Herrenschmidt
2008-11-14 4:28 ` David Miller
2008-11-14 8:51 ` Benjamin Herrenschmidt
2008-11-02 16:04 2.6.28-rc2-git7: Reported regressions from 2.6.27 Rafael J. Wysocki
2008-11-02 16:07 ` [Bug #11875] radeonfb lockup in .28-rc (bisected) Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1227395758.7185.293.camel@pasglop \
--to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cloos-GRsvFm/Gh/pBDgjK7y7TUQ@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).