From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Mark the object as dirty when setting to the CPU write domain. Date: Sun, 09 May 2010 22:09:51 +0100 Message-ID: <89kc63$grbfdn@fmsmga002.fm.intel.com> References: <1273437720-8950-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 fmsmga102.fm.intel.com (mga10.intel.com [192.55.52.92]) by gabe.freedesktop.org (Postfix) with ESMTP id 381F59E73F for ; Sun, 9 May 2010 14:09:54 -0700 (PDT) In-Reply-To: <1273437720-8950-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: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, 9 May 2010 21:42:00 +0100, Chris Wilson wrote: > Or else we may not write back the written pages upon unbind. For > example the contents of a batch buffer written using a simple mmap or > using shmmem pwrite may be discarded if we are forced to evict > everything whilst pinning the objects for execbuffer. Daniel Vetter pointed out that all callers of set_to_cpu_domain(write=TRUE) manually mark the object as dirty, so this cannot be the cause of the failures that I see. Well I enjoyed my eureka moment, short though it was. I think that it would be wise to make set_to_cpu_domain() and its callers behave consistently with set_to_gtt_domain(), whereby the obj_priv->dirty=1 is done in the common function and not the callers. A task for tomorrow. -ickle -- Chris Wilson, Intel Open Source Technology Centre