drm/radeon/kms: handle the case of no active displays properly in the bandwidth code
commitc1899005b1dc135bf42198ce65cfb52c22f5bdf9
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 2 Aug 2010 16:13:46 +0000 (2 12:13 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 18:09:22 +0000 (10 11:09 -0700)
tree0244e22bbf77cc0bece488004a68af0de8badab4
parent44437579efca258e3c4a09f59838c8f933611990
drm/radeon/kms: handle the case of no active displays properly in the bandwidth code

commit e06b14ee91a2ddefc9a67443a6cd8ee0fa800115 upstream.

Logic was:
if (mode0 && mode1)
else if (mode0)
else

Should be:
if (mode0 && mode1)
else if (mode0)
else if (mode1)

Otherwise we may end up calculating the priority regs with
unitialized values.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=16492

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv515.c