]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 May 2013 18:38:30 +0000 (11:38 -0700)
commit6640a6a925014f7fbd38de65a377ee88e208d412
tree7a93718b90866123ea347fbf0bed6734eb8b4ddd
parent4aea296fc23c3d9645c09f3ec79ac916ba57787b
drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL register

commit fb70a6690875315a3a1454e52fa339441ee7612b upstream.

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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/mgag200/mgag200_mode.c