drm/rockchip: vop2: move debugfs init to late register

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I845753f616e119da94a12388a71117a21d5c5353
This commit is contained in:
Sandy Huang
2025-03-19 16:52:32 +08:00
parent 4d4cac04b0
commit 5f601f5d61

View File

@@ -8417,8 +8417,9 @@ static struct drm_info_list vop2_debugfs_files[] = {
{ "cubic_lut", vop2_cubic_lut_show, 0, NULL },
};
static int vop2_crtc_debugfs_init(struct drm_minor *minor, struct drm_crtc *crtc)
static int vop2_crtc_late_register(struct drm_crtc *crtc)
{
struct drm_minor *minor = crtc->dev->primary;
struct vop2_video_port *vp = to_vop2_video_port(crtc);
struct vop2 *vop2 = vp->vop2;
int ret, i;
@@ -8456,6 +8457,13 @@ remove:
return ret;
}
static void vop2_crtc_early_unregister(struct drm_crtc *crtc)
{
struct vop2_video_port *vp = to_vop2_video_port(crtc);
debugfs_remove_recursive(vp->debugfs);
}
static enum drm_mode_status
vop2_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode)
{
@@ -8793,7 +8801,6 @@ static const struct rockchip_crtc_funcs private_crtc_funcs = {
.cancel_pending_vblank = vop2_crtc_cancel_pending_vblank,
.sysfs_init = vop2_crtc_sysfs_init,
.sysfs_fini = vop2_crtc_sysfs_fini,
.debugfs_init = vop2_crtc_debugfs_init,
.debugfs_dump = vop2_crtc_debugfs_dump,
.regs_dump = vop2_crtc_regs_dump,
.active_regs_dump = vop2_crtc_active_regs_dump,
@@ -13756,6 +13763,8 @@ static const struct drm_crtc_funcs vop2_crtc_funcs = {
.set_crc_source = vop2_crtc_set_crc_source,
.verify_crc_source = vop2_crtc_verify_crc_source,
.get_crc_sources = vop2_crtc_get_crc_sources,
.late_register = vop2_crtc_late_register,
.early_unregister = vop2_crtc_early_unregister,
};
static void vop2_fb_unref_worker(struct drm_flip_work *work, void *val)