[PATCH 3/3] drm/omapdrm: Separate ids for planes and CRTCs in omap_modeset_init()

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Mar 15 10:15:25 UTC 2017


Hi,

On 14/03/17 22:35, Jyri Sarha wrote:
> Add separate local id variables for indexing planes and CRTCs in
> omap_modeset_init(). This is to make it more explicit what each local
> variable is used for.

"id" should be used for DRM object ids. I think here plane_id and
crtc_id are really idx.

And the code still mixes up at least plane index and DSS plane (enum
omap_plane from omapdss.h). For crtcs I think we already separate the
DRM crtc idx and the DSS "enum omap_channel".

But I belive omap_drv.c shouldn't even care about those omap_channels,
it should all be in omap_crtc.c.

These patches are in the correct direction, but see if you can take it
further and get the code to be something like this:

For each display, we create a crtc.

Each crtc will figure out the omap_channel to use, based on the display
(out->dispc_channel), in omap_crtc.c.

Each crtc will get a primary plane. omap_plane.c will figure out which
"enum omap_plane" to to use for a plane. I think it can be a direct
mapping from plane idx to enum omap_plane, but that has to be explicit
in the code.

Each crtc will also get an encoder and a connector. We can configure an
encoder and a connector to be usable only with a single crtc.

The rest of the planes will be created as overlay planes.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170315/4bea5223/attachment.sig>


More information about the dri-devel mailing list