xref: /linux/drivers/gpu/drm/xen/xen_drm_front_cfg.h (revision c575b7ee)
1*c575b7eeSOleksandr Andrushchenko /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2*c575b7eeSOleksandr Andrushchenko 
3*c575b7eeSOleksandr Andrushchenko /*
4*c575b7eeSOleksandr Andrushchenko  *  Xen para-virtual DRM device
5*c575b7eeSOleksandr Andrushchenko  *
6*c575b7eeSOleksandr Andrushchenko  * Copyright (C) 2016-2018 EPAM Systems Inc.
7*c575b7eeSOleksandr Andrushchenko  *
8*c575b7eeSOleksandr Andrushchenko  * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
9*c575b7eeSOleksandr Andrushchenko  */
10*c575b7eeSOleksandr Andrushchenko 
11*c575b7eeSOleksandr Andrushchenko #ifndef __XEN_DRM_FRONT_CFG_H_
12*c575b7eeSOleksandr Andrushchenko #define __XEN_DRM_FRONT_CFG_H_
13*c575b7eeSOleksandr Andrushchenko 
14*c575b7eeSOleksandr Andrushchenko #include <linux/types.h>
15*c575b7eeSOleksandr Andrushchenko 
16*c575b7eeSOleksandr Andrushchenko #define XEN_DRM_FRONT_MAX_CRTCS	4
17*c575b7eeSOleksandr Andrushchenko 
18*c575b7eeSOleksandr Andrushchenko struct xen_drm_front_cfg_connector {
19*c575b7eeSOleksandr Andrushchenko 	int width;
20*c575b7eeSOleksandr Andrushchenko 	int height;
21*c575b7eeSOleksandr Andrushchenko 	char *xenstore_path;
22*c575b7eeSOleksandr Andrushchenko };
23*c575b7eeSOleksandr Andrushchenko 
24*c575b7eeSOleksandr Andrushchenko struct xen_drm_front_cfg {
25*c575b7eeSOleksandr Andrushchenko 	struct xen_drm_front_info *front_info;
26*c575b7eeSOleksandr Andrushchenko 	/* number of connectors in this configuration */
27*c575b7eeSOleksandr Andrushchenko 	int num_connectors;
28*c575b7eeSOleksandr Andrushchenko 	/* connector configurations */
29*c575b7eeSOleksandr Andrushchenko 	struct xen_drm_front_cfg_connector connectors[XEN_DRM_FRONT_MAX_CRTCS];
30*c575b7eeSOleksandr Andrushchenko 	/* set if dumb buffers are allocated externally on backend side */
31*c575b7eeSOleksandr Andrushchenko 	bool be_alloc;
32*c575b7eeSOleksandr Andrushchenko };
33*c575b7eeSOleksandr Andrushchenko 
34*c575b7eeSOleksandr Andrushchenko int xen_drm_front_cfg_card(struct xen_drm_front_info *front_info,
35*c575b7eeSOleksandr Andrushchenko 			   struct xen_drm_front_cfg *cfg);
36*c575b7eeSOleksandr Andrushchenko 
37*c575b7eeSOleksandr Andrushchenko #endif /* __XEN_DRM_FRONT_CFG_H_ */
38