drm/vc4: kms: Add functions to create the state objects

In order to make the vc4_kms_load code and error path a bit easier to
read and extend, add functions to create state objects, and use managed
actions to cleanup if needed.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-6-maxime@cerno.tech
This commit is contained in:
Maxime Ripard
2020-10-29 20:01:04 +01:00
parent 84d7d4720c
commit dcda7c28bf
2 changed files with 57 additions and 24 deletions

View File

@@ -324,9 +324,6 @@ static void vc4_drm_unbind(struct device *dev)
drm_dev_unregister(drm);
drm_atomic_helper_shutdown(drm);
drm_atomic_private_obj_fini(&vc4->load_tracker);
drm_atomic_private_obj_fini(&vc4->ctm_manager);
}
static const struct component_master_ops vc4_drm_ops = {