drm/i915: Fix FDI M/N setting according with correct color depth
commita9d48b3eae33aeb6bc1c366913778d77267e17b7
authorZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 25 Sep 2009 08:01:28 +0000 (25 08:01 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:22:36 +0000 (9 16:22 -0800)
tree059b8ba90c06b92d612a6d7c014816b1a981d1d6
parent61ac9e400eb6c0c3d3e9da24c78176fbe272fc1b
drm/i915: Fix FDI M/N setting according with correct color depth

commit 58a27471d00dc09945cbcfbbc5cbcdcd3c28211d upstream.

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.

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