[Bug 23898] New: Flash on latest KMS radeon causes a hang and lockdep trace
http://bugs.freedesktop.org/show_bug.cgi?id=23898 Summary: Flash on latest KMS radeon causes a hang and lockdep trace Product: DRI Version: DRI CVS Platform: x86-64 (AMD64) URL: http://wklej.org/id/149344/ OS/Version: Linux (All) Status: NEW Severity: major Priority: medium Component: DRM/Radeon AssignedTo: dri-devel@lists.sourceforge.net ReportedBy: astralst...@gen2.org Created an attachment (id=29478) -- (http://bugs.freedesktop.org/attachment.cgi?id=29478) Xorg log The syslog dump is in the URL. Apparently it's some cs vs ib lock deadlock. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH] drm/i915: intel_display.c handle latency variable efficiently
By handling latency variable efficiently we also get rid of this warning : CC [M] drivers/gpu/drm/i915/intel_display.o drivers/gpu/drm/i915/intel_display.c: In function ‘igd_enable_cxsr’: drivers/gpu/drm/i915/intel_display.c:1918: warning: ‘latency’ may be used uninitialized in this function Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com --- drivers/gpu/drm/i915/intel_display.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 748ed50..85a13f4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1923,14 +1923,13 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb, for (i = 0; i ARRAY_SIZE(cxsr_latency_table); i++) { latency = cxsr_latency_table[i]; if (is_desktop == latency-is_desktop - fsb == latency-fsb_freq mem == latency-mem_freq) - break; - } - if (i = ARRAY_SIZE(cxsr_latency_table)) { - DRM_DEBUG(Unknown FSB/MEM found, disable CxSR\n); - return NULL; + fsb == latency-fsb_freq mem == latency-mem_freq) + return latency; } - return latency; + + DRM_DEBUG(Unknown FSB/MEM found, disable CxSR\n); + + return NULL; } static void igd_disable_cxsr(struct drm_device *dev) -- 1.6.4.2 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] drm/i915: intel_display.c handle latency variable efficiently
Am Samstag, den 12.09.2009, 23:15 +0530 schrieb Jaswinder Singh Rajput: By handling latency variable efficiently we also get rid of this warning : CC [M] drivers/gpu/drm/i915/intel_display.o drivers/gpu/drm/i915/intel_display.c: In function ‘igd_enable_cxsr’: drivers/gpu/drm/i915/intel_display.c:1918: warning: ‘latency’ may be used uninitialized in this function Signed-off-by: Jaswinder Singh Rajput jaswinderraj...@gmail.com Reviewed-by: Paul Menzel paulepan...@users.sourceforge.net Looks good to me. (No idea, if my line is necessary.) --- drivers/gpu/drm/i915/intel_display.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 748ed50..85a13f4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1923,14 +1923,13 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb, for (i = 0; i ARRAY_SIZE(cxsr_latency_table); i++) { latency = cxsr_latency_table[i]; if (is_desktop == latency-is_desktop - fsb == latency-fsb_freq mem == latency-mem_freq) - break; - } - if (i = ARRAY_SIZE(cxsr_latency_table)) { - DRM_DEBUG(Unknown FSB/MEM found, disable CxSR\n); - return NULL; + fsb == latency-fsb_freq mem == latency-mem_freq) + return latency; Different indentation than the original. Diff would be one line smaller. […] Bests, Paul signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july-- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 22743] nexuiz game: missing weapons and enemies models
http://bugs.freedesktop.org/show_bug.cgi?id=22743 Sven Arvidsson s...@whiz.se changed: What|Removed |Added CC||s...@whiz.se --- Comment #9 from Sven Arvidsson s...@whiz.se 2009-09-13 05:44:20 PST --- *** Bug 23471 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23883] no mouse-pointer on secound screen with kms enabled
http://bugs.freedesktop.org/show_bug.cgi?id=23883 Michel Dänzer mic...@daenzer.net changed: What|Removed |Added AssignedTo|dri-|xorg-driver-...@lists.x.org |de...@lists.sourceforge.net | Component|Drivers/DRI/r300|Driver/Radeon Product|Mesa|xorg QAContact||xorg-t...@lists.x.org --- Comment #2 from Michel Dänzer mic...@daenzer.net 2009-09-13 08:20:57 PST --- This is an issue either in the X radeon driver or in the kernel KMS support, but certainly not in Mesa. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] drm/radeon/kms: add initial connector properties
On Wed, 2009-09-09 at 17:40 +1000, Dave Airlie wrote: From: Dave Airlie airl...@redhat.com This adds: coherent mode: TMDS coherent mode for atom cards. scaling mode: LVDS scaler mode load detect: DAC load detection, DVI-I, VGA, TV tmds pll: legacy TMDS pll selection tv standard: TV standard selection. TODO: other TV ones? dvi subconnector selection using std prop I haven't tried the patch nor looked at it in detail, but I stumbled over two places where ATOM vs. COM BIOS calls seem reversed: + if (property == rdev-mode_info.tmds_pll_property) { + struct radeon_encoder_int_tmds *tmds = NULL; + bool ret = false; + /* need to find digital encoder on connector */ + encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); + if (!encoder) + return 0; + + radeon_encoder = to_radeon_encoder(encoder); + + tmds = radeon_encoder-enc_priv; + if (!tmds) + return 0; + + if (val == 0) { + if (rdev-is_atom_bios) + ret = radeon_legacy_get_tmds_info_from_combios(radeon_encoder, tmds); + else + ret = radeon_atombios_get_tmds_info(radeon_encoder, tmds); + } + if (val == 1 || ret == false) { + radeon_legacy_get_tmds_info_from_table(radeon_encoder, tmds); + } + radeon_property_change_mode(radeon_encoder-base); + } + return 0; } [...] +static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon_encoder *encoder) +{ + struct drm_device *dev = encoder-base.dev; + struct radeon_device *rdev = dev-dev_private; + struct radeon_encoder_int_tmds *tmds = NULL; + bool ret; + + tmds = kzalloc(sizeof(struct radeon_encoder_int_tmds), GFP_KERNEL); + + if (!tmds) + return NULL; + + if (rdev-is_atom_bios) + ret = radeon_legacy_get_tmds_info_from_combios(encoder, tmds); + else + ret = radeon_atombios_get_tmds_info(encoder, tmds); + + if (ret == false) + radeon_legacy_get_tmds_info_from_table(encoder, tmds); + + return tmds; +} -- Earthling Michel Dänzer |http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] New: radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 Summary: radeon KMS sends no input signal to LCD (regression in 2.6.31) Product: DRI Version: XOrg CVS Platform: Other OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/Radeon AssignedTo: dri-devel@lists.sourceforge.net ReportedBy: ad...@voicenet.com Created an attachment (id=29484) -- (http://bugs.freedesktop.org/attachment.cgi?id=29484) 'dmesg | grep drm' from Slackware 13 I have Fedora 11 on one drive, using 2.6.30.5-43, and running KMS + Xorg wonderfully on my x850. Both monitors are detected and initialized at their native resolution. This is an LCD at 1280x1024 and a CRT at 1600x1200. As expected, the console on the CRT only uses 1280x1024 of the screen, even though the monitor is being run at 1600x1200. I have Slackware 13 on another drive, and compiled the 2.6.31 kernel this morning, enabling radeon KMS by default. I updated drm (with the experimental radeon API), Mesa, and xf86-video-ati. The computer boots up, and as soon as the framebuffer kicks in, the LCD displays no input signal and turns off after a few seconds. The CRT is set to 1600x1200, and only uses 1280x1024 of the screen, as if the console driver knows that the LCD is attached and is running at 1280x1024. I can start X, but only the CRT is usable. The LCD remains asleep. Even if I use xrandr to adjust the resolution on the LCD, it doesn't flicker and doesn't display anything. I am initially attaching 6 files. 'dmesg | grep drm' from both F11 and slackware 13, Xorg.0.log from both distributions, and 'xrandr --verbose' from both distributions. The only difference between the two distributions is that F11 is 32 bit and Slackware 13 is 64 bit. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #1 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:04:09 PST --- Created an attachment (id=29485) -- (http://bugs.freedesktop.org/attachment.cgi?id=29485) 'dmesg | grep drm' from F11 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #2 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:04:39 PST --- Created an attachment (id=29486) -- (http://bugs.freedesktop.org/attachment.cgi?id=29486) Xorg.0.log from Slack 13 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #3 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:05:03 PST --- Created an attachment (id=29487) -- (http://bugs.freedesktop.org/attachment.cgi?id=29487) Xorg.0.log from from F11 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #4 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:05:24 PST --- Created an attachment (id=29488) -- (http://bugs.freedesktop.org/attachment.cgi?id=29488) 'xrandr --verbose' from slack 13 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #5 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:05:50 PST --- Created an attachment (id=29489) -- (http://bugs.freedesktop.org/attachment.cgi?id=29489) 'xrandr --verbose' from F11 -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #6 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:12:37 PST --- I ran one further test. I unhooked the CRT, rebooted, and the LCD initialized just fine on 2.6.31. So the problem only happens when both monitors are hooked up. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 23901] radeon KMS sends no input signal to LCD (regression in 2.6.31)
http://bugs.freedesktop.org/show_bug.cgi?id=23901 --- Comment #7 from Adam K Kirchhoff ad...@voicenet.com 2009-09-13 09:13:28 PST --- Created an attachment (id=29490) -- (http://bugs.freedesktop.org/attachment.cgi?id=29490) 'dmesg | grep drm' from 2.6.31, with just the working LCD attached. -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 21945] mach64 DRI driver hangs machine on X server startup
http://bugs.freedesktop.org/show_bug.cgi?id=21945 had...@gmx.de changed: What|Removed |Added CC||had...@gmx.de --- Comment #1 from had...@gmx.de 2009-09-13 14:33:08 PST --- I have exactly the same problem, it seems to be introduced by this commit: http://cgit.freedesktop.org/mesa/drm/commit/?id=957b10695b619d6ed2f1098b00502395d9a3c149 Move vblank_init to driver load time. This is on Slackware 13.0 running a 2.6.29.6 kernel and xserver 1.6.3 01:00.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M AGP 2x (rev 64) (prog-if 00 [VGA controller]) Subsystem: IBM ThinkPad A20m/A21m Flags: bus master, stepping, medium devsel, latency 66, IRQ 11 Memory at f500 (32-bit, non-prefetchable) [size=16M] I/O ports at 2000 [size=256] Memory at f420 (32-bit, non-prefetchable) [size=4K] [virtual] Expansion ROM at 4000 [disabled] [size=128K] Capabilities: [50] AGP version 1.0 Capabilities: [5c] Power Management version 1 Kernel modules: atyfb -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH set] drm/radeon/kms: implement PM-required code
W dniu 11 września 2009 20:41 użytkownik Rafał Miłecki zaj...@gmail.com napisał: This patchset implements features needed to implement real power management. Last one (0005) even shows that it's possible to implement downclocking on DPMS_OFF with previous patches. It's just prove of working infrastructure, nothing acceptable to commit. However I hope it makes you decide commiting 0001-0004. Please review/test/commit. If you decide to apply last patch, just use: xset dpms force off I was thinking over weekend about possible bad decisions made here that will hit us later. It's quite possible we won't use only limited amount of power modes but quite big amount of dynamically generated modes between minimum and maximum (with some step for clocks and voltage). Anyway even then we will need to keep minimum and maximum (and default?). And keeping that in 1 struct properties will be pain: radeon_pm-minimum_engine_clock radeon_pm-minimum_memory_clock radeon_pm-minimum_voltage *3 So I believe introducing radeom_pm_state is still a good idea. Eventually we will modify state setting function, but probably nothing more. -- Rafał -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[PATCH] drm/radeon/kms: IB locking dumps out a lockdep ordering issue
From: Dave Airlie airl...@linux.ie We sometimes lock IB then the ring and sometimes the ring then the IB. This is mostly due to the IB locking not being well defined about what data in the structs it actually locks. Define what I believe is the correct behaviour and gets rid of the lock dep ordering warning. Signed-off-by: Dave Airlie airl...@redhat.com --- drivers/gpu/drm/radeon/r600_blit_kms.c |2 +- drivers/gpu/drm/radeon/radeon.h|4 drivers/gpu/drm/radeon/radeon_ring.c | 20 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600_blit_kms.c b/drivers/gpu/drm/radeon/r600_blit_kms.c index 1ebfd5a..4f0d181 100644 --- a/drivers/gpu/drm/radeon/r600_blit_kms.c +++ b/drivers/gpu/drm/radeon/r600_blit_kms.c @@ -538,8 +538,8 @@ int r600_vb_ib_get(struct radeon_device *rdev) void r600_vb_ib_put(struct radeon_device *rdev) { - mutex_lock(rdev-ib_pool.mutex); radeon_fence_emit(rdev, rdev-r600_blit.vb_ib-fence); + mutex_lock(rdev-ib_pool.mutex); list_add_tail(rdev-r600_blit.vb_ib-list, rdev-ib_pool.scheduled_ibs); mutex_unlock(rdev-ib_pool.mutex); radeon_ib_free(rdev, rdev-r600_blit.vb_ib); diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 23ede0e..570afe4 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -403,6 +403,10 @@ struct radeon_ib { uint32_tlength_dw; }; +/* + * locking - + * mutex protects scheduled_ibs, ready, alloc_bm + */ struct radeon_ib_pool { struct mutexmutex; struct radeon_object*robj; diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index aa9837a..297fc45 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -56,10 +56,12 @@ int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib) set_bit(i, rdev-ib_pool.alloc_bm); rdev-ib_pool.ibs[i].length_dw = 0; *ib = rdev-ib_pool.ibs[i]; + mutex_unlock(rdev-ib_pool.mutex); goto out; } if (list_empty(rdev-ib_pool.scheduled_ibs)) { /* we go do nothings here */ + mutex_unlock(rdev-ib_pool.mutex); DRM_ERROR(all IB allocated none scheduled.\n); r = -EINVAL; goto out; @@ -69,10 +71,13 @@ int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib) struct radeon_ib, list); if (nib-fence == NULL) { /* we go do nothings here */ + mutex_unlock(rdev-ib_pool.mutex); DRM_ERROR(IB %lu scheduled without a fence.\n, nib-idx); r = -EINVAL; goto out; } + mutex_unlock(rdev-ib_pool.mutex); + r = radeon_fence_wait(nib-fence, false); if (r) { DRM_ERROR(radeon: IB(%lu:0x%016lX:%u)\n, nib-idx, @@ -81,12 +86,16 @@ int radeon_ib_get(struct radeon_device *rdev, struct radeon_ib **ib) goto out; } radeon_fence_unref(nib-fence); + nib-length_dw = 0; + + /* scheduled list is accessed here */ + mutex_lock(rdev-ib_pool.mutex); list_del(nib-list); - INIT_LIST_HEAD(nib-list); + mutex_unlock(rdev-ib_pool.mutex); + *ib = nib; out: - mutex_unlock(rdev-ib_pool.mutex); if (r) { radeon_fence_unref(fence); } else { @@ -122,25 +131,24 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib) { int r = 0; - mutex_lock(rdev-ib_pool.mutex); if (!ib-length_dw || !rdev-cp.ready) { /* TODO: Nothings in the ib we should report. */ - mutex_unlock(rdev-ib_pool.mutex); DRM_ERROR(radeon: couldn't schedule IB(%lu).\n, ib-idx); return -EINVAL; } + /* 64 dwords should be enough for fence too */ r = radeon_ring_lock(rdev, 64); if (r) { DRM_ERROR(radeon: scheduling IB failled (%d).\n, r); - mutex_unlock(rdev-ib_pool.mutex); return r; } radeon_ring_ib_execute(rdev, ib); radeon_fence_emit(rdev, ib-fence); - radeon_ring_unlock_commit(rdev); + mutex_lock(rdev-ib_pool.mutex); list_add_tail(ib-list, rdev-ib_pool.scheduled_ibs); mutex_unlock(rdev-ib_pool.mutex); + radeon_ring_unlock_commit(rdev); return 0; } -- 1.6.4.2 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july