From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH 2/4] drm: Add plane type property Date: Mon, 3 Mar 2014 16:02:44 +0000 Message-ID: <20140303160244.GF13141@strange.amr.corp.intel.com> References: <1393539283-5901-1-git-send-email-matthew.d.roper@intel.com> <1393539283-5901-3-git-send-email-matthew.d.roper@intel.com> <20140227232408.GU27672@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id AE406FBE7B for ; Mon, 3 Mar 2014 08:04:56 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Rob Clark Cc: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org On Thu, Feb 27, 2014 at 11:03:07PM -0500, Rob Clark wrote: > >> > @@ -1114,6 +1126,10 @@ int drm_plane_set_primary(struct drm_device *dev, struct drm_plane *plane, > >> > >> > >> fwiw, this comment probably belongs in #1/4 but: > >> > >> you probably don't need to introduce drm_plane_set_primary().. > >> instead you could just rename the 'bool priv' to 'bool prim'. I think > >> there are just three drivers using primary planes.. I'm not 100% sure > >> about exynos, but both omap and msm, the private plane == primary > >> plane. At least it was the intention to morph that into primary > >> planes. > > > > I'd like to handle cursors with this eventually as well, so I'm not sure > > whether just changing the meaning of priv by itself will get us > > everything we need. It seems like we probably need to provide a whole > > lot more information about the capabilities and limitations of each > > plane at drm_plane_init() and then expose those all as plane > > properties so that userspace knows what it can and can't do. In theory > > we could expose cursor planes exactly the same way we expose > > "traditional" planes today as long as we made sufficient plane > > properties available to userspace to describe the min/max size > > limitations and such. > > We could also just go the opposite direction, ie. keep _set_primary() > and drop the 'priv' arg.. I don't really mind too much either way, but > the 'private' plane stuff was intended to eventually be exposed to > userspace.. so if we call it primary now (which is a much better > name, IMO), we should clean out the remaining references to 'private'. Ah, I had the same comment in patch 1/4. Why not have drm_init_plane() take the type of plane as the last argument then? (instead of bool primary, just the plane_type enum, primary, "sprite", cursor). -- Damien