drm: sti: use late_register and early_unregister callbacks
Make sti driver use register callback to move debugfs initialization out of sub-components creation. This will allow to convert driver .load() to drm_dev_alloc() and drm_dev_register(). sti_compositor bring up 2 crtc but only one debugfs init is needed so use drm_crtc_index to do it on the first one. This can't be done in sti_drv because only sti_compositor have access to the devices. It is almost the same for sti_encoder which handle multiple encoder while one only debugfs entry is needed so add a boolean to avoid multiple debugfs initialization Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1466514580-15194-3-git-send-email-benjamin.gaignard@linaro.org
This commit is contained in:

committed by
Daniel Vetter

orang tua
a104299b94
melakukan
83af0a483a
@@ -123,7 +123,7 @@ static struct drm_info_list vid_debugfs_files[] = {
|
||||
{ "vid", vid_dbg_show, 0, NULL },
|
||||
};
|
||||
|
||||
static int vid_debugfs_init(struct sti_vid *vid, struct drm_minor *minor)
|
||||
int vid_debugfs_init(struct sti_vid *vid, struct drm_minor *minor)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@@ -220,8 +220,5 @@ struct sti_vid *sti_vid_create(struct device *dev, struct drm_device *drm_dev,
|
||||
|
||||
sti_vid_init(vid);
|
||||
|
||||
if (vid_debugfs_init(vid, drm_dev->primary))
|
||||
DRM_ERROR("VID debugfs setup failed\n");
|
||||
|
||||
return vid;
|
||||
}
|
||||
|
Reference in New Issue
Block a user