Files
linux-cryptodev-2.6/drivers/gpu/drm/vkms/vkms_config.h
José Expósito d3ae1e394b drm/vkms: Extract vkms_config header
Creating a new vkms_config structure will be more complex once we
start adding more options.

Extract the vkms_config structure to its own header and source files
and add functions to create and delete a vkms_config and to initialize
debugfs.

Refactor, no functional changes.

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Co-developed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250218101214.5790-5-jose.exposito89@gmail.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2025-03-07 10:58:21 +01:00

48 lines
1.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0+ */
#ifndef _VKMS_CONFIG_H_
#define _VKMS_CONFIG_H_
#include <linux/types.h>
#include "vkms_drv.h"
/**
* struct vkms_config - General configuration for VKMS driver
*
* @writeback: If true, a writeback buffer can be attached to the CRTC
* @cursor: If true, a cursor plane is created in the VKMS device
* @overlay: If true, NUM_OVERLAY_PLANES will be created for the VKMS device
* @dev: Used to store the current VKMS device. Only set when the device is instantiated.
*/
struct vkms_config {
bool writeback;
bool cursor;
bool overlay;
struct vkms_device *dev;
};
/**
* vkms_config_create() - Create a new VKMS configuration
*
* Returns:
* The new vkms_config or an error. Call vkms_config_destroy() to free the
* returned configuration.
*/
struct vkms_config *vkms_config_create(void);
/**
* vkms_config_destroy() - Free a VKMS configuration
* @config: vkms_config to free
*/
void vkms_config_destroy(struct vkms_config *config);
/**
* vkms_config_register_debugfs() - Register a debugfs file to show the device's
* configuration
* @vkms_device: Device to register
*/
void vkms_config_register_debugfs(struct vkms_device *vkms_device);
#endif /* _VKMS_CONFIG_H_ */