From: Dmitry Dmitriev Subject: PROBLEM: Possible problem in i915_dma_cleanup function in i915_dma.c module Date: Thu, 04 Aug 2011 15:02:57 +0400 Message-ID: <365371312455777@web44.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-kernel-owner@vger.kernel.org To: chris@chris-wilson.co.uk, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, airlied@linux.ie List-Id: dri-devel@lists.freedesktop.org Hello! This problem is found in 3.0 kernel. In i915_dma_cleanup function(drivers/gpu/drm/i915/i915_dma.c module) I = found following: =9A135static int i915_dma_cleanup(struct drm_device * dev) =9A136{ =2E...... =9A152 =9A=9A=9A=9A=9A=9A=9A/* Clear the HWS virtual address at teardow= n */ =9A153 =9A=9A=9A=9A=9A=9A=9Aif (I915_NEED_GFX_HWS(dev)) =9A154 =9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9Ai915_free_hws(dev); =2E...... =9A157} 2102int i915_driver_unload(struct drm_device *dev) 2103{ =2E....... 2174 =9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9Aif (!I915_NEED_GFX_HW= S(dev)) 2175 =9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A= =9Ai915_free_hws(dev); =2E....... 2190} I.e. in one case i915_free_hws function is called when (I915_NEED_GFX_H= WS(dev)) condition is true(i915_dma_cleanup), but in other case it call= ed when (!I915_NEED_GFX_HWS(dev)) condition is true(in i915_driver_unlo= ad function). This is intentional? Corresponding init function is called only when (!I915_NEED_GFX_HWS(dev= )) condition is true(in i915_driver_load function). Therefore I guess t= hat if condition is wrong in i915_dma_cleanup function. Thanks, Dmitry