From: Damien Lespiau Subject: Re: [PATCH 3/3] drm/i915: Make num_sprites a per-pipe value Date: Mon, 3 Mar 2014 14:49:36 +0000 Message-ID: <20140303144936.GD13141@strange.amr.corp.intel.com> References: <1393605735-7772-1-git-send-email-damien.lespiau@intel.com> <1393605735-7772-4-git-send-email-damien.lespiau@intel.com> <20140228173002.GE21275@nuc-i3427.alporthouse.com> <20140228173739.GA9964@strange.amr.corp.intel.com> <20140228174920.GF21275@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id BA4AD105777 for ; Mon, 3 Mar 2014 06:49:40 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140228174920.GF21275@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 , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Feb 28, 2014 at 05:49:20PM +0000, Chris Wilson wrote: > On Fri, Feb 28, 2014 at 05:37:39PM +0000, Damien Lespiau wrote: > > On Fri, Feb 28, 2014 at 05:30:02PM +0000, Chris Wilson wrote: > > > On Fri, Feb 28, 2014 at 04:42:15PM +0000, Damien Lespiau wrote: > > > > In the future, we need to be able to specify per-pipe number of > > > > planes/sprites. Let's start today! > > > > > > But today, what's wrong with: > > > for_each_pipe(pipe) info->num_sprites[pipe] = IS_VLV(dev) ? 2 : 1; > > > > I'd rather have info->num_sprites[pipe] == 0 when the device doesn't > > support that pipe, even if that value shouldn't be used anywhere. > > for (; pipe < I915_NUM_PIPES; pipe++) info->num_sprites[pipe] = 0; > -Chris Would: if (IS_VALLEYVIEW(dev)) for_each_pipe(pipe) info->num_sprites[pipe] = 2; else for_each_pipe(pipe) info->num_sprites[pipe] = 1; be acceptable to your keen eye? -- Damien