Input: xpad - add support for Xbox1 PDP Camo series gamepad
[linux/fpc-iii.git] / drivers / gpu / drm / sti / sti_mixer.h
blob830a3c42d88646dfcc670788f1db7c584dd64e74
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 */
9 #ifndef _STI_MIXER_H_
10 #define _STI_MIXER_H_
12 #include <drm/drmP.h>
14 #include "sti_plane.h"
16 #define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
18 enum sti_mixer_status {
19 STI_MIXER_READY,
20 STI_MIXER_DISABLING,
21 STI_MIXER_DISABLED,
24 /**
25 * STI Mixer subdevice structure
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
34 struct 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;
43 const char *sti_mixer_to_str(struct sti_mixer *mixer);
45 struct sti_mixer *sti_mixer_create(struct device *dev,
46 struct drm_device *drm_dev,
47 int id,
48 void __iomem *baseaddr);
50 int sti_mixer_set_plane_status(struct sti_mixer *mixer,
51 struct sti_plane *plane, bool status);
52 int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
53 int sti_mixer_active_video_area(struct sti_mixer *mixer,
54 struct drm_display_mode *mode);
56 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
58 int sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor);
60 /* depth in Cross-bar control = z order */
61 #define GAM_MIXER_NB_DEPTH_LEVEL 6
63 #define STI_MIXER_MAIN 0
64 #define STI_MIXER_AUX 1
66 #endif