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  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]
Date:   Tue, 12 Jan 2021 07:10:12 -0300
From:   Melissa Wen <melissa.srw@...il.com>
To:     Sumera Priyadarsini <sylphrenadin@...il.com>
Cc:     rodrigosiqueiramelo@...il.com, hamohammed.sa@...il.com,
        daniel@...ll.ch, airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V5 2/3] drm/vkms: Add support for writeback module

On 01/12, Sumera Priyadarsini wrote:
> Add enable_writeback feature to vkms_config as a module.
> 
> Signed-off-by: Sumera Priyadarsini <sylphrenadin@...il.com>
> ---
>  drivers/gpu/drm/vkms/vkms_drv.c    | 5 +++++
>  drivers/gpu/drm/vkms/vkms_drv.h    | 1 +
>  drivers/gpu/drm/vkms/vkms_output.c | 9 ++++++---
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> index 6b33975a5cb2..708f7f54001d 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.c
> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> @@ -40,6 +40,10 @@ static bool enable_cursor = true;
>  module_param_named(enable_cursor, enable_cursor, bool, 0444);
>  MODULE_PARM_DESC(enable_cursor, "Enable/Disable cursor support");
>  
> +static bool enable_writeback = true;
> +module_param_named(enable_writeback, enable_writeback, bool, 0444);
> +MODULE_PARM_DESC(enable_writeback, "Enable/Disable writeback connector support");
> +
>  DEFINE_DRM_GEM_FOPS(vkms_driver_fops);
>  
>  static void vkms_release(struct drm_device *dev)
> @@ -189,6 +193,7 @@ static int __init vkms_init(void)
>  	default_config = config;
>  
>  	config->cursor = enable_cursor;
> +	config->writeback = enable_writeback;
>  
>  	return vkms_create(config);
>  }
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
> index 6a27bd8875f2..b9b4e2bc11c0 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.h
> +++ b/drivers/gpu/drm/vkms/vkms_drv.h
> @@ -83,6 +83,7 @@ struct vkms_output {
>  struct vkms_device;
>  
>  struct vkms_config {
> +	bool writeback;
>  	bool cursor;
>  	/* only set when instantiated */
>  	struct vkms_device *dev;
> diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
> index 8f3ffb28b9d1..f5f6f15c362c 100644
> --- a/drivers/gpu/drm/vkms/vkms_output.c
> +++ b/drivers/gpu/drm/vkms/vkms_output.c
> @@ -41,6 +41,7 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
>  	struct drm_crtc *crtc = &output->crtc;
>  	struct drm_plane *primary, *cursor = NULL;
>  	int ret;
> +	int writeback;
>  
>  	primary = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_PRIMARY, index);
>  	if (IS_ERR(primary))
> @@ -80,9 +81,11 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
>  		goto err_attach;
>  	}
>  
> -	ret = vkms_enable_writeback_connector(vkmsdev);
> -	if (ret)
> -		DRM_ERROR("Failed to init writeback connector\n");
> +	if (vkmsdev->config->writeback) {
> +		writeback = vkms_enable_writeback_connector(vkmsdev);
> +		if (writeback)
> +			DRM_ERROR("Failed to init writeback connector\n");
> +	}

Thanks,

Reviewed-by: Melissa Wen <melissa.srw@...il.com>

>
>  	drm_mode_config_reset(dev);
>  
> -- 
> 2.25.1
>

Powered by blists - more mailing lists