From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Roper Subject: Re: [PATCH] drm/i915: Intel-specific primary plane handling (v2) Date: Fri, 11 Apr 2014 10:41:56 -0700 Message-ID: <20140411174155.GH1063@intel.com> References: <1397175876-3216-1-git-send-email-matthew.d.roper@intel.com> <20140411093436.GE9262@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 64CC989F75 for ; Fri, 11 Apr 2014 10:39:49 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140411093436.GE9262@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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)? Matt -- Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795