sisfb: limit POST memory test according to PCI resource length
authorAaro Koskinen <aaro.koskinen@iki.fi>
Wed, 10 Nov 2010 11:04:19 +0000 (13:04 +0200)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 10 Nov 2010 11:26:37 +0000 (20:26 +0900)
commit32ed3036c56284a720c0c00d92ee14bf609f497d
treedfde210bb1990a776894e1d2bd214f5a473a5177
parent7ac3d3ebf1f6e2051472150092a6d023043dd0f1
sisfb: limit POST memory test according to PCI resource length

If the POST memory test fails, the driver may access illegal
memory areas. Instead of hard coding the maximum size, set it
according to the PCI resource length (an additional check is needed in
sisfb_post_map_vram() to ensure it's big enough). DRAM sizing will later
adjust video_size to the correct value.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/sis/sis_main.c