drm/i915: Fix FDI M/N setting according with correct color depth
authorZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 25 Sep 2009 08:01:28 +0000 (08:01 +0000)
committerEric Anholt <eric@anholt.net>
Tue, 13 Oct 2009 17:57:10 +0000 (10:57 -0700)
commit58a27471d00dc09945cbcfbbc5cbcdcd3c28211d
treef1679ecad026b8f6cb6440156167808195543881
parentc03342fa6d4617a77cb867ee0ec71665d520eb69
drm/i915: Fix FDI M/N setting according with correct color depth

FDI M/N calculation hasn't taken the current pipe color depth into account,
but always set as 24bpp. This one checks current pipe color depth setting,
and change FDI M/N calculation a little to use bits_per_pixel first, then
convert to bytes_per_pixel later.

This fixes display corrupt issue on Arrandle LVDS with 1600x900 panel
in 18bpp dual-channel mode.

Cc: Stable Team <stable@kernel.org>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c