Message ID | 20230116205800.1266227-1-mcanal@igalia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] drm/vkms: Use drmm_crtc_init_with_planes() | expand |
Maíra Canal <mcanal@igalia.com> writes: Hello Maíra, > Use drmm_crtc_init_with_planes() instead of drm_crtc_init_with_planes() > to get rid of the explicit destroy hook in struct drm_crtc_funcs. > > Signed-off-by: Maíra Canal <mcanal@igalia.com> > --- Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
On 1/16/23 17:58, Maíra Canal wrote: > Use drmm_crtc_init_with_planes() instead of drm_crtc_init_with_planes() > to get rid of the explicit destroy hook in struct drm_crtc_funcs. > > Signed-off-by: Maíra Canal <mcanal@igalia.com> Pushed to drm-misc (drm-misc-next). Best Regards, - Maíra Canal > --- > drivers/gpu/drm/vkms/vkms_crtc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c > index 57bbd32e9beb..515f6772b866 100644 > --- a/drivers/gpu/drm/vkms/vkms_crtc.c > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c > @@ -161,7 +161,6 @@ static void vkms_atomic_crtc_reset(struct drm_crtc *crtc) > > static const struct drm_crtc_funcs vkms_crtc_funcs = { > .set_config = drm_atomic_helper_set_config, > - .destroy = drm_crtc_cleanup, > .page_flip = drm_atomic_helper_page_flip, > .reset = vkms_atomic_crtc_reset, > .atomic_duplicate_state = vkms_atomic_crtc_duplicate_state, > @@ -282,8 +281,8 @@ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, > struct vkms_output *vkms_out = drm_crtc_to_vkms_output(crtc); > int ret; > > - ret = drm_crtc_init_with_planes(dev, crtc, primary, cursor, > - &vkms_crtc_funcs, NULL); > + ret = drmm_crtc_init_with_planes(dev, crtc, primary, cursor, > + &vkms_crtc_funcs, NULL); > if (ret) { > DRM_ERROR("Failed to init CRTC\n"); > return ret;
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 57bbd32e9beb..515f6772b866 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -161,7 +161,6 @@ static void vkms_atomic_crtc_reset(struct drm_crtc *crtc) static const struct drm_crtc_funcs vkms_crtc_funcs = { .set_config = drm_atomic_helper_set_config, - .destroy = drm_crtc_cleanup, .page_flip = drm_atomic_helper_page_flip, .reset = vkms_atomic_crtc_reset, .atomic_duplicate_state = vkms_atomic_crtc_duplicate_state, @@ -282,8 +281,8 @@ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, struct vkms_output *vkms_out = drm_crtc_to_vkms_output(crtc); int ret; - ret = drm_crtc_init_with_planes(dev, crtc, primary, cursor, - &vkms_crtc_funcs, NULL); + ret = drmm_crtc_init_with_planes(dev, crtc, primary, cursor, + &vkms_crtc_funcs, NULL); if (ret) { DRM_ERROR("Failed to init CRTC\n"); return ret;
Use drmm_crtc_init_with_planes() instead of drm_crtc_init_with_planes() to get rid of the explicit destroy hook in struct drm_crtc_funcs. Signed-off-by: Maíra Canal <mcanal@igalia.com> --- drivers/gpu/drm/vkms/vkms_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)