Hi,
Add more information.
We got occasionally "GPU lockup" after resuming from suspend(on mipsel
platform with a mips64 compatible CPU and rs780e, the kernel is 3.1.0-rc8
64bit). Related kernel message:
/* return from STR */
[ 156.152343] radeon 0000:01:05.0: WB enabled
[ 156.187500] [drm] ring test succeeded in 0 usecs
[ 156.187500] [drm] ib test succeeded in 0 usecs
[ 156.398437] ata2: SATA link down (SStatus 0 SControl 300)
[ 156.398437] ata3: SATA link down (SStatus 0 SControl 300)
[…
[View More] 156.398437] ata4: SATA link down (SStatus 0 SControl 300)
[ 156.578125] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 156.597656] ata1.00: configured for UDMA/133
[ 156.613281] usb 1-5: reset high speed USB device number 4 using ehci_hcd
[ 157.027343] usb 3-2: reset low speed USB device number 2 using ohci_hcd
[ 157.609375] usb 3-3: reset low speed USB device number 3 using ohci_hcd
[ 157.683593] r8169 0000:02:00.0: eth0: link up
[ 165.621093] PM: resume of devices complete after 9679.556 msecs
[ 165.628906] Restarting tasks ... done.
[ 177.085937] radeon 0000:01:05.0: GPU lockup CP stall for more than
10019msec
[ 177.089843] ------------[ cut here ]------------
[ 177.097656] WARNING: at drivers/gpu/drm/radeon/radeon_fence.c:267
radeon_fence_wait+0x25c/0x33c()
[ 177.105468] GPU lockup (waiting for 0x000013C3 last fence id 0x000013AD)
[ 177.113281] Modules linked in: psmouse serio_raw
[ 177.117187] Call Trace:
[ 177.121093] [<ffffffff806f3e7c>] dump_stack+0x8/0x34
[ 177.125000] [<ffffffff8022e4f4>] warn_slowpath_common+0x78/0xa0
[ 177.132812] [<ffffffff8022e5b8>] warn_slowpath_fmt+0x38/0x44
[ 177.136718] [<ffffffff80522ed8>] radeon_fence_wait+0x25c/0x33c
[ 177.144531] [<ffffffff804e9e70>] ttm_bo_wait+0x108/0x220
[ 177.148437] [<ffffffff8053b478>] radeon_gem_wait_idle_ioctl+0x80/0x114
[ 177.156250] [<ffffffff804d2fe8>] drm_ioctl+0x2e4/0x3fc
[ 177.160156] [<ffffffff805a1820>] radeon_kms_compat_ioctl+0x28/0x38
[ 177.167968] [<ffffffff80311a04>] compat_sys_ioctl+0x120/0x35c
[ 177.171875] [<ffffffff80211d18>] handle_sys+0x118/0x138
[ 177.179687] ---[ end trace 92f63d998efe4c6d ]---
[ 177.187500] radeon 0000:01:05.0: GPU softreset
[ 177.191406] radeon 0000:01:05.0: R_008010_GRBM_STATUS=0xF57C2030
[ 177.195312] radeon 0000:01:05.0: R_008014_GRBM_STATUS2=0x00111103
[ 177.203125] radeon 0000:01:05.0: R_000E50_SRBM_STATUS=0x20023040
[ 177.363281] radeon 0000:01:05.0: Wait for MC idle timedout !
[ 177.367187] radeon 0000:01:05.0: R_008020_GRBM_SOFT_RESET=0x00007FEE
[ 177.390625] radeon 0000:01:05.0: R_008020_GRBM_SOFT_RESET=0x00000001
[ 177.414062] radeon 0000:01:05.0: R_008010_GRBM_STATUS=0xA0003030
[ 177.417968] radeon 0000:01:05.0: R_008014_GRBM_STATUS2=0x00000003
[ 177.425781] radeon 0000:01:05.0: R_000E50_SRBM_STATUS=0x2002B040
[ 177.433593] radeon 0000:01:05.0: GPU reset succeed
[ 177.605468] radeon 0000:01:05.0: Wait for MC idle timedout !
[ 177.761718] radeon 0000:01:05.0: Wait for MC idle timedout !
[ 177.804687] radeon 0000:01:05.0: WB enabled
[ 178.000000] [drm:r600_ring_test] *ERROR* radeon: ring test failed
(scratch(0x8504)=0xCAFEDEAD)
[ 178.007812] [drm:r600_resume] *ERROR* r600 startup failed on resume
[ 178.988281] [drm:radeon_ib_schedule] *ERROR* radeon: couldn't schedule
IB(5).
[ 178.996093] [drm:radeon_cs_ioctl] *ERROR* Failed to schedule IB !
[ 179.003906] [drm:radeon_ib_schedule] *ERROR* radeon: couldn't schedule
IB(6).
...
What may cause a "GPU lockup"? Why reset didn't work? Any idea?
BTW, one question:
I got 'RADEON_IS_PCI | RADEON_IS_IGP' in rdev->flags, which causes
need_dma32 was set.
Is it correct? (drivers/char/agp is not available on mips, could that be the
reason?)
[ 177.179687]在 2011年9月28日 下午3:23, <chenhc(a)lemote.com>写道:
> Hi Alex,
>
> When we do STR (S3) with a RS780E radeon card on MIPS platform. "GPU
> reset" may happen after resume (the possibility is about 5%). After that,
> X is unusuable.
>
> We know there is a "ring test" at system resume time and GPU reset time.
> Whether GPU reset happens, the "ring test" at system resume time is always
> successful. But the "ring test" at GPU reset time usually fails.
>
> We use the latest kernel (3.1.0-RC8 from git) and X.org is 7.6.
>
> Any ideas?
>
> Best regards,
> Huacai Chen
>
>
Regards,
- Chen Jie
[View Less]
I've given up waiting for someone to implement support for these ioctls
on another platform before they're merged, but I have received a lot of
feedback on the interfaces, and it sounds like they're ok. I've also
fixed all the remaining issues I'm aware of on SNB platforms and things
are working well, so I'm just going to push them out. (Note IVB support
is still missing a few bits for scaling and such; I'll fix those up when
I get back home and can test on IVB again.)
One change you may …
[View More]notice from the last set is that I've removed the
'zpos' parameter. Plane blending and z ordering is very chipset
specific (it even varies between Intel chipsets), so exposing it through
a device specific ioctl is probably a better plan. By default, planes
should just overlay the primary plane; a device specific ioctl (none
available yet, but I have some planned for i915) can provide more
flexibility.
To recap previous posts, this patchset provides a few new interfaces:
- addfb2 - a new FB creation ioctl that lets you specify a surface
format, as defined by a fourcc code from the video4linux headers
(libdrm will wrap these in DRM_ macros for portability)
- planes - ioctls for fetching plane info and attaching an fb to a
plane; note there's no separate flip ioctl for planes, just use
setplane to update the fb
The testdisplay.c program in intel-gpu-tools has support for testing
these interfaces, and I'll be fixing up and pushing the
xf86-video-intel support soon as well, so you can use either as a
reference for how the new interfaces work.
Thanks,
Jesse
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=41592
Summary: [Radeon] The display often freezes with gnome-shell
3.2
Product: Mesa
Version: 7.11
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
AssignedTo: dri-devel(a)lists.freedesktop.org
ReportedBy: mirandir(a)orange.fr
Since the Gnome 3.…
[View More]2 update, there are many many lines like this in my Xorg.log
:
[ 4192.459] (II) RADEON(0): radeon_dri2_flip_event_handler:981
fevent[0x17e2360] width 1366 pitch 5632 (/4 1408)
[ 4193.043] (II) RADEON(0): radeon_dri2_schedule_flip:619 fevent[0x184a890]
And gnome-shell freezes very often, when i exit fullscreen games or just after
that I unlocked gnome-screensaver.
I have to switch to a VT and kill the gnome-shell process, then it restart and
I can continue to work.
I attach my dmesg and Xorg.log.
Additional info:
* Archlinux 64 bits, kernel-3.0.6, mesa-7.11, xorg-server-1.10.4 and
gnome-shell-3.2.0
* ATI Mobility Radeon HD5470 with the radeon driver.
(I can't reproduce this bug with my laptop with Intel graphics)
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[View Less]
From: Jerome Glisse <jglisse(a)redhat.com>
Polarity needs to be set accordingly to connector status (connected
or disconnected). Set it up at module init so first hotplug works
reliably no matter what is the initial set of connector.
Signed-off-by: Jerome Glisse <jglisse(a)redhat.com>
cc: stable(a)kernel.org
---
drivers/gpu/drm/radeon/radeon_connectors.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/…
[View More]gpu/drm/radeon/radeon_connectors.c
index dec6cbe..bfdd48b 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1789,6 +1789,7 @@ radeon_add_atom_connector(struct drm_device *dev,
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
} else
connector->polled = DRM_CONNECTOR_POLL_HPD;
+ radeon_hpd_set_polarity(rdev, radeon_connector->hpd.hpd);
connector->display_info.subpixel_order = subpixel_order;
drm_sysfs_connector_add(connector);
--
1.7.6.4
[View Less]
Kernels with no iommu support cannot ever need the Ironlake
work-around, so never enable it in that case.
Might be better to completely remove the work-around from the kernel
in this case?
Signed-off-by: Keith Packard <keithp(a)keithp.com>
Cc: Ben Widawsky <ben(a)bwidawsk.net>
---
Here's a shorter patch which just elides the body of the needs_idle_maps functions
drivers/char/agp/intel-gtt.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/…
[View More]char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 3a8d448..c92424c 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1186,10 +1186,11 @@ static void gen6_cleanup(void)
/* Certain Gen5 chipsets require require idling the GPU before
* unmapping anything from the GTT when VT-d is enabled.
*/
-extern int intel_iommu_gfx_mapped;
static inline int needs_idle_maps(void)
{
+#ifdef CONFIG_INTEL_IOMMU
const unsigned short gpu_devid = intel_private.pcidev->device;
+ extern int intel_iommu_gfx_mapped;
/* Query intel_iommu to see if we need the workaround. Presumably that
* was loaded first.
@@ -1198,7 +1199,7 @@ static inline int needs_idle_maps(void)
gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
intel_iommu_gfx_mapped)
return 1;
-
+#endif
return 0;
}
--
1.7.7
[View Less]
[.. and this is what I said in v1 post]:
Way back in January this patchset:
http://lists.freedesktop.org/archives/dri-devel/2011-January/006905.html
was merged in, but pieces of it had to be reverted b/c they did not
work properly under PowerPC, ARM, and when swapping out pages to disk.
After a bit of discussion on the mailing list
http://marc.info/?i=4D769726.2030307@shipmail.org I started working on it, but
got waylaid by other things .. and finally I am able to post the RFC patches.
There …
[View More]was a lot of discussion about it and I am not sure if I captured
everybody's thoughts - if I did not - that is _not_ intentional - it has just
been quite some time..
Anyhow .. the patches explore what the "lib/dmapool.c" does - which is to have a
DMA pool that the device has associated with. I kind of married that code
along with drivers/gpu/drm/ttm/ttm_page_alloc.c to create a TTM DMA pool code.
The end result is DMA pool with extra features: can do write-combine, uncached,
writeback (and tracks them and sets back to WB when freed); tracks "cached"
pages that don't really need to be returned to a pool; and hooks up to
the shrinker code so that the pools can be shrunk.
If you guys think this set of patches make sense - my future plans were
1) Get this in large crowd of testing .. and if it works for a kernel release
2) to move a bulk of this in the lib/dmapool.c (I spoke with Matthew Wilcox
about it and he is OK as long as I don't introduce performance regressions).
But before I do any of that a second set of eyes taking a look at these
patches would be most welcome.
In regards to testing, I've been running them non-stop for the last month.
(and found some issues which I've fixed up) - and been quite happy with how
they work.
Michel (thanks!) took a spin of the patches on his PowerPC and they did not
cause any regressions (wheew).
The patches are also located in a git tree:
git://oss.oracle.com/git/kwilk/xen.git devel/ttm.dma_pool.v2.1
Konrad Rzeszutek Wilk (11):
swiotlb: Expose swiotlb_nr_tlb function to modules
nouveau/radeon: Set coherent DMA mask
ttm/radeon/nouveau: Check the DMA address from TTM against known value.
ttm: Wrap ttm_[put|get]_pages and extract GFP_* and caching states from 'struct ttm_tt'
ttm: Get rid of temporary scaffolding
ttm/driver: Expand ttm_backend_func to include two overrides for TTM page pool.
ttm: Do not set the ttm->be to NULL before calling the TTM page pool to free pages.
ttm: Provide DMA aware TTM page pool code.
ttm: Add 'no_dma' parameter to turn the TTM DMA pool off during runtime.
nouveau/ttm/dma: Enable the TTM DMA pool if device can only do 32-bit DMA.
radeon/ttm/dma: Enable the TTM DMA pool if the device can only do 32-bit.
drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 +
drivers/gpu/drm/nouveau/nouveau_mem.c | 5 +
drivers/gpu/drm/nouveau/nouveau_sgdma.c | 8 +-
drivers/gpu/drm/radeon/radeon_device.c | 6 +
drivers/gpu/drm/radeon/radeon_gart.c | 4 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 19 +-
drivers/gpu/drm/ttm/Makefile | 3 +
drivers/gpu/drm/ttm/ttm_memory.c | 5 +
drivers/gpu/drm/ttm/ttm_page_alloc.c | 108 ++-
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1446 +++++++++++++++++++++++++++++
drivers/gpu/drm/ttm/ttm_tt.c | 21 +-
drivers/xen/swiotlb-xen.c | 2 +-
include/drm/ttm/ttm_bo_driver.h | 31 +
include/drm/ttm/ttm_page_alloc.h | 53 +-
include/linux/swiotlb.h | 2 +-
lib/swiotlb.c | 5 +-
16 files changed, 1637 insertions(+), 82 deletions(-)
[View Less]
Those are two identical fixes for improving EDID detection timings, which
also fix extremely slow xrandr queries in case of phantom outputs
(https://bugs.freedesktop.org/show_bug.cgi?id=41059)
The first fix is a small change to drm_edid, which prevents it from talking to
non-existent adapters by detecting them faster.
The second fix replicates the first one within the i915 driver. It does the
same thing, but without touching core DRM files.
Those are some of the testing results from our QA …
[View More]team:
Regressions and functional testing:
Machine+ports result
Ironlake(mobile) eDP/VGA pass
Ironlake(desktop) DP/VGA pass
Ironlake(mobile) LVDS/VGA/DP pass
G45(desktop) VGA/HDMI pass
Pineview(mobile) LVDS/VGA pass
xrandr performance:
Without patch with patch
E6510(Ironlake mobile) 0.119 0.111
PK1(Ironlake desktop) 0.101 0.080
T410b(Ironlake mobile) 0.406 0.114
G45b( G45 desktop) 0.121 0.091
Pnv1(Pineview mobile) 0.043 0.040
Those are the results for machines affected by phantom outputs issue, based on
fd.o #41059 feedback:
xrandr performance:
Without patch with patch
System 1 0.840 0.290
System 2 0.690 0.140
System 3 0.315 0.280
System 4 0.175 0.140
System 6 (original issue) 4s 0.184
We have observed no regressions in any cases, and performance improvements
of 20-30% for edid detection timing. Combining it with the results obtained
at https://bugs.freedesktop.org/show_bug.cgi?id=41059, besides those
improvements it also improves xrandr timing by up to 20x in the worst case
of phantom outputs.
I believe that the better way to fix this is via the drm_get_edid() fix, as
it is a one-line fix and could benefit all other chipsets. And we won't have
to reinvent the wheel with intel_drm_get_edid, which only duplicates the
existent functionality with no additional benefits.
Could we have any feedback or reviewed-by or from non-intel drm maintainers?
Thanks!
Eugeni Dodonov (2):
Give up on edid retries when i2c tells us that bus is not there
Check if the bus is valid prior to discovering edid.
drivers/gpu/drm/drm_edid.c | 5 ++++
drivers/gpu/drm/i915/intel_crt.c | 46 ++++++++++++++++++------------------
drivers/gpu/drm/i915/intel_dp.c | 4 +-
drivers/gpu/drm/i915/intel_drv.h | 3 +-
drivers/gpu/drm/i915/intel_hdmi.c | 4 +-
drivers/gpu/drm/i915/intel_i2c.c | 42 ++++++++++++++++++++++++++++++++
drivers/gpu/drm/i915/intel_lvds.c | 2 +-
drivers/gpu/drm/i915/intel_modes.c | 29 +----------------------
drivers/gpu/drm/i915/intel_sdvo.c | 4 +-
9 files changed, 80 insertions(+), 59 deletions(-)
--
1.7.7
[View Less]
drm_wait_vblank must be DRM_UNLOCKED because otherwise it
will grab the drm_global_mutex and then go to sleep until the vblank
event it is waiting for. That can wreck havoc in the windowing system
because if one process issues this ioctl, it will block all other
processes for the duration of all vblanks between the current and the
one it is waiting for. In some cases it can block the entire windowing
system.
v2: incorporate comments received from Daniel Vetter and
Michel Daenzer.
v3/v4: …
[View More]after a lengty discussion with Daniel Vetter, it was concluded
that the only thing not yet protected with locks and atomic
ops is the write to dev->last_vblank_wait. It's only used in a
debug file in proc, and the current code already employs no
correct locking: the proc file only takes dev->struct_mutex,
whereas drm_wait_vblank implicitly took the drm_global_mutex.
Given all this, it's not worth bothering to try to fix
the locks at this time.
Signed-off-by: Ilija Hadzic <ihadzic(a)research.bell-labs.com>
---
drivers/gpu/drm/drm_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index dbabcb0..dc0eb0b 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -124,7 +124,7 @@ static struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_sg_alloc_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
- DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, 0),
+ DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_UNLOCKED),
DRM_IOCTL_DEF(DRM_IOCTL_MODESET_CTL, drm_modeset_ctl, 0),
--
1.7.7
[View Less]