gfx: overlay: Clip the overlay correctly
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Mar 2012 13:25:44 +0000 (15:25 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:46 +0000 (12:30 +0300)
When the panel fitter is used the overlay output is scaled by the panel
fitter as well. So to correctly clip the overlay to the screen edges
user the information in crtc->mode instead of crtc->hwmode.

Issue: ANDROID-1462
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/staging/mrst/drv/mdfld_overlay.c

index c4e7f5d..cb346a1 100644 (file)
@@ -911,8 +911,8 @@ mfld_overlay_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, struct
 
        r = ovl_config_init(&c, crtc_x, crtc_y, crtc_w, crtc_h,
                            src_x, src_y, src_w, src_h,
-                           0, 0, crtc->hwmode.crtc_hdisplay,
-                           crtc->hwmode.crtc_vdisplay,
+                           0, 0, crtc->mode.crtc_hdisplay,
+                           crtc->mode.crtc_vdisplay,
                            plane->opts.chroma_siting, fb);
        if (r)
                return r;