From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com ([134.134.136.100]:62260 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363AbcJJM4s (ORCPT ); Mon, 10 Oct 2016 08:56:48 -0400 Date: Mon, 10 Oct 2016 15:56:43 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Daniel Vetter Cc: dri-devel , Seung-Woo Kim , stable , Kyungmin Park , Laurent Pinchart , Lyude , Vincent Abriou , Marek Szyprowski Subject: Re: [PATCH] drm: Don't force all planes to be added to the state due to zpos Message-ID: <20161010125643.GE4329@intel.com> References: <1476101987-31986-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Mon, Oct 10, 2016 at 02:46:35PM +0200, Daniel Vetter wrote: > On Mon, Oct 10, 2016 at 2:19 PM, wrote: > > From: Ville Syrj�l� > > > > We don't want all planes to be added to the state whenever a > > plane with fixed zpos gets enabled/disabled. This is true > > especially for eg. cursor planes on i915, as we want cursor > > updates to go through w/o throttling. Same holds for drivers > > that don't support zpos at all (i915 actually falls into this > > category right now since we've not yet added zpos support). > > > > Allow drivers more freedom by letting them deal with zpos > > themselves instead of doing it in drm_atomic_helper_check_planes() > > unconditionally. Easiest solution seems to be to move the call > > up to drm_atomic_helper_check(). But as some drivers might want > > to use that function without the zpos handling, let's provide > > two variants: the normal one, and one that deals with zpos. > > > > Cc: Marek Szyprowski > > Cc: Benjamin Gaignard > > Cc: Vincent Abriou > > Cc: Laurent Pinchart > > Cc: Inki Dae > > Cc: Joonyoung Shim > > Cc: Seung-Woo Kim > > Cc: Kyungmin Park > > Cc: Lyude > > Cc: Maarten Lankhorst > > Cc: stable@vger.kernel.org > > Fixes: 44d1240d006c ("drm: add generic zpos property") > > Signed-off-by: Ville Syrj�l� > > Seems a bit fragile, and then drivers still need to not overshot when > they do zpos (which we want eventually in i915 too). The only platform where we can do it is pre-g4x, and vlv/chv. And I'm thinking I can do a better job of it in the driver. > I think the > proper way is to keep track of a per-plane zpos changed (or compute > that ad-hoc, we have both states). And only grab more planes if a zpos > value changed. Doesn't work with normalized zpos. The plane's actual zpos may be unchanged even if the normalized zpos changes. > > That would fix the issue at the source, also work for us in the > future, and it should be contained to just the helper function itself. > Win all around ;-) > -Daniel > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- Ville Syrj�l� Intel OTC