From: Damien Lespiau Subject: Re: [PATCH 17/49] drm/i915/bdw: A bit more advanced context init/fini Date: Tue, 1 Apr 2014 01:38:04 +0100 Message-ID: <20140401003804.GA26578@strange.amr.corp.intel.com> References: <1395943218-7708-1-git-send-email-oscar.mateo@intel.com> <1395943218-7708-18-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id EDB2C6E474 for ; Mon, 31 Mar 2014 17:39:04 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1395943218-7708-18-git-send-email-oscar.mateo@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: oscar.mateo@intel.com Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Thu, Mar 27, 2014 at 05:59:46PM +0000, oscar.mateo@intel.com wrote: > --- a/drivers/gpu/drm/i915/i915_lrc.c > +++ b/drivers/gpu/drm/i915/i915_lrc.c > @@ -41,7 +41,45 @@ > #include > #include "i915_drv.h" > > +#define GEN8_LR_CONTEXT_SIZE (21 * PAGE_SIZE) I'm a bit puzzled by that number: - I found a sentence saying: "the Context Image for the rendering engine consists of 20 4K pages", which seems that it includes the HWS page (on the same page it says context layout = HWS Page + register state context). - When looking at the register state context for the render engine: 18096 dwords -> 18 pages, so in total it'd be 19 pages (need to add the HWS Page) - Clearly I must be missing something :) - That's only for the render engine, other engines have a much smaller context, smaller enough that it's worth looking at their exact size. - It'd be nice to work out the real size from the *CXT_*SIZE registers. All of this can be refinement patches on top I guess, might have a look at it. -- Damien