drm/arm/malidp: Ensure that the crtcs are shutdown before removing any encoder/connector
authorAyan Kumar Halder <ayan.halder@arm.com>
Fri, 20 Apr 2018 14:44:57 +0000 (15:44 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 18 Jun 2018 17:01:40 +0000 (18:01 +0100)
commit109c4d18e57445afcaf728b8716a69375a3daab2
treeda3274d78cca88e8780c32c36b8121d7d82fb984
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
drm/arm/malidp: Ensure that the crtcs are shutdown before removing any encoder/connector

One needs to ensure that the crtcs are shutdown so that the
drm_crtc_state->connector_mask reflects that no connectors
are currently active. Further, it reduces the reference
count for each connector. This ensures that the connectors
and encoders can be cleanly removed either when _unbind
is called for the corresponding drivers or by
drm_mode_config_cleanup().
We need drm_atomic_helper_shutdown() to be called before
component_unbind_all() otherwise the connectors attached to the
component device will have the wrong reference count value and will not
be cleanly removed.

Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/malidp_drv.c