]> git.baikalelectronics.ru Git - kernel.git/commit
drm/atomic: Allow for holes in connector state, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 17 Feb 2016 07:32:05 +0000 (08:32 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 19 Feb 2016 03:24:03 +0000 (13:24 +1000)
commit29b4362f1734fda8db3ffe12b28e75ef0b8aa1d1
treef3f9520de7cb93de29c4b039c7b26f01acb8b65d
parentb6f45d9401f594f951004fe37ff5b7430dfb483f
drm/atomic: Allow for holes in connector state, v2.

Because we record connector_mask using 1 << drm_connector_index now
the connector_mask should stay the same even when other connectors
are removed. This was not the case with MST, in that case when removing
a connector all other connectors may change their index.

This is fixed by waiting until the first get_connector_state to allocate
connector_state, and force reallocation when state is too small.

As a side effect connector arrays no longer have to be preallocated,
and can be allocated on first use which means a less allocations in
the page flip only path.

Changes since v1:
- Whitespace. (Ville)
- Call ida_remove when destroying the connector. (Ville)
- u32 alloc -> int. (Ville)

Fixes: 5797e6630008 ("drm/atomic: Remove drm_atomic_connectors_for_crtc.")
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Lyude <cpaul@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_crtc.c
include/drm/drm_crtc.h