From: Daniel Vetter Subject: Re: [PATCH] drm/i915/vlv: Added write-enable pte bit support Date: Thu, 6 Feb 2014 18:36:26 +0100 Message-ID: <20140206173626.GT17001@phenom.ffwll.local> References: <1389270274-13826-1-git-send-email-akash.goel@intel.com> <8BF5CF93467D8C498F250C96583BC09CC6C9B2@BGSMSX103.gar.corp.intel.com> <20140206115637.GA5360@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B581FB5E0 for ; Thu, 6 Feb 2014 09:36:35 -0800 (PST) Received: by mail-ea0-f172.google.com with SMTP id l9so890244eaj.31 for ; Thu, 06 Feb 2014 09:36:32 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140206115637.GA5360@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson , "Goel, Akash" , "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Thu, Feb 06, 2014 at 11:56:37AM +0000, Chris Wilson wrote: > On Thu, Feb 06, 2014 at 10:22:28AM +0000, Goel, Akash wrote: > > Please kindly review this patch. > > > > Best regards > > Akash > > -----Original Message----- > > From: Goel, Akash > > Sent: Thursday, January 09, 2014 5:55 PM > > To: intel-gfx@lists.freedesktop.org > > Cc: Goel, Akash > > Subject: [PATCH] drm/i915/vlv: Added write-enable pte bit support > > > > From: Akash Goel > > > > This adds support for using the write-enable bit in the GTT entry for VLV. > > This is handled via a read-only flag in the GEM buffer object which is then used to check if the write-enable bit has to be set or not when writing the GTT entries. > > Currently by default only the Batch buffer & Ring buffers are being marked as read only. > > Don't cause us to rewrite the PTE for the batch buffer between each > execbuffer (ro for the batch, rw next time it gets used as a texture). > In fact, do not change ro without user intervention. > > gt_old_ro is unused > > Use byt_pte_encode() instead of hacking the result of > ppgtt->pte_encode(). > > Consider expanding i915_cache_level so that it included the concept of > PROT_READ | PROT_WRITE. Also, what's the exact use-case for this here? And if we need to expose this to userspace, then it needs a testcase. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch