From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: reject GTT domain in relocations Date: Fri, 02 Dec 2011 20:31:06 +0000 Message-ID: References: <1322855001-4358-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D2289F03A for ; Fri, 2 Dec 2011 12:31:30 -0800 (PST) In-Reply-To: <1322855001-4358-1-git-send-email-daniel.vetter@ffwll.ch> 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: intel-gfx@lists.freedesktop.org Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Fri, 2 Dec 2011 20:43:21 +0100, Daniel Vetter wrote: > This confuses our domain tracking and can (for gtt write domains) lead > to a subsequent oops. > > Tested by tests/gem_exec_bad_domains from i-g-t. > > Signed-Off-by: Daniel Vetter If it was in deliberate use by userspace we would have been oopsing, Reviewed-by: Chris Wilson In a similar vein is to add a BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS) to move_to_active(). With this loop-hole closed, adding an invalid write buffer to the active list should only be possible through a kernel programming error (and helps remind us about what the limits upon the active list are). -Chris -- Chris Wilson, Intel Open Source Technology Centre