[PATCH v4 1/9] drm: vkms: Replace the deprecated drm_mode_config_init
Melissa Wen
mwen at igalia.com
Tue Feb 8 10:02:23 UTC 2022
On 01/21, Igor Torrente wrote:
> `drm_mode_config_init` is deprecated since commit c3b790ea07a1 ("drm: Manage
> drm_mode_config_init with drmm_") in favor of `drmm_mode_config_init`. Update
> the former to the latter.
>
> Signed-off-by: Igor Torrente <igormtorrente at gmail.com>
> ---
> V2: Change the code style(Thomas Zimmermann).
>
> V4: Update the commit message(Nícolas F. R. A. Prado)
> ---
> drivers/gpu/drm/vkms/vkms_drv.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> index 0ffe5f0e33f7..ee4d96dabe19 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.c
> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> @@ -140,8 +140,12 @@ static const struct drm_mode_config_helper_funcs vkms_mode_config_helpers = {
> static int vkms_modeset_init(struct vkms_device *vkmsdev)
> {
> struct drm_device *dev = &vkmsdev->drm;
> + int ret;
> +
> + ret = drmm_mode_config_init(dev);
> + if (ret < 0)
> + return ret;
lgtm.
Reviewed-by: Melissa Wen <mwen at igalia.com>
>
> - drm_mode_config_init(dev);
> dev->mode_config.funcs = &vkms_mode_funcs;
> dev->mode_config.min_width = XRES_MIN;
> dev->mode_config.min_height = YRES_MIN;
> --
> 2.30.2
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220208/b6700561/attachment-0001.sig>
More information about the dri-devel
mailing list