]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL register
authorChristopher Harvey <charvey@matrox.com>
Fri, 12 Apr 2013 22:24:05 +0000 (22:24 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 13 May 2013 02:17:22 +0000 (12:17 +1000)
commitb722a68c3b18c2ac73f3a06b1ecc6775d07e6993
tree21eddb213800b04e9b3a825a5158cb1c113ea3e8
parent5ed24569031aa0aa0d86286580de64269a96581a
drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL register

The original line,
  WREG_DAC(MGA1064_PIX_CLK_CTL_CLK_DIS, tmp);
wrote tmp into MGA1064_PIX_CLK_CTL_CLK_DIS, where
MGA1064_PIX_CLK_CTL_CLK_DIS is an offset into
MGA1064_PIX_CLK_CTL. Change the line to write properly into
MGA1064_PIX_CLK_CTL. There were other chunks of code nearby that use
the same pattern (but work correctly), so this patch updates them all
to use this new (slightly more efficient) write pattern. The WREG_DAC
macro was causing the DAC_INDEX register to be set to the same value
twice. WREG8(DAC_DATA, foo) takes advantage of the fact that DAC_INDEX
is already at the value we want.

Signed-off-by: Christopher Harvey <charvey@matrox.com>
Acked-by: Julia Lemire <jlemire@matrox.com>
Tested-by: Julia Lemire <jlemire@matrox.com>
Acked-by: Mathieu Larouche <mathieu.larouche@matrox.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/mgag200/mgag200_mode.c