From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Intel-specific primary plane handling (v2) Date: Fri, 11 Apr 2014 20:27:41 +0200 Message-ID: <20140411182741.GO9262@phenom.ffwll.local> References: <1397175876-3216-1-git-send-email-matthew.d.roper@intel.com> <20140411093436.GE9262@phenom.ffwll.local> <20140411174155.GH1063@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gabe.freedesktop.org (Postfix) with ESMTP id E81C26E41E for ; Fri, 11 Apr 2014 11:27:43 -0700 (PDT) Received: by mail-ee0-f45.google.com with SMTP id d17so4390756eek.18 for ; Fri, 11 Apr 2014 11:27:43 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140411174155.GH1063@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Matt Roper Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Apr 11, 2014 at 10:41:56AM -0700, Matt Roper wrote: > On Fri, Apr 11, 2014 at 11:34:36AM +0200, Daniel Vetter wrote: > > On Thu, Apr 10, 2014 at 05:24:36PM -0700, Matt Roper wrote: > ... > > > > Hm, I've thought we could do a simple > > > > if (intel_crtc->primary_enabled) > > call_primary_plane_helper > > else > > enable_the_hw_plane > > > > But we need to do all the arg checking for the !primary_enabled case :( > > Anyway more code sharing make me happier. > > > > Cheers, Daniel > > I think the problem here is that the helper has a bunch of tests > targetted at the lowest common denominator hardware. Some of the things > it rejects are things that our hardware may begin to allow at some point > in the future (e.g., primary plane scaling, partial CRTC coverage of > primary plane, etc.). We can probably call into the helper today and > get the behavior we want, but I'd expect that some of those restrictions > will need to be relaxed in the future and then we'll have to switch the > code back at that point. Given that we still need to do all this > checking in the 'if (!enabled)' case, I don't think it's worth trying to > call through the helper for the 'if (enabled)' case (especially since > the actual "work" here after we're done testing is just a couple lines > of code)? Well for that future I simply expect that we'll get a completely new update_plane function. I agree that reusing the helper completely doesn't work really, but sharing the tests would be nice imo. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch