Re: [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants

2013-06-02 Thread Roy Spliet
You probably want to patch up mclk_wait in nva3_pm.c as well for now 
(until this code is ported to HWSQ or PDAEMON), even though it's not 
used by a lot of people.


Op 01-06-13 00:22, Arnd Bergmann schreef:

ARM cannot handle udelay for more than 2 miliseconds, so we
should use mdelay instead for those.

Signed-off-by: Arnd Bergmann 
Cc: David Airlie 
Cc: Ben Skeggs 
Cc: dri-devel@lists.freedesktop.org
---
  drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c 
b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
index d0817d9..ed7415e 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
@@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 
loadval)
const u32 doff = (or * 0x800);
int load = -EINVAL;
nv_wr32(priv, 0x61a00c + doff, 0x0010 | loadval);
-   udelay(9500);
+   mdelay(9);
+   udelay(500);
nv_wr32(priv, 0x61a00c + doff, 0x8000);
load = (nv_rd32(priv, 0x61a00c + doff) & 0x3800) >> 27;
nv_wr32(priv, 0x61a00c + doff, 0x);


--
Roy Spliet BSc.
MSc. Student
Delft University of Technology
http://www.pds.ewi.tudelft.nl/msc/mallocinopencl/
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 03/15] drm/nouveau: use mdelay instead of large udelay constants

2013-06-02 Thread Aaro Koskinen
Hi,

On Sat, Jun 01, 2013 at 12:22:40AM +0200, Arnd Bergmann wrote:
> ARM cannot handle udelay for more than 2 miliseconds, so we
   

 There's l missing here.

> should use mdelay instead for those.

Could this be handled inside ARM udelay() instead? Probably most of the
delay values are compile-time constants.

A.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] dma-buf: Cocci spatch "ptr_ret.spatch"

2013-06-02 Thread Thomas Meyer

Signed-off-by: Thomas Meyer 
---

diff -u -p a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -680,10 +680,7 @@ int dma_buf_debugfs_create_file(const ch
d = debugfs_create_file(name, S_IRUGO, dma_buf_debugfs_dir,
write, &dma_buf_debug_fops);
 
-   if (IS_ERR(d))
-   return PTR_ERR(d);
-
-   return 0;
+   return PTR_RET(d);
 }
 #else
 static inline int dma_buf_init_debugfs(void)


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/cma: Cocci spatch "ptr_ret.spatch"

2013-06-02 Thread Thomas Meyer

Signed-off-by: Thomas Meyer 
---

diff -u -p a/drivers/gpu/drm/drm_gem_cma_helper.c 
b/drivers/gpu/drm/drm_gem_cma_helper.c
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
@@ -174,10 +174,7 @@ int drm_gem_cma_dumb_create(struct drm_f
 
cma_obj = drm_gem_cma_create_with_handle(file_priv, dev,
args->size, &args->handle);
-   if (IS_ERR(cma_obj))
-   return PTR_ERR(cma_obj);
-
-   return 0;
+   return PTR_RET(cma_obj);
 }
 EXPORT_SYMBOL_GPL(drm_gem_cma_dumb_create);
 


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/prime: Cocci spatch "err_cast.spatch"

2013-06-02 Thread Thomas Meyer

Signed-off-by: Thomas Meyer 
---

diff -u -p a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -277,7 +277,7 @@ struct drm_gem_object *drm_gem_prime_imp
 
attach = dma_buf_attach(dma_buf, dev->dev);
if (IS_ERR(attach))
-   return ERR_PTR(PTR_ERR(attach));
+   return ERR_CAST(attach);
 
get_dma_buf(dma_buf);
 


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=63935

--- Comment #52 from zsolt barat  ---
(In reply to comment #48)
> (In reply to comment #47)
> >
> > I can confirm that the patch works on boot, also on a mac 8,2 with drm-next
> > and patches, but fails on suspend resume. It reappears on resume.
> > Please reopen the bug.
> 
> I have a MacbookPro8,2 and this doesn't happen to me.  My pci ID for the
> radeon is 1002:6741 and subsystem 106b:00e2.  Is it the same message in the
> dmesg log?

Hi, I have a slightly different PCI-ID for my ATI graphics card. According to
lspci -nn it's: 1002:6760
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
Seymour [Radeon HD 6400M/7400M Series] [1002:6760]
According to dmesg:
[drm] initializing kernel modesetting (CAICOS 0x1002:0x6760 0x106B:0x00E1).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65254

Alex Deucher  changed:

   What|Removed |Added

  Component|Drivers/DRI/Radeon  |Drivers/Gallium/r600

--- Comment #1 from Alex Deucher  ---
Please attach your xorg log and dmesg output.  Also, what version of mesa are
you using?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #2 from Vladi  ---
Created attachment 80161
  --> https://bugs.freedesktop.org/attachment.cgi?id=80161&action=edit
dmesg

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #3 from Vladi  ---
Created attachment 80162
  --> https://bugs.freedesktop.org/attachment.cgi?id=80162&action=edit
xorg.log

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #4 from Vladi  ---
mesa is git from yesturday, gentoo mesa- ebuild. Also when I add
radeon.audio=1 to kernel parameters I get an purple line on the left side of
the screen from top to bottom. I have tried with xorg 1.13 + mesa
9.2_pre20130528 and git same results..

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #5 from Vladi  ---
forgot to mention my firmware files: linux-firwmare ebuild 20130421

59375dccb37f974c045575cd9428009a  radeon/ARUBA_me.bin
b3072fac01a6eab4711c18148c8bc305  radeon/ARUBA_pfp.bin
246d1c75a5946829f6864dbd5f71d850  radeon/ARUBA_rlc.bin
201877fa59f2fe4d896d5e6b6c1d2e1c  radeon/TAHITI_uvd.bin

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65270] New: CAICOS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65270

  Priority: medium
Bug ID: 65270
  Assignee: dri-devel@lists.freedesktop.org
   Summary: CAICOS [drm:r600_uvd_init] *ERROR* UVD not responding,
trying to reset the VCPU!!!
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: ger...@welter.nu
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: XOrg CVS
 Component: DRM/Radeon
   Product: DRI

Created attachment 80163
  --> https://bugs.freedesktop.org/attachment.cgi?id=80163&action=edit
dmesg from 3.8.10-rc4

This is on a HP ProBook 6560b running Ubuntu 13.04 with the Xorg edgers PPA and
the Ubuntu Mainline Kernel PPA, currenty at 3.8.10-rc4. Here's an excerpt from
the lines stating the problem. The full dmesg is attached.

[1.491745] [drm] Initialized drm 1.1.0 20060810
[1.520286] [drm] radeon kernel modesetting enabled.
[1.521516] [drm] initializing kernel modesetting (CAICOS 0x1002:0x6760
0x103C:0x161B).
[1.521544] [drm] register mmio base: 0xD430
[1.521546] [drm] register mmio size: 131072
[1.523743] [drm] Detected VRAM RAM=512M, BAR=256M
[1.523747] [drm] RAM width 64bits DDR
[1.525789] [drm] radeon: 512M of VRAM memory ready
[1.525791] [drm] radeon: 512M of GTT memory ready.
[1.525805] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[1.525806] [drm] Driver supports precise vblank timestamp query.
[1.525879] [drm] radeon: irq initialized.
[1.527852] [drm] GART: num cpu pages 131072, num gpu pages 131072
[1.528327] [drm] enabling PCIE gen 2 link speeds, disable with
radeon.pcie_gen2=0
[1.528404] [drm] Loading CAICOS Microcode
[1.547532] [drm] PCIE GART of 512M enabled (table at 0x00273000).
[1.564737] [drm] ring test on 0 succeeded in 2 usecs
[1.564802] [drm] ring test on 3 succeeded in 1 usecs
[2.733072] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[3.746322] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[4.759572] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[5.772824] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[6.786074] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[7.799327] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[8.812576] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[9.825827] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   10.839074] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   11.852325] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   11.872197] [drm:r600_uvd_init] *ERROR* UVD not responding, giving up!!!
[   11.872205] [drm:evergreen_startup] *ERROR* radeon: error initializing UVD
(-1).
[   11.872491] [drm] ib test on ring 0 succeeded in 0 usecs
[   11.872539] [drm] ib test on ring 3 succeeded in 0 usecs

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65274] New: TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! (non-EFI laptop)

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65274

  Priority: medium
Bug ID: 65274
  Assignee: dri-devel@lists.freedesktop.org
   Summary: TURKS [drm:r600_uvd_init] *ERROR* UVD not responding,
trying to reset the VCPU!!!  (non-EFI laptop)
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: russianneuroman...@ya.ru
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: unspecified
 Component: DRM/Radeon
   Product: DRI

Created attachment 80170
  --> https://bugs.freedesktop.org/attachment.cgi?id=80170&action=edit
dmesg

Looks like bug 63935 (that about Macs booting in EFI mode) but this one about
non-EFI laptop (Acer Aspire 7560G with BIOS v2.04). Ubuntu 13.04 x86_64, Linux
3.10.rc4. SUMO2 UVD firmware updated from April 2 (I can't find TURKS UVD
firmware - it's use same firmware as SUMO2?)

$ lspci -nn | grep VGA
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
BeaverCreek [Radeon HD 6620G] [1002:9641]
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
Whistler [Radeon HD 6600M/6700M/7600M Series] [1002:6741]

As I undersand UVD initialized successfully on first GPU (look into attached
dmesg) but can't initialize on second - boot stuck for ten seconds.

[3.063106] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741
0x1025:0x059E).
[3.063131] [drm] register mmio base: 0xF020
[3.063132] [drm] register mmio size: 131072
[   14.267992] [drm] Detected VRAM RAM=1024M, BAR=256M
[   14.267997] [drm] RAM width 128bits DDR
[   14.268029] [drm] radeon: 1024M of VRAM memory ready
[   14.268030] [drm] radeon: 512M of GTT memory ready.
[   14.268058] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[   14.268060] [drm] Driver supports precise vblank timestamp query.
[   14.268209] [drm] radeon: irq initialized.
[   14.270085] [drm] GART: num cpu pages 131072, num gpu pages 131072
[   14.271070] [drm] Loading TURKS Microcode
[   14.273276] [drm] PCIE GART of 512M enabled (table at 0x00273000).
[   14.290147] [drm] ring test on 0 succeeded in 2 usecs
[   14.290215] [drm] ring test on 3 succeeded in 1 usecs
[   15.457635] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   16.470051] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   17.482486] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   18.494870] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   19.507253] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   20.519681] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   21.532097] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   22.544538] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   23.556927] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   24.569309] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   24.589200] [drm:r600_uvd_init] *ERROR* UVD not responding, giving up!!!
[   24.589240] [drm:evergreen_startup] *ERROR* radeon: error initializing UVD
(-1).
[   24.589849] [drm] ib test on ring 0 succeeded in 0 usecs
[   24.589926] [drm] ib test on ring 3 succeeded in 0 usecs

UVD registers dump is also attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65274] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! (non-EFI laptop)

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65274

--- Comment #1 from russianneuroman...@ya.ru ---
Created attachment 80171
  --> https://bugs.freedesktop.org/attachment.cgi?id=80171&action=edit
UVD regs

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65068] vgaswitcheroo doesn't deal with powered off dGPU on resume

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65068

--- Comment #6 from Austin Lund  ---
(In reply to comment #5)
> (In reply to comment #4)
> > I'm not sure if this has anything to do with this bug, but the PCI config
> > space is all messed up when running on the integrated GPU:
> 
> When you disable the GPU the hardware is physically powered off so you are
> accessing non-existent registers.  You need to power up the GPU using
> vgaswitcheroo before loading/resuming the driver or access the config space
> with lspci.

I guess what I was trying to say was, does having the device in this state
before you start suspend make the power management subsystem confused?  Will it
try to "restore" the pci configuration space to 0xff?  

The radeon GPU is definitely turned on by the firmware on resume and the
apple-gmux driver turns it off if that was the state of the system when suspend
was started.

I tried a quick hack to call the "ON" function for vga-switcheroo from the
apple-gmux driver suspend hook.  But that didn't work.  However, if I do it
manually (i.e. echo ON > /sys/kernel/debug/vgaswitcheroo/switch) before
suspend, then it does seem to fix it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!

2013-06-02 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=63935

--- Comment #53 from Austin Lund  ---
Fixed for my MacBookPro8,2 in 3.10-rc4.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 1/1] radeon: Fix system hang issue when using KMS with older cards

2013-06-02 Thread Adis Hamzić
The current radeon driver initialization routines, when using KMS, are written
so that the IRQ installation routine is called before initializing the WB buffer
and the CP rings. With some ASICs, though, the IRQ routine tries to access the
GFX_INDEX ring causing a call to RREG32 with the value of -1 in
radeon_fence_read. This, in turn causes the system to completely hang with some
cards, requiring a hard reset.

A call stack that can cause such a hang looks like this (using rv515 ASIC for 
the
example here):
 * rv515_init (rv515.c)
 * radeon_irq_kms_init (radeon_irq_kms.c)
 * drm_irq_install (drm_irq.c)
 * radeon_driver_irq_preinstall_kms (radeon_irq_kms.c)
 * rs600_irq_process (rs600.c)
 * radeon_fence_process - due to SW interrupt (radeon_fence.c)
 * radeon_fence_read (radeon_fence.c)
 * hang due to RREG32(-1)

The patch moves the IRQ installation to the card startup routine, after the ring
has been initialized, but before the IRQ has been set. This fixes the issue, but
requires a check to see if the IRQ is already installed, as is the case in the
system resume codepath.
I have tested the patch on three machines using the rv515, the rv770 and the
evergreen ASIC. They worked without issues.

This seems to be a known issue and has been reported on several bug tracking
sites by various distributions (see links below). Most of reports recommend
booting the system with KMS disabled and then enabling KMS by reloading the
radeon module. For some reason, this was indeed a usable workaround, however,
UMS is now deprecated and disabled by default.

Bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=845745
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/561789
https://bbs.archlinux.org/viewtopic.php?id=156964

Signed-off-by: Adis Hamzić 
---
 drivers/gpu/drm/radeon/evergreen.c | 10 ++
 drivers/gpu/drm/radeon/ni.c| 10 ++
 drivers/gpu/drm/radeon/r100.c  |  9 ++---
 drivers/gpu/drm/radeon/r300.c  |  9 ++---
 drivers/gpu/drm/radeon/r420.c  | 10 ++
 drivers/gpu/drm/radeon/r520.c  |  9 ++---
 drivers/gpu/drm/radeon/r600.c  | 10 ++
 drivers/gpu/drm/radeon/rs400.c |  9 ++---
 drivers/gpu/drm/radeon/rs600.c |  9 ++---
 drivers/gpu/drm/radeon/rs690.c |  9 ++---
 drivers/gpu/drm/radeon/rv515.c |  9 ++---
 drivers/gpu/drm/radeon/rv770.c | 10 ++
 drivers/gpu/drm/radeon/si.c| 10 ++
 13 files changed, 78 insertions(+), 45 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c 
b/drivers/gpu/drm/radeon/evergreen.c
index 8546e3b..0f89ce3 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -4754,6 +4754,12 @@ static int evergreen_startup(struct radeon_device *rdev)
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_size = 0;
 
/* Enable IRQ */
+   if (!rdev->irq.installed) {
+   r = radeon_irq_kms_init(rdev);
+   if (r)
+   return r;
+   }
+
r = r600_irq_init(rdev);
if (r) {
DRM_ERROR("radeon: IH init failed (%d).\n", r);
@@ -4923,10 +4929,6 @@ int evergreen_init(struct radeon_device *rdev)
if (r)
return r;
 
-   r = radeon_irq_kms_init(rdev);
-   if (r)
-   return r;
-
rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 
1024);
 
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 7969c0c..8458330 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -2025,6 +2025,12 @@ static int cayman_startup(struct radeon_device *rdev)
}
 
/* Enable IRQ */
+   if (!rdev->irq.installed) {
+   r = radeon_irq_kms_init(rdev);
+   if (r)
+   return r;
+   }
+
r = r600_irq_init(rdev);
if (r) {
DRM_ERROR("radeon: IH init failed (%d).\n", r);
@@ -2190,10 +2196,6 @@ int cayman_init(struct radeon_device *rdev)
if (r)
return r;
 
-   r = radeon_irq_kms_init(rdev);
-   if (r)
-   return r;
-
ring->ring_obj = NULL;
r600_ring_init(rdev, ring, 1024 * 1024);
 
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 4973bff..d0314ec 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3869,6 +3869,12 @@ static int r100_startup(struct radeon_device *rdev)
}
 
/* Enable IRQ */
+   if (!rdev->irq.installed) {
+   r = radeon_irq_kms_init(rdev);
+   if (r)
+   return r;
+   }
+
r100_irq_set(rdev);
rdev->config.r100.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
/* 1M ring buffer */
@@ -4024,9 +4030,6 @@ int r100_init(struct radeon_device *rdev)
r = radeon_fence_driver_init(rdev);
if (r)
  

Re: [REGRESSION] system does not resume from ram due to commit "drm/nv50/fifo: prevent races between clients updating playlists"

2013-06-02 Thread Ben Skeggs
On Fri, May 31, 2013 at 11:05 PM, Konrad Rzeszutek Wilk <
konrad.w...@oracle.com> wrote:

> On Tue, May 28, 2013 at 08:55:29PM +0200, Sven Joachim wrote:
> > On 2013-05-26 23:09 +0200, Maarten Maathuis wrote:
> >
> > > My NV96 does not resume from suspend to ram (the screen stays black,
> magic
> > > sysrq keys do work) with the current linus git kernel, i bisected it
> to the
> > > following commit.
> > >
> > > drm/nv50/fifo: prevent races between clients updating playlists
> > > b5096566f6e1ee2b88324772f020ae9bc0cfa9a0
> > >
> > > It's not obvious to me how this causes problems, but reverting this
> commit
> > > does solve my problem.
> >
> > Same here on my NV86.
>
> And as well on this:
>
> 01:00.0 VGA compatible controller: NVIDIA Corporation G84 [GeForce 8600
> GT] (rev a1)
>
>
> Ben, any ideas?
>

I've pushed a fix[1] to my git tree.  Will pull it across to the "normal"
tree once I've hunted down another regression.

Thanks,
Ben.

[1]
http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=d37687a562f0b55cc848cfcdbf8d473a6c692c2d

>
> > Cheers,
> >Sven
> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65254] New: opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-dae...@freedesktop.org
le_cache filter headers ident imagemap include info
log_config mime mime_magic negotiation proxy proxy_http rewrite setenvif so
status unique_id userdir usertrack vhost_alias cgid" APACHE2_MPMS="worker"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon
braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory
rrdtool swap syslog" DRACUT_MODULES="btrfs" ELIBC="glibc"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock
itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3
sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc"
INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en bg"
LIRC_DEVICES="userspace" NGINX_MODULES_HTTP="access auth_basic autoindex
browser charset empty_gif fastcgi geo gzip limit_req limit_zone map referer
rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi dav gzip_static
proxy mp4" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3"
PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2"
RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface
geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac
delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK,
PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/ef50a2e8/attachment.html>


[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=63935

--- Comment #52 from zsolt barat  ---
(In reply to comment #48)
> (In reply to comment #47)
> >
> > I can confirm that the patch works on boot, also on a mac 8,2 with drm-next
> > and patches, but fails on suspend resume. It reappears on resume.
> > Please reopen the bug.
> 
> I have a MacbookPro8,2 and this doesn't happen to me.  My pci ID for the
> radeon is 1002:6741 and subsystem 106b:00e2.  Is it the same message in the
> dmesg log?

Hi, I have a slightly different PCI-ID for my ATI graphics card. According to
lspci -nn it's: 1002:6760
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
Seymour [Radeon HD 6400M/7400M Series] [1002:6760]
According to dmesg:
[drm] initializing kernel modesetting (CAICOS 0x1002:0x6760 0x106B:0x00E1).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/a9f50eaa/attachment.html>


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65254

Alex Deucher  changed:

   What|Removed |Added

  Component|Drivers/DRI/Radeon  |Drivers/Gallium/r600

--- Comment #1 from Alex Deucher  ---
Please attach your xorg log and dmesg output.  Also, what version of mesa are
you using?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/093a47bf/attachment.html>


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #2 from Vladi  ---
Created attachment 80161
  --> https://bugs.freedesktop.org/attachment.cgi?id=80161&action=edit
dmesg

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/45b91156/attachment.html>


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #3 from Vladi  ---
Created attachment 80162
  --> https://bugs.freedesktop.org/attachment.cgi?id=80162&action=edit
xorg.log

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/51c54564/attachment.html>


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #4 from Vladi  ---
mesa is git from yesturday, gentoo mesa- ebuild. Also when I add
radeon.audio=1 to kernel parameters I get an purple line on the left side of
the screen from top to bottom. I have tried with xorg 1.13 + mesa
9.2_pre20130528 and git same results..

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/a45b8b81/attachment.html>


[Bug 65254] opengl flicker in xbmc / glxgears

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65254

--- Comment #5 from Vladi  ---
forgot to mention my firmware files: linux-firwmare ebuild 20130421

59375dccb37f974c045575cd9428009a  radeon/ARUBA_me.bin
b3072fac01a6eab4711c18148c8bc305  radeon/ARUBA_pfp.bin
246d1c75a5946829f6864dbd5f71d850  radeon/ARUBA_rlc.bin
201877fa59f2fe4d896d5e6b6c1d2e1c  radeon/TAHITI_uvd.bin

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/7ae4d753/attachment-0001.html>


[Bug 65270] New: CAICOS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65270

  Priority: medium
Bug ID: 65270
  Assignee: dri-devel at lists.freedesktop.org
   Summary: CAICOS [drm:r600_uvd_init] *ERROR* UVD not responding,
trying to reset the VCPU!!!
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: gerben at welter.nu
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: XOrg CVS
 Component: DRM/Radeon
   Product: DRI

Created attachment 80163
  --> https://bugs.freedesktop.org/attachment.cgi?id=80163&action=edit
dmesg from 3.8.10-rc4

This is on a HP ProBook 6560b running Ubuntu 13.04 with the Xorg edgers PPA and
the Ubuntu Mainline Kernel PPA, currenty at 3.8.10-rc4. Here's an excerpt from
the lines stating the problem. The full dmesg is attached.

[1.491745] [drm] Initialized drm 1.1.0 20060810
[1.520286] [drm] radeon kernel modesetting enabled.
[1.521516] [drm] initializing kernel modesetting (CAICOS 0x1002:0x6760
0x103C:0x161B).
[1.521544] [drm] register mmio base: 0xD430
[1.521546] [drm] register mmio size: 131072
[1.523743] [drm] Detected VRAM RAM=512M, BAR=256M
[1.523747] [drm] RAM width 64bits DDR
[1.525789] [drm] radeon: 512M of VRAM memory ready
[1.525791] [drm] radeon: 512M of GTT memory ready.
[1.525805] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[1.525806] [drm] Driver supports precise vblank timestamp query.
[1.525879] [drm] radeon: irq initialized.
[1.527852] [drm] GART: num cpu pages 131072, num gpu pages 131072
[1.528327] [drm] enabling PCIE gen 2 link speeds, disable with
radeon.pcie_gen2=0
[1.528404] [drm] Loading CAICOS Microcode
[1.547532] [drm] PCIE GART of 512M enabled (table at 0x00273000).
[1.564737] [drm] ring test on 0 succeeded in 2 usecs
[1.564802] [drm] ring test on 3 succeeded in 1 usecs
[2.733072] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[3.746322] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[4.759572] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[5.772824] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[6.786074] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[7.799327] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[8.812576] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[9.825827] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   10.839074] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   11.852325] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   11.872197] [drm:r600_uvd_init] *ERROR* UVD not responding, giving up!!!
[   11.872205] [drm:evergreen_startup] *ERROR* radeon: error initializing UVD
(-1).
[   11.872491] [drm] ib test on ring 0 succeeded in 0 usecs
[   11.872539] [drm] ib test on ring 3 succeeded in 0 usecs

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/7705674e/attachment.html>


[Bug 65274] New: TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! (non-EFI laptop)

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65274

  Priority: medium
Bug ID: 65274
  Assignee: dri-devel at lists.freedesktop.org
   Summary: TURKS [drm:r600_uvd_init] *ERROR* UVD not responding,
trying to reset the VCPU!!!  (non-EFI laptop)
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: russianneuromancer at ya.ru
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: unspecified
 Component: DRM/Radeon
   Product: DRI

Created attachment 80170
  --> https://bugs.freedesktop.org/attachment.cgi?id=80170&action=edit
dmesg

Looks like bug 63935 (that about Macs booting in EFI mode) but this one about
non-EFI laptop (Acer Aspire 7560G with BIOS v2.04). Ubuntu 13.04 x86_64, Linux
3.10.rc4. SUMO2 UVD firmware updated from April 2 (I can't find TURKS UVD
firmware - it's use same firmware as SUMO2?)

$ lspci -nn | grep VGA
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
BeaverCreek [Radeon HD 6620G] [1002:9641]
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
Whistler [Radeon HD 6600M/6700M/7600M Series] [1002:6741]

As I undersand UVD initialized successfully on first GPU (look into attached
dmesg) but can't initialize on second - boot stuck for ten seconds.

[3.063106] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741
0x1025:0x059E).
[3.063131] [drm] register mmio base: 0xF020
[3.063132] [drm] register mmio size: 131072
[   14.267992] [drm] Detected VRAM RAM=1024M, BAR=256M
[   14.267997] [drm] RAM width 128bits DDR
[   14.268029] [drm] radeon: 1024M of VRAM memory ready
[   14.268030] [drm] radeon: 512M of GTT memory ready.
[   14.268058] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[   14.268060] [drm] Driver supports precise vblank timestamp query.
[   14.268209] [drm] radeon: irq initialized.
[   14.270085] [drm] GART: num cpu pages 131072, num gpu pages 131072
[   14.271070] [drm] Loading TURKS Microcode
[   14.273276] [drm] PCIE GART of 512M enabled (table at 0x00273000).
[   14.290147] [drm] ring test on 0 succeeded in 2 usecs
[   14.290215] [drm] ring test on 3 succeeded in 1 usecs
[   15.457635] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   16.470051] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   17.482486] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   18.494870] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   19.507253] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   20.519681] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   21.532097] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   22.544538] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   23.556927] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   24.569309] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset
the VCPU!!!
[   24.589200] [drm:r600_uvd_init] *ERROR* UVD not responding, giving up!!!
[   24.589240] [drm:evergreen_startup] *ERROR* radeon: error initializing UVD
(-1).
[   24.589849] [drm] ib test on ring 0 succeeded in 0 usecs
[   24.589926] [drm] ib test on ring 3 succeeded in 0 usecs

UVD registers dump is also attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/800dcde0/attachment.html>


[Bug 65274] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! (non-EFI laptop)

2013-06-02 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65274

--- Comment #1 from russianneuromancer at ya.ru ---
Created attachment 80171
  --> https://bugs.freedesktop.org/attachment.cgi?id=80171&action=edit
UVD regs

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130602/3b065deb/attachment.html>


[PATCH 1/1] radeon: Fix system hang issue when using KMS with older cards

2013-06-02 Thread Adis Hamzić
The current radeon driver initialization routines, when using KMS, are written
so that the IRQ installation routine is called before initializing the WB buffer
and the CP rings. With some ASICs, though, the IRQ routine tries to access the
GFX_INDEX ring causing a call to RREG32 with the value of -1 in
radeon_fence_read. This, in turn causes the system to completely hang with some
cards, requiring a hard reset.

A call stack that can cause such a hang looks like this (using rv515 ASIC for 
the
example here):
 * rv515_init (rv515.c)
 * radeon_irq_kms_init (radeon_irq_kms.c)
 * drm_irq_install (drm_irq.c)
 * radeon_driver_irq_preinstall_kms (radeon_irq_kms.c)
 * rs600_irq_process (rs600.c)
 * radeon_fence_process - due to SW interrupt (radeon_fence.c)
 * radeon_fence_read (radeon_fence.c)
 * hang due to RREG32(-1)

The patch moves the IRQ installation to the card startup routine, after the ring
has been initialized, but before the IRQ has been set. This fixes the issue, but
requires a check to see if the IRQ is already installed, as is the case in the
system resume codepath.
I have tested the patch on three machines using the rv515, the rv770 and the
evergreen ASIC. They worked without issues.

This seems to be a known issue and has been reported on several bug tracking
sites by various distributions (see links below). Most of reports recommend
booting the system with KMS disabled and then enabling KMS by reloading the
radeon module. For some reason, this was indeed a usable workaround, however,
UMS is now deprecated and disabled by default.

Bug reports:
https://bugzilla.redhat.com/show_bug.cgi?id=845745
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/561789
https://bbs.archlinux.org/viewtopic.php?id=156964

Signed-off-by: Adis Hamzi? 
---
 drivers/gpu/drm/radeon/evergreen.c | 10 ++
 drivers/gpu/drm/radeon/ni.c| 10 ++
 drivers/gpu/drm/radeon/r100.c  |  9 ++---
 drivers/gpu/drm/radeon/r300.c  |  9 ++---
 drivers/gpu/drm/radeon/r420.c  | 10 ++
 drivers/gpu/drm/radeon/r520.c  |  9 ++---
 drivers/gpu/drm/radeon/r600.c  | 10 ++
 drivers/gpu/drm/radeon/rs400.c |  9 ++---
 drivers/gpu/drm/radeon/rs600.c |  9 ++---
 drivers/gpu/drm/radeon/rs690.c |  9 ++---
 drivers/gpu/drm/radeon/rv515.c |  9 ++---
 drivers/gpu/drm/radeon/rv770.c | 10 ++
 drivers/gpu/drm/radeon/si.c| 10 ++
 13 files changed, 78 insertions(+), 45 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c 
b/drivers/gpu/drm/radeon/evergreen.c
index 8546e3b..0f89ce3 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -4754,6 +4754,12 @@ static int evergreen_startup(struct radeon_device *rdev)
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_size = 0;

/* Enable IRQ */
+   if (!rdev->irq.installed) {
+   r = radeon_irq_kms_init(rdev);
+   if (r)
+   return r;
+   }
+
r = r600_irq_init(rdev);
if (r) {
DRM_ERROR("radeon: IH init failed (%d).\n", r);
@@ -4923,10 +4929,6 @@ int evergreen_init(struct radeon_device *rdev)
if (r)
return r;

-   r = radeon_irq_kms_init(rdev);
-   if (r)
-   return r;
-
rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL;
r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 
1024);

diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 7969c0c..8458330 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -2025,6 +2025,12 @@ static int cayman_startup(struct radeon_device *rdev)
}

/* Enable IRQ */
+   if (!rdev->irq.installed) {
+   r = radeon_irq_kms_init(rdev);
+   if (r)
+   return r;
+   }
+
r = r600_irq_init(rdev);
if (r) {
DRM_ERROR("radeon: IH init failed (%d).\n", r);
@@ -2190,10 +2196,6 @@ int cayman_init(struct radeon_device *rdev)
if (r)
return r;

-   r = radeon_irq_kms_init(rdev);
-   if (r)
-   return r;
-
ring->ring_obj = NULL;
r600_ring_init(rdev, ring, 1024 * 1024);

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 4973bff..d0314ec 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -3869,6 +3869,12 @@ static int r100_startup(struct radeon_device *rdev)
}

/* Enable IRQ */
+   if (!rdev->irq.installed) {
+   r = radeon_irq_kms_init(rdev);
+   if (r)
+   return r;
+   }
+
r100_irq_set(rdev);
rdev->config.r100.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
/* 1M ring buffer */
@@ -4024,9 +4030,6 @@ int r100_init(struct radeon_device *rdev)
r = radeon_fence_driver_init(rdev);
if (r)