From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 2/4] drm/i915: fix rc6 initialization on Ironlake Date: Sat, 19 Mar 2011 17:07:19 -0700 Message-ID: <20110320000719.GA3233@lundgren.kumite> References: <1300489968-8574-1-git-send-email-ben@bwidawsk.net> <1300489968-8574-3-git-send-email-ben@bwidawsk.net> <0d30dc$lgdgge@orsmga001.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 22A819E792 for ; Sat, 19 Mar 2011 17:07:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <0d30dc$lgdgge@orsmga001.jf.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, Mar 19, 2011 at 07:55:01AM +0000, Chris Wilson wrote: > Let's make this a more generic function because it does look useful. > > static inline int intel_ring_wait_idle(struct intel_ring_buffer *ring) > { > return intel_wait_ring_buffer(ring, ring->space - 8); > } Sounds good. I'm currently working this into a new patch in the series and putting it in intel_ringbuffer.c, as well as replacing two callers. > > Just report the failure in all cases and avoid jargon (if possible)! > > if (intel_ring_wait_idle(LP_RING(dev_priv))) { > DRM_ERROR("failed to enable automatic power saving\n"); > return; > } Why not do the teardown? This is was I was saying on IRC: in the GPU hang case we can safely free the bos. In the non-hang case, we can unsafely free them. As for the jargon, that's fine. > -- > Chris Wilson, Intel Open Source Technology Centre Ben