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).