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] [day] [month] [year] [list]
Message-ID: <20240820153001.2899-1-jose.exposito89@gmail.com>
Date: Tue, 20 Aug 2024 17:30:00 +0200
From: José Expósito <jose.exposito89@...il.com>
To: louis.chauvet@...tlin.com
Cc: airlied@...il.com,
	arthurgrillo@...eup.net,
	daniel@...ll.ch,
	dri-devel@...ts.freedesktop.org,
	hamohammed.sa@...il.com,
	jeremie.dautheribes@...tlin.com,
	linux-kernel@...r.kernel.org,
	maarten.lankhorst@...ux.intel.com,
	mairacanal@...eup.net,
	marcheu@...gle.com,
	melissa.srw@...il.com,
	miquel.raynal@...tlin.com,
	mripard@...nel.org,
	nicolejadeyee@...gle.com,
	rodrigosiqueiramelo@...il.com,
	seanpaul@...gle.com,
	thomas.petazzoni@...tlin.com,
	tzimmermann@...e.de,
	José Expósito <jose.exposito89@...il.com>
Subject: [PATCH RFC 6/6] drm/vkms: Extract vkms_composer header

> The vkms composer functions are defined in a different .c, so make the
> same thing for the function declaration in the headers and create
> vkms_composer.h.
> 
> Signed-off-by: Louis Chauvet <louis.chauvet@...tlin.com>

Reviewed-by: José Expósito <jose.exposito89@...il.com>

> ---
>  drivers/gpu/drm/vkms/vkms_composer.c  |  2 ++
>  drivers/gpu/drm/vkms/vkms_composer.h  | 18 ++++++++++++++++++
>  drivers/gpu/drm/vkms/vkms_crtc.c      |  1 +
>  drivers/gpu/drm/vkms/vkms_drv.h       | 11 -----------
>  drivers/gpu/drm/vkms/vkms_writeback.c |  1 +
>  5 files changed, 22 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> index 139d249454c4..15ef07ed304e 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -10,7 +10,9 @@
>  #include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_vblank.h>
>  #include <linux/minmax.h>
> +#include <drm/drm_print.h>
>  
> +#include "vkms_composer.h"
>  #include "vkms_crtc.h"
>  #include "vkms_writeback.h"
>  
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.h b/drivers/gpu/drm/vkms/vkms_composer.h
> new file mode 100644
> index 000000000000..91b33af1e013
> --- /dev/null
> +++ b/drivers/gpu/drm/vkms/vkms_composer.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +
> +#ifndef _VKMS_COMPOSER_H
> +#define _VKMS_COMPOSER_H

#ifndef _VKMS_COMPOSER_H_
#define _VKMS_COMPOSER_H_

> +#include "vkms_drv.h"
> +#include "vkms_crtc.h"
> +
> +void vkms_composer_worker(struct work_struct *work);
> +void vkms_set_composer(struct vkms_output *out, bool enabled);
> +
> +/* CRC Support */
> +const char *const *vkms_get_crc_sources(struct drm_crtc *crtc, size_t *count);
> +int vkms_set_crc_source(struct drm_crtc *crtc, const char *src_name);
> +int vkms_verify_crc_source(struct drm_crtc *crtc, const char *source_name,
> +			   size_t *values_cnt);
> +
> +#endif //_VKMS_COMPOSER_H

#endif /* _VKMS_COMPOSER_H_ */

> diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
> index cb6e49a86745..6fae43932b60 100644
> --- a/drivers/gpu/drm/vkms/vkms_crtc.c
> +++ b/drivers/gpu/drm/vkms/vkms_crtc.c
> @@ -9,6 +9,7 @@
>  #include <drm/drm_print.h>
>  
>  #include "vkms_crtc.h"
> +#include "vkms_composer.h"
>  #include "vkms_plane.h"

+#include "vkms_composer.h"
 #include "vkms_crtc.h"
 #include "vkms_plane.h"

>  static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
> index 943ad55e0172..f74a5c2045f9 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.h
> +++ b/drivers/gpu/drm/vkms/vkms_drv.h
> @@ -106,15 +106,4 @@ struct vkms_device {
>  
>  int vkms_output_init(struct vkms_device *vkmsdev, int possible_crtc_index);
>  
> -/* CRC Support */
> -const char *const *vkms_get_crc_sources(struct drm_crtc *crtc,
> -					size_t *count);
> -int vkms_set_crc_source(struct drm_crtc *crtc, const char *src_name);
> -int vkms_verify_crc_source(struct drm_crtc *crtc, const char *source_name,
> -			   size_t *values_cnt);
> -
> -/* Composer Support */
> -void vkms_composer_worker(struct work_struct *work);
> -void vkms_set_composer(struct vkms_output *out, bool enabled);
> -
>  #endif /* _VKMS_DRV_H_ */
> diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c
> index 48f3f7f2e2a4..5e75880a5845 100644
> --- a/drivers/gpu/drm/vkms/vkms_writeback.c
> +++ b/drivers/gpu/drm/vkms/vkms_writeback.c
> @@ -15,6 +15,7 @@
>  #include "vkms_writeback.h"
>  #include "vkms_crtc.h"
>  #include "vkms_formats.h"
> +#include "vkms_composer.h"

 #include "vkms_crtc.h"
 +#include "vkms_composer.h"
 #include "vkms_formats.h"

>  static const u32 vkms_wb_formats[] = {
>  	DRM_FORMAT_ARGB8888,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ