]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm: Add drm_plane/connector_index
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 29 Jul 2014 11:47:11 +0000 (13:47 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 Aug 2014 15:46:03 +0000 (17:46 +0200)
commit10f637bf292ba501f9b9e9df6dfe21d8fa521fbd
treeda589badae4cc719b586c01b8ed5a305efa87045
parente6ae8687a87b1fe5c25e824c8ad300f5587eb622
drm: Add drm_plane/connector_index

In the atomic state we'll have an array of states for crtcs, planes
and connectors and need to be able to at them by their index. We
already have a drm_crtc_index function so add the missing ones for
planes and connectors.

If it later on turns out that the list walking is too expensive we can
add the index to the relevant modeset objects.

Rob Clark doesn't like the loops too much, but we can always add an
obj->idx parameter later on. And for now reiterating is actually safer
since nowadays we have hotpluggable connectors (thanks to DP MST).

v2: Fix embarrassing copypasta fail in kerneldoc and header
declarations, spotted by Matt Roper.

Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc.c
include/drm/drm_crtc.h