From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Make use of intel_fb_obj() (v2) Date: Wed, 9 Jul 2014 13:52:44 +0200 Message-ID: <20140709115244.GN17271@phenom.ffwll.local> References: <20140708064713.GC26405@nuc-i3427.alporthouse.com> <1404831007-10991-1-git-send-email-matthew.d.roper@intel.com> <20140709092909.GE12556@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by gabe.freedesktop.org (Postfix) with ESMTP id A974C6E54A for ; Wed, 9 Jul 2014 04:52:34 -0700 (PDT) Received: by mail-wi0-f175.google.com with SMTP id ho1so2610574wib.8 for ; Wed, 09 Jul 2014 04:52:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140709092909.GE12556@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Matt Roper , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 09, 2014 at 10:29:09AM +0100, Chris Wilson wrote: > On Tue, Jul 08, 2014 at 07:50:07AM -0700, Matt Roper wrote: > > This should hopefully simplify the display code slightly and also > > solves at least one mistake in intel_pipe_set_base() where > > to_intel_framebuffer(fb)->obj is referenced during local variable > > initialization, before 'if (!fb)' gets checked. > > > > Potential uses of this macro were identified via the following > > Coccinelle patch: > > > > @@ > > expression E; > > @@ > > * to_intel_framebuffer(E)->obj > > > > @@ > > expression E; > > identifier I; > > @@ > > I = to_intel_framebuffer(E); > > ... > > * I->obj > > > > v2: Rewrite some NULL tests in terms of the obj rather than the fb. > > Also add a WARN() if trying to pageflip with a disabled primary > > plane. [Suggested by Chris Wilson] > > > > Signed-off-by: Matt Roper > Reviewed-by: Chris Wilson > > And iirc 1/2 was trivial, so r-b for that as well. Thanks, both merged to dinq. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch