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)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Apr 2012 17:23:02 +0000 (19:23 +0200)
commitc4867936474183332db4c19791a65fdad6474fd5
tree1c6c943a8186935b42e02e9adc521cc506cf4e85
parent14667a4bde4361b7ac420d68a2e9e9b9b2df5231
drm/i915: properly compute dp dithering for user-created modes

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>
drivers/gpu/drm/i915/intel_dp.c