From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Redirect GTT mappings to the CPU page if cache-coherent Date: Wed, 13 Apr 2011 21:13:24 +0200 Message-ID: <20110413191323.GE3660@viiv.ffwll.ch> References: <87pqoqi1pu.fsf@pollan.anholt.net> <1302719752-11605-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wy0-f177.google.com (mail-wy0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 356429E74C for ; Wed, 13 Apr 2011 12:13:29 -0700 (PDT) Received: by wyb28 with SMTP id 28so982726wyb.36 for ; Wed, 13 Apr 2011 12:13:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1302719752-11605-1-git-send-email-chris@chris-wilson.co.uk> 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 Wed, Apr 13, 2011 at 07:35:52PM +0100, Chris Wilson wrote: > ... or if we will need to perform a cache-flush on the object anyway. > Unless, of course, we need to use a fence register to perform tiling > operations during the transfer (in which case we are no longer on a > chipset for which we need to be extra careful not to write through the > GTT to a snooped page). So either we are on snb and there gtt writes should work on llc cached objects (otherwise we'll have a giant problem with uploads to tiled buffers). On the other hand on pre-gen6 tiling on snooped mem doesn't work and we have a few other restrictions like this here. So for that userspace needs to be aware of what's going on, anyway. Hence we might as well SIGBUS/disallow gtt mappings for such vmapped buffers and teach userspace to use the cpu mappings (again). I don't know but maybe using snooped buffers to directly write to vbos and stuff like that is better on snb. Currently we're using pwrite everywhere, so again a userspace changes seems required, why not use cpu mappings directly? Hence I'd like to weasel myself out from reviewing this: Do we really need this complexity? -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48