From ef6e8980e3fcbb7b7ea0b883560258fd2a86494a Mon Sep 17 00:00:00 2001 From: Zhang Le Date: Sun, 3 May 2009 16:57:17 +0800 Subject: [PATCH] Set videoram size for SMI_LYNXEMplus The videoram size is used for one pci_device_map_range in smi_driver.c. The value 2Mb is calculated and is wrong. There is another pci_device_map_range in the same file. That one used pSmi->MapSize, which is correct, i.e. 4Mb. So, the result is like this in /proc/$(pidof X)/maps 2b3d4000-2b7d4000 rw-s 50400000 00:00 4379 /sys/devices/pci0000:00/0000:00:08.0/resource0 2b7d4000-2b9d4000 rw-s 50000000 00:00 4379 /sys/devices/pci0000:00/0000:00:08.0/resource0 This results in segfaults when trying to draw the lower part of the screen. To fix this, I hard coded the video ram size for LYNXEMplus. Signed-off-by: Zhang Le --- src/smi_driver.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/smi_driver.c b/src/smi_driver.c index ac1a952..a92981e 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1453,6 +1453,9 @@ SMI_DetectMem(ScrnInfoPtr pScrn) pSmi->videoRAMKBytes = lynx3d_table[config >> 6] * 1024 + 512; break; + case SMI_LYNXEMplus: + pSmi->videoRAMKBytes = 4 * 1024; + break; case SMI_LYNX3DM: pSmi->videoRAMKBytes = lynx3dm_table[config >> 6] * 1024; break; -- 1.6.2.3