lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220109165044.vuq5cmxlejclkcsw@mail.igalia.com>
Date:   Sun, 9 Jan 2022 15:50:44 -0100
From:   Melissa Wen <mwen@...lia.com>
To:     José Expósito <jose.exposito89@...il.com>
Cc:     melissa.srw@...il.com, hamohammed.sa@...il.com,
        rodrigosiqueiramelo@...il.com, airlied@...ux.ie,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH RESEND v2 1/3] drm/vkms: refactor overlay plane creation

On 01/07, José Expósito wrote:
> Move the logic to create an overlay plane to its own function.
> Refactor, no functional changes.
> 
> Signed-off-by: José Expósito <jose.exposito89@...il.com>
> ---
>  drivers/gpu/drm/vkms/vkms_output.c | 26 +++++++++++++++++++-------
>  1 file changed, 19 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
> index 04406bd3ff02..2e805b2d36ae 100644
> --- a/drivers/gpu/drm/vkms/vkms_output.c
> +++ b/drivers/gpu/drm/vkms/vkms_output.c
> @@ -32,6 +32,21 @@ static const struct drm_connector_helper_funcs vkms_conn_helper_funcs = {
>  	.get_modes    = vkms_conn_get_modes,
>  };
>  
> +static int vkms_add_overlay_plane(struct vkms_device *vkmsdev, int index,
> +				  struct drm_crtc *crtc)
> +{
> +	struct vkms_plane *overlay;
> +
> +	overlay = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_OVERLAY, index);
> +	if (IS_ERR(overlay))
> +		return PTR_ERR(overlay);
> +
> +	if (!overlay->base.possible_crtcs)
> +		overlay->base.possible_crtcs = drm_crtc_mask(crtc);
> +
> +	return 0;
> +}
> +
>  int vkms_output_init(struct vkms_device *vkmsdev, int index)
>  {
>  	struct vkms_output *output = &vkmsdev->output;
> @@ -39,7 +54,7 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
>  	struct drm_connector *connector = &output->connector;
>  	struct drm_encoder *encoder = &output->encoder;
>  	struct drm_crtc *crtc = &output->crtc;
> -	struct vkms_plane *primary, *cursor = NULL, *overlay = NULL;
> +	struct vkms_plane *primary, *cursor = NULL;
>  	int ret;
>  	int writeback;
>  
> @@ -48,12 +63,9 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
>  		return PTR_ERR(primary);
>  
>  	if (vkmsdev->config->overlay) {
> -		overlay = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_OVERLAY, index);
> -		if (IS_ERR(overlay))
> -			return PTR_ERR(overlay);
> -
> -		if (!overlay->base.possible_crtcs)
> -			overlay->base.possible_crtcs = drm_crtc_mask(crtc);
> +		ret = vkms_add_overlay_plane(vkmsdev, index, crtc);
> +		if (ret)
> +			return ret;
lgtm, thanks!

Reviewed-by: Melissa Wen <mwen@...lia.com>
>  	}
>  
>  	if (vkmsdev->config->cursor) {
> -- 
> 2.25.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ