]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: fix panel fitting filter coefficient select for Ironlake
authorZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 19 Oct 2009 07:43:49 +0000 (15:43 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:22:38 +0000 (16:22 -0800)
commit b1f60b7029989da71fd8ea1b1176480fac9e846c upstream.

Must set filter selection as hardcoded coefficients for medium 3x3
filtering, which matches vbios setting for Ironlake.

This fixes display corrupt issue on HP arrandale with new vbios.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c

index dd14c27e806eefb6df053064a8df8f6c106e5cd9..c017fa18566be76286d58c14aa6253af35d96e7e 100644 (file)
 #define PFA_CTL_1               0x68080
 #define PFB_CTL_1               0x68880
 #define  PF_ENABLE              (1<<31)
+#define  PF_FILTER_MASK                (3<<23)
+#define  PF_FILTER_PROGRAMMED  (0<<23)
+#define  PF_FILTER_MED_3x3     (1<<23)
+#define  PF_FILTER_EDGE_ENHANCE        (2<<23)
+#define  PF_FILTER_EDGE_SOFTEN (3<<23)
 #define PFA_WIN_SZ             0x68074
 #define PFB_WIN_SZ             0x68874
 #define PFA_WIN_POS            0x68070
index 8f2cd74c575f5f636353448ee885495cae5e9bf4..318ba47724460cceb2d21094a4f9b389d7944e66 100644 (file)
@@ -1213,7 +1213,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
                /* Enable panel fitting for LVDS */
                if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
                        temp = I915_READ(pf_ctl_reg);
-                       I915_WRITE(pf_ctl_reg, temp | PF_ENABLE);
+                       I915_WRITE(pf_ctl_reg, temp | PF_ENABLE | PF_FILTER_MED_3x3);
 
                        /* currently full aspect */
                        I915_WRITE(pf_win_pos, 0);