drm/i915: properly compute dp dithering for user-created modes
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Apr 2012 08:42:36 +0000 (10:42 +0200)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:05 +0000 (19:15 +0100)
commit5de0bbeb0ccfa586ddbbbb0ea53560e13c2b5067
treeccbe5df7cf9010e13ed4201e1cfb2ffaafdfc55f
parentc7453cc8e201677d4696c82db42041fa0146f6de
drm/i915: properly compute dp dithering for user-created modes

BugLink: http://bugs.launchpad.net/bugs/987337

commit c4867936474183332db4c19791a65fdad6474fd5 upstream.

We've only computed whether we need to fall back to 6bpc due to dp
link bandwidth constrains in mode_valid, but not mode_fixup. Under
various circumstances X likes to create new modes which then lack
proper 6bpc flags (if required), resulting in mode_fixup failures and
ultimately black screens.

Chris Wilson pointed out that we still get things wrong for bpp > 24,
but that should be fixed in another patch (and it'll be easier because
this patch consolidates the logic).

The likely culprit for this regression is

commit 3d794f87238f74d80e78a7611c7fbde8a54c85c2
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jan 25 08:16:25 2012 -0800

    drm/i915: Force explicit bpp selection for intel_dp_link_required

v2: Fix indentation and tune down the too bold claim that this should
fix the world. Both noticed by Chris Wilson.

v3: Try to really git add things.

Reported-and-tested-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48170
Cc: stable@kernel.org
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/i915/intel_dp.c