Linux Audio

Check our new training course

Loading...
v5.14.15
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright (C) STMicroelectronics SA 2014
 4 * Authors: Benjamin Gaignard <benjamin.gaignard@st.com>
 5 *          Fabien Dessenne <fabien.dessenne@st.com>
 6 *          for STMicroelectronics.
 
 7 */
 8
 9#ifndef _STI_MIXER_H_
10#define _STI_MIXER_H_
11
12#include <drm/drm_crtc.h>
13
14#include <drm/drm_debugfs.h>
15#include <drm/drm_file.h>
16
17#include "sti_plane.h"
18
19struct device;
20
21#define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
22
23enum sti_mixer_status {
24	STI_MIXER_READY,
25	STI_MIXER_DISABLING,
26	STI_MIXER_DISABLED,
27};
28
29/**
30 * STI Mixer subdevice structure
31 *
32 * @dev: driver device
33 * @regs: mixer registers
34 * @id: id of the mixer
35 * @drm_crtc: crtc object link to the mixer
 
36 * @status: to know the status of the mixer
37 */
38struct sti_mixer {
39	struct device *dev;
40	void __iomem *regs;
41	int id;
42	struct drm_crtc drm_crtc;
 
43	enum sti_mixer_status status;
44};
45
46const char *sti_mixer_to_str(struct sti_mixer *mixer);
47
48struct sti_mixer *sti_mixer_create(struct device *dev,
49				   struct drm_device *drm_dev,
50				   int id,
51				   void __iomem *baseaddr);
52
53int sti_mixer_set_plane_status(struct sti_mixer *mixer,
54			       struct sti_plane *plane, bool status);
55int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
56int sti_mixer_active_video_area(struct sti_mixer *mixer,
57				struct drm_display_mode *mode);
58
59void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
60
61void sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor);
62
63/* depth in Cross-bar control = z order */
64#define GAM_MIXER_NB_DEPTH_LEVEL 6
65
66#define STI_MIXER_MAIN 0
67#define STI_MIXER_AUX  1
68
69#endif
v4.10.11
 
 1/*
 2 * Copyright (C) STMicroelectronics SA 2014
 3 * Authors: Benjamin Gaignard <benjamin.gaignard@st.com>
 4 *          Fabien Dessenne <fabien.dessenne@st.com>
 5 *          for STMicroelectronics.
 6 * License terms:  GNU General Public License (GPL), version 2
 7 */
 8
 9#ifndef _STI_MIXER_H_
10#define _STI_MIXER_H_
11
12#include <drm/drmP.h>
 
 
 
13
14#include "sti_plane.h"
15
 
 
16#define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
17
18enum sti_mixer_status {
19	STI_MIXER_READY,
20	STI_MIXER_DISABLING,
21	STI_MIXER_DISABLED,
22};
23
24/**
25 * STI Mixer subdevice structure
26 *
27 * @dev: driver device
28 * @regs: mixer registers
29 * @id: id of the mixer
30 * @drm_crtc: crtc object link to the mixer
31 * @pending_event: set if a flip event is pending on crtc
32 * @status: to know the status of the mixer
33 */
34struct sti_mixer {
35	struct device *dev;
36	void __iomem *regs;
37	int id;
38	struct drm_crtc drm_crtc;
39	struct drm_pending_vblank_event *pending_event;
40	enum sti_mixer_status status;
41};
42
43const char *sti_mixer_to_str(struct sti_mixer *mixer);
44
45struct sti_mixer *sti_mixer_create(struct device *dev,
46				   struct drm_device *drm_dev,
47				   int id,
48				   void __iomem *baseaddr);
49
50int sti_mixer_set_plane_status(struct sti_mixer *mixer,
51			       struct sti_plane *plane, bool status);
52int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
53int sti_mixer_active_video_area(struct sti_mixer *mixer,
54				struct drm_display_mode *mode);
55
56void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
57
58int sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor);
59
60/* depth in Cross-bar control = z order */
61#define GAM_MIXER_NB_DEPTH_LEVEL 6
62
63#define STI_MIXER_MAIN 0
64#define STI_MIXER_AUX  1
65
66#endif