aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-12 08:53:37 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-08 05:23:53 -0400
commit23f09ce31ca68af3728ac5eed3e3efb03c5f990a (patch)
tree12ecc7a2794fa9853278edf1ea0499d65a3ec29a
parent5dcdbcb06badbdf2faa698bf3198e421a1e12840 (diff)
drm/i915/overlay: Make the overlay control struct opaque.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h24
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c23
3 files changed, 27 insertions, 28 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e4fb5364a533..0b400d1d2fe1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2224,11 +2224,11 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
2224static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable) 2224static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable)
2225{ 2225{
2226 if (!enable && intel_crtc->overlay) { 2226 if (!enable && intel_crtc->overlay) {
2227 struct intel_overlay *overlay = intel_crtc->overlay; 2227 struct drm_device *dev = intel_crtc->base.dev;
2228 2228
2229 mutex_lock(&overlay->dev->struct_mutex); 2229 mutex_lock(&dev->struct_mutex);
2230 (void) intel_overlay_switch_off(overlay, false); 2230 (void) intel_overlay_switch_off(intel_crtc->overlay, false);
2231 mutex_unlock(&overlay->dev->struct_mutex); 2231 mutex_unlock(&dev->struct_mutex);
2232 } 2232 }
2233 2233
2234 /* Let userspace switch the overlay on again. In most cases userspace 2234 /* Let userspace switch the overlay on again. In most cases userspace
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 44744537a0cf..949cfda4b49a 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -146,30 +146,6 @@ struct intel_connector {
146 struct drm_connector base; 146 struct drm_connector base;
147}; 147};
148 148
149struct intel_crtc;
150struct intel_overlay {
151 struct drm_device *dev;
152 struct intel_crtc *crtc;
153 struct drm_i915_gem_object *vid_bo;
154 struct drm_i915_gem_object *old_vid_bo;
155 int active;
156 int pfit_active;
157 u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */
158 u32 color_key;
159 u32 brightness, contrast, saturation;
160 u32 old_xscale, old_yscale;
161 /* register access */
162 u32 flip_addr;
163 struct drm_i915_gem_object *reg_bo;
164 /* flip handling */
165 uint32_t last_flip_req;
166 int hw_wedged;
167#define HW_WEDGED 1
168#define NEEDS_WAIT_FOR_FLIP 2
169#define RELEASE_OLD_VID 3
170#define SWITCH_OFF 4
171};
172
173struct intel_crtc { 149struct intel_crtc {
174 struct drm_crtc base; 150 struct drm_crtc base;
175 enum pipe pipe; 151 enum pipe pipe;
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index 3533355c5ea3..0a7d3e688060 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -170,6 +170,29 @@ struct overlay_registers {
170 u16 RESERVEDG[0x100 / 2 - N_HORIZ_UV_TAPS * N_PHASES]; 170 u16 RESERVEDG[0x100 / 2 - N_HORIZ_UV_TAPS * N_PHASES];
171}; 171};
172 172
173struct intel_overlay {
174 struct drm_device *dev;
175 struct intel_crtc *crtc;
176 struct drm_i915_gem_object *vid_bo;
177 struct drm_i915_gem_object *old_vid_bo;
178 int active;
179 int pfit_active;
180 u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */
181 u32 color_key;
182 u32 brightness, contrast, saturation;
183 u32 old_xscale, old_yscale;
184 /* register access */
185 u32 flip_addr;
186 struct drm_i915_gem_object *reg_bo;
187 /* flip handling */
188 uint32_t last_flip_req;
189 int hw_wedged;
190#define HW_WEDGED 1
191#define NEEDS_WAIT_FOR_FLIP 2
192#define RELEASE_OLD_VID 3
193#define SWITCH_OFF 4
194};
195
173static struct overlay_registers * 196static struct overlay_registers *
174intel_overlay_map_regs_atomic(struct intel_overlay *overlay, 197intel_overlay_map_regs_atomic(struct intel_overlay *overlay,
175 int slot) 198 int slot)