drm/i915: No panel fitter on 830M or non-mobile gen2/3 platforms
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 10 Jan 2014 12:06:45 +0000 (14:06 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Jan 2014 17:03:17 +0000 (18:03 +0100)
PFIT_CONTROL doesn't exist on 830M, so avoid reading it in
i9xx_get_pfit_config().

Also assume that only mobile gen2/3 chipsets have a panel fitter. This
matches the documentation, but I didn't have real hardware to verify.

Gen4 docmentation is a bit inconsistent, but experimenetation on my
LPT machine suggests that the panel fitter is available on non-mobile
gen4 platforms. At least on this machine panel fitter appears works
just fine even on VGA output.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_overlay.c

index fe2d71a1c39e6aec35e39b3b8f3ef13ce24e806a..db1e0a4eb35974f0fd57e08ac1084e436884fdeb 100644 (file)
@@ -5439,6 +5439,9 @@ static void i9xx_get_pfit_config(struct intel_crtc *crtc,
        struct drm_i915_private *dev_priv = dev->dev_private;
        uint32_t tmp;
 
+       if (INTEL_INFO(dev)->gen <= 3 && (IS_I830(dev) || !IS_MOBILE(dev)))
+               return;
+
        tmp = I915_READ(PFIT_CONTROL);
        if (!(tmp & PFIT_ENABLE))
                return;
index a98a990fbab3561368239ce7a7ac020c1d44f0c7..a759ecdb7a6ebaddee622ffd5a1d7900fcf5aee3 100644 (file)
@@ -1005,7 +1005,7 @@ static int intel_panel_fitter_pipe(struct drm_device *dev)
        u32  pfit_control;
 
        /* i830 doesn't have a panel fitter */
-       if (IS_I830(dev))
+       if (INTEL_INFO(dev)->gen <= 3 && (IS_I830(dev) || !IS_MOBILE(dev)))
                return -1;
 
        pfit_control = I915_READ(PFIT_CONTROL);