]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
drm/i915/overlay: Make the overlay control struct opaque.
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Aug 2010 12:53:37 +0000 (13:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Sep 2010 09:23:53 +0000 (10:23 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_overlay.c

index e4fb5364a5331bac4f6af8d96390706a6606dfd5..0b400d1d2fe1149a5e823946349a25295476b6d7 100644 (file)
@@ -2224,11 +2224,11 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
 static void intel_crtc_dpms_overlay(struct intel_crtc *intel_crtc, bool enable)
 {
        if (!enable && intel_crtc->overlay) {
-               struct intel_overlay *overlay = intel_crtc->overlay;
+               struct drm_device *dev = intel_crtc->base.dev;
 
-               mutex_lock(&overlay->dev->struct_mutex);
-               (void) intel_overlay_switch_off(overlay, false);
-               mutex_unlock(&overlay->dev->struct_mutex);
+               mutex_lock(&dev->struct_mutex);
+               (void) intel_overlay_switch_off(intel_crtc->overlay, false);
+               mutex_unlock(&dev->struct_mutex);
        }
 
        /* Let userspace switch the overlay on again. In most cases userspace
index 44744537a0cf054cc077ec387b65d1180e1fb55b..949cfda4b49a383bf1a468523bd14c5b3586f0af 100644 (file)
@@ -146,30 +146,6 @@ struct intel_connector {
        struct drm_connector base;
 };
 
-struct intel_crtc;
-struct intel_overlay {
-       struct drm_device *dev;
-       struct intel_crtc *crtc;
-       struct drm_i915_gem_object *vid_bo;
-       struct drm_i915_gem_object *old_vid_bo;
-       int active;
-       int pfit_active;
-       u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */
-       u32 color_key;
-       u32 brightness, contrast, saturation;
-       u32 old_xscale, old_yscale;
-       /* register access */
-       u32 flip_addr;
-       struct drm_i915_gem_object *reg_bo;
-       /* flip handling */
-       uint32_t last_flip_req;
-       int hw_wedged;
-#define HW_WEDGED              1
-#define NEEDS_WAIT_FOR_FLIP    2
-#define RELEASE_OLD_VID                3
-#define SWITCH_OFF             4
-};
-
 struct intel_crtc {
        struct drm_crtc base;
        enum pipe pipe;
index 3533355c5ea342b8cd278652e76d3a815488ff5c..0a7d3e688060d59efa03aba772aef823cdf78563 100644 (file)
@@ -170,6 +170,29 @@ struct overlay_registers {
     u16 RESERVEDG[0x100 / 2 - N_HORIZ_UV_TAPS * N_PHASES];
 };
 
+struct intel_overlay {
+       struct drm_device *dev;
+       struct intel_crtc *crtc;
+       struct drm_i915_gem_object *vid_bo;
+       struct drm_i915_gem_object *old_vid_bo;
+       int active;
+       int pfit_active;
+       u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */
+       u32 color_key;
+       u32 brightness, contrast, saturation;
+       u32 old_xscale, old_yscale;
+       /* register access */
+       u32 flip_addr;
+       struct drm_i915_gem_object *reg_bo;
+       /* flip handling */
+       uint32_t last_flip_req;
+       int hw_wedged;
+#define HW_WEDGED              1
+#define NEEDS_WAIT_FOR_FLIP    2
+#define RELEASE_OLD_VID                3
+#define SWITCH_OFF             4
+};
+
 static struct overlay_registers *
 intel_overlay_map_regs_atomic(struct intel_overlay *overlay,
                              int slot)