Re: drm:radeon_cp_cmdbuf] *ERROR* radeon_cp_cmdbuf called without lock held problem
[ Please follow up to one list only, I suggest dri-devel ] On Thu, 2007-02-01 at 20:08 +0200, Panagiotis Papadakos wrote: My application sometimes crashes with the following message (most of the times when I run it with valgrind): drmRadeonCmdBuffer: -22 (exiting) And in dmesg I get the following: [drm:radeon_cp_cmdbuf] *ERROR* radeon_cp_cmdbuf called without lock held, held -2147483648 owner d0297cc0 c7f35240 Hmm, I think this could only happen with several file descriptors using the same DRM context ID. Is your application multithreaded? This is using r300 driver and aiglx. FWIW, does disabling AIGLX make a difference? -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 7767] No hardware rendering for SuperSavage/IXC 64 and Xorg 7.2 RC3
http://bugzilla.kernel.org/show_bug.cgi?id=7767 --- Additional Comments From [EMAIL PROTECTED] 2007-02-02 08:29 --- Created an attachment (id=10258) -- (http://bugzilla.kernel.org/attachment.cgi?id=10258action=view) Xorg.0.log for FC kernel 2.6.19-1.2917.fc7 [2.6.20rc7] The kernel is the Fedora flavour of 2.6.20rc7: * Wed Jan 31 2007 Dave Jones [EMAIL PROTECTED] - 2.6.20rc7 The X log file contains an AIGLX related error message: (EE) AIGLX error: drmMap of framebuffer failed (Invalid argument)(EE) AIGLX: reverting to software rendering --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
[Bug 7767] No hardware rendering for SuperSavage/IXC 64 and Xorg 7.2 RC3
http://bugzilla.kernel.org/show_bug.cgi?id=7767 --- Additional Comments From [EMAIL PROTECTED] 2007-02-02 08:39 --- Created an attachment (id=10259) -- (http://bugzilla.kernel.org/attachment.cgi?id=10259action=view) Xorg.0.log for FC kernel 2.6.19-1.2917.fc7 [2.6.20rc7] using DRM modules from the git tree Xorg.0.log for FC kernel 2.6.19-1.2917.fc7 [2.6.20rc7] The kernel is the Fedora flavour of 2.6.20rc7: * Wed Jan 31 2007 Dave Jones [EMAIL PROTECTED] - 2.6.20rc7 This time, drm.ko and savage.ko have been built from the current git tree and are loaded at the end of rc.sysinit. Hardware rendering is up and running albeit slow. When I run glxgears, the fps are only half the value obtained when running identical Xorg 7.2 RC3 on an FC5 system. --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: Invalid reads from intersect_rect in radeon_state.c of r300 driver. [PATCH included]
Well this patch is not correct since it leads to memory leaks, probably due to succeeding calls to dri_interface-getDrawableInfo. So I created the attached patch, but again valgrind warns for invalid reads. Anyone understands why? Thanks P.S. Sorry but I am new to the code! On Thursday 01 February 2007 19:19, Panagiotis Papadakos wrote: Checking with valgrind I got some invalid reads. The message was like the following: ==6988== Invalid read of size 4 ==6988==at 0x4B3C7FD: intersect_rect (radeon_state.c:61) ==6988==by 0x4B3C9DA: radeonRecalcScissorRects (radeon_state.c:108) ==6988==by 0x4B3CAEC: radeonUpdateScissor (radeon_state.c:131) ==6988==by 0x4B3CD04: radeonEnable (radeon_state.c:205) ==6988==by 0x4B4B1C1: r300Enable (r300_state.c:542) ==6988==by 0x4D13827: _mesa_set_enable (enable.c:956) ==6988==by 0x4D138A6: _mesa_Enable (enable.c:971) ==6988==by 0x4769879: glEnable (glapitemp.h:1160) ==6988==by 0x4613A5F: osgUtil::RenderStage::drawImplementation(osg::RenderInfo, osgUtil::RenderLeaf*) (in /usr/lib/libosgUtil.so) ==6988==by 0x4607658: osgUtil::RenderBin::draw(osg::RenderInfo, osgUtil::RenderLeaf*) (in /usr/lib/libosgUtil.so) ==6988==by 0x46133BC: osgUtil::RenderStage::drawInner(osg::RenderInfo, osgUtil::RenderLeaf*, bool) (in /usr/lib/libosgUtil.so) ==6988==by 0x4612E6C: osgUtil::RenderStage::draw(osg::RenderInfo, osgUtil::RenderLeaf*) (in /usr/lib/libosgUtil.so) ==6988== Address 0x4AF585C is 4 bytes inside a block of size 8 free'd ==6988==at 0x402303F: free (vg_replace_malloc.c:233) ==6988==by 0x4BAF503: _mesa_free (imports.c:93) ==6988==by 0x4B2FF84: __driUtilUpdateDrawableInfo (dri_util.c:430) ==6988==by 0x4B2FD46: DoBindContext (dri_util.c:339) ==6988==by 0x4B2FF00: driBindContext (dri_util.c:383) ==6988==by 0x4735921: BindContextWrapper (glxext.c:1620) ==6988==by 0x4735A53: MakeContextCurrent (glxext.c:1674) ==6988==by 0x4735D7C: glXMakeCurrent (glxext.c:1796) ==6988==by 0x47D8BB3: Producer::RenderSurface::makeCurrent(bool) (in /usr/lib/libProducer.so) ==6988==by 0x47DEEC6: Producer::Camera::_frame(bool) (in /usr/lib/libProducer.so) ==6988==by 0x47DF75F: Producer::Camera::frame(bool) (in /usr/lib/libProducer.so) ==6988==by 0x47E2589: Producer::CameraGroup::_singleThreadedFrame() (in /usr/lib/libProducer.so) So I searched a bit, and I created the following patch, which touches src/mesa/drivers/dri/common/dri_util.c, and more specifically __driUtilUpdateDrawableInfo, calling _mesa_free for pdp-pClipRects and pdp-pBackClipRects only inside if. Does this look sane? Valgrind does not warn anymore. -- Papadakos Panagiotis --- src/mesa/drivers/dri/common/dri_util.c 2007-02-02 19:30:24.0 +0200 +++ src/mesa/drivers/dri/common/dri_util_new.c 2007-02-02 19:34:39.0 +0200 @@ -426,13 +426,11 @@ return; } -if (pdp-pClipRects) { - _mesa_free(pdp-pClipRects); -} - -if (pdp-pBackClipRects) { - _mesa_free(pdp-pBackClipRects); -} +/* Temporary hold pointers, so that we don't leak + * when (*dri_interface-getDrawableInfo) returns True + */ +drm_clip_rect_t * tempPClipRects = pdp-pClipRects; +drm_clip_rect_t * tempPBackClipRects = pdp-pBackClipRects; DRM_SPINUNLOCK(psp-pSAREA-drawable_lock, psp-drawLockID); @@ -448,14 +446,29 @@ /* Error -- eg the window may have been destroyed. Keep going * with no cliprects. */ -pdp-pStamp = pdp-lastStamp; /* prevent endless loop */ + + if (tempPClipRects) { + _mesa_free(tempPClipRects); + } + + if (tempPBackClipRects) { + _mesa_free(tempPBackClipRects); + } + + pdp-pStamp = pdp-lastStamp; /* prevent endless loop */ pdp-numClipRects = 0; pdp-pClipRects = NULL; pdp-numBackClipRects = 0; pdp-pBackClipRects = NULL; } else - pdp-pStamp = (psp-pSAREA-drawableTable[pdp-index].stamp); +{ + if(tempPClipRects) + _mesa_free(tempPClipRects); + if(tempPBackClipRects) + _mesa_free(tempPBackClipRects); +pdp-pStamp = (psp-pSAREA-drawableTable[pdp-index].stamp); +} DRM_SPINLOCK(psp-pSAREA-drawable_lock, psp-drawLockID); - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642-- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: drm:radeon_cp_cmdbuf] *ERROR* radeon_cp_cmdbuf called without lock held problem
On Friday 02 February 2007 12:01, Michel Dänzer wrote: Hmm, I think this could only happen with several file descriptors using the same DRM context ID. Is your application multithreaded? No, my application is not multithreaded. This is using r300 driver and aiglx. FWIW, does disabling AIGLX make a difference? I will try later, although I think that it only happens when I use valgrind to debug my app. (I am not sure about this, so I will have to test it!) -- Papadakos Panagiotis - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel