From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH v2] drm/i915: set scanout buffer as uncached on Sandybridge Date: Thu, 28 Oct 2010 10:09:18 +0100 Message-ID: References: <1288246569-5720-1-git-send-email-zhenyuw@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C2129E92A for ; Thu, 28 Oct 2010 02:09:40 -0700 (PDT) In-Reply-To: <1288246569-5720-1-git-send-email-zhenyuw@linux.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: Zhenyu Wang , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 28 Oct 2010 14:16:09 +0800, Zhenyu Wang wrote: > + ret = i915_gem_object_enable_scanout(obj); > + if (ret) { > + kfree(intel_fb); > + return ERR_PTR(ret); > + } We need to introduce a mutex_lock here. I wonder whether it is truly worth it. Yes, user space often creates a fb for a new obj so we avoid the unbind penalty on flipping to this fb. But that first rebind is a one-off event as well, and we probably should look at how we can simply change caching bits in the PTE on the fly. In the short term I'll drop this hunk. I've pushed this to -staging as I'd like to get another tested-by or reviewed-by and then send it to stable. -Chris -- Chris Wilson, Intel Open Source Technology Centre