drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer
[deliverable/linux.git] / drivers / gpu / drm / sti / sti_mixer.h
CommitLineData
e21e2193
BG
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
9e1f05b2 14#include "sti_plane.h"
e21e2193
BG
15
16#define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
17
29d1dc62
VA
18enum sti_mixer_status {
19 STI_MIXER_READY,
20 STI_MIXER_DISABLING,
21 STI_MIXER_DISABLED,
22};
23
e21e2193
BG
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
29d1dc62 32 * @status: to know the status of the mixer
e21e2193
BG
33 */
34struct sti_mixer {
35 struct device *dev;
36 void __iomem *regs;
37 int id;
871bcdfe 38 struct drm_crtc drm_crtc;
e21e2193 39 struct drm_pending_vblank_event *pending_event;
29d1dc62 40 enum sti_mixer_status status;
e21e2193
BG
41};
42
43const char *sti_mixer_to_str(struct sti_mixer *mixer);
44
45struct sti_mixer *sti_mixer_create(struct device *dev, int id,
871bcdfe 46 void __iomem *baseaddr);
e21e2193 47
871bcdfe
VA
48int sti_mixer_set_plane_status(struct sti_mixer *mixer,
49 struct sti_plane *plane, bool status);
871bcdfe 50int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
e21e2193 51int sti_mixer_active_video_area(struct sti_mixer *mixer,
871bcdfe 52 struct drm_display_mode *mode);
e21e2193
BG
53
54void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
55
56/* depth in Cross-bar control = z order */
bf60b29f 57#define GAM_MIXER_NB_DEPTH_LEVEL 6
e21e2193
BG
58
59#define STI_MIXER_MAIN 0
60#define STI_MIXER_AUX 1
61
62#endif
This page took 0.107726 seconds and 5 git commands to generate.