"Richard Schwarting" <[EMAIL PROTECTED]> writes:

> Thank you, again.
>
> Yes, the MTRR errors do not appear to be fatal.
>
> Option "UseBIOS" "off" makes a big difference.  The screen is no
> longer just black, and I can see a background and the moving cursor!
> However, it is as though the hsync and vsync are terribly off- as the
> display is quite a bit off-centre, wraps around the screen, is
> sometimes repeated along the horizontal, and has visible moving scan
> lines.
>
Hi, I think I have reproduced your problem, maybe the offset display is
because screen centering is active on server start up.

If so, the patch I'm attaching will probably solve it.

BTW, I wonder if the UseBIOS option should default to off, with all
these laptops with broken bioses.

> I have uploaded a copy of my Xorg.0.log using the "UseBIOS" "off" and
> using -logverbose 7 to the bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=18816
>
> I will replace it with one with SMI_DEBUG defined this afternoon (I
> didn't have time this morning :D).
>
> I will also try different combinations of modes and v/hsync, though
> I'm wondering whether the offset weird display is actually caused by
> incorrectly set values for them, as I've tried rates that had worked
> previously.
>
> Cheers,
>   Richard Schwarting
>
> On Tue, Dec 2, 2008 at 04:48, Francisco Jerez <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> "Richard Schwarting" <[EMAIL PROTECTED]> writes:
>>
>>> Thanks for the responses.
>>>
>>> == Silicon Motion from git ==
>>>
>>> Yes Francisco, I've tried the latest code from
>>> git://anongit.freedesktop.org/xorg/driver/xf86-video-siliconmotion and
>>> that led to what I thought was the same error, since I was still left
>>> with a blank screen, but now I see that it is differently.
>>>
>>> Having just recompiled that driver, I get the following when running:
>>> (==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec  2 00:24:54 2008
>>> (==) Using config file: "/etc/X11/xorg.conf"
>>> error setting MTRR (base = 0x14200000, size = 0x00800000, type = 1)
>>> Invalid argument (22)
>>> error setting MTRR (base = 0x14200000, size = 0x00800000, type = 1)
>>> Invalid argument (22)
>>> error setting MTRR (base = 0x14200000, size = 0x00800000, type = 1)
>>> Invalid argument (22)
>>>
>> That happened because the SM720 framebuffer aperture is misaligned, I
>> think the old pci layer code handled that automatically and split the
>> memory range across several MTRRs.
>>
>> That error is worrisome, but it shouldn't be fatal. I think I'll have
>> a look at it soon.
>>
>>> Of course, I should perhaps try the recent git silicon motion driver
>>> with the current Xorg server in git, so I'm leaving that to set up
>>> overnight.
>>>
>>> note: The vesa driver doesn't work with this card for me either right now.
>>>
>>> == MTRR error context ==
>>>
>>> For some added context, that error "error setting MTRR" appears to
>>> come from the function "pci_device_linux_sysfs_map_range(...)" from
>>> libpciaccess's linux_sysfs.c which appears to get called as a method
>>> "map_range" of a structure of struct pci_system_methods
>>> linux_sysfs_methods.
>>>
>>> I think this would be the map_range that's being called in
>>> libpciaccess's pci_device_map_range in the lines:
>>> err = (*pci_sys->methods->map_range)(dev,
>>>                                              &mappings[devp->num_mappings]);
>>> I'll try to verify that tomorrow.
>>>
>>> == Xorg.0.log ==
>>>
>>> For the Xorg.0.log from a run with the Xorg server packaged in Ubuntu
>>> 8.10 and the current Silicon Motion driver from git, I've attached it
>>> to:
>>> https://bugs.freedesktop.org/attachment.cgi?bugid=18816
>>>
>>
>> I had a look at it, and I suspect that you could get it working
>> again by using Option "UseBIOS" "off" (or maybe Option "NoAccel") in
>> the device config file section, but I don't exactly know what is going
>> on. Could you send a more verbose log, e.g. with the "-logverbose 7"
>> server option, and maybe rebuild the driver with "-DSMI_DEBUG" among
>> the CFLAGS?
>>
>>> == Random Thoughts ==
>>>
>>> Since I think this is the same issue I encountered with Fedora 9 at
>>> the start of the summer, I'm wondering whether I'm the only Linux user
>>> left using this particular card or whether the others are just
>>> avoiding the current X (or whether my system is in a faulty
>>> configuration) :D
>>
> _______________________________________________
> xorg mailing list
> xorg@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg

From 807acefdabf3970ab51ced71d66eb366cc0c537b Mon Sep 17 00:00:00 2001
From: Francisco Jerez <[EMAIL PROTECTED]>
Date: Tue, 2 Dec 2008 23:43:26 +0100
Subject: [PATCH] Disable screen centering on mode initialization.

---
 src/smilynx_hw.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/smilynx_hw.c b/src/smilynx_hw.c
index 4b6c121..f15a436 100644
--- a/src/smilynx_hw.c
+++ b/src/smilynx_hw.c
@@ -45,7 +45,7 @@ SMILynx_HWInit(ScrnInfoPtr pScrn)
     int		vgaCRIndex = vgaIOBase + VGA_CRTC_INDEX_OFFSET;
     int		vgaCRData  = vgaIOBase + VGA_CRTC_DATA_OFFSET;
     CARD8 SR17, SR20, SR21, SR22, SR24, SR30, SR31, SR32, SR34,
-	SR66, SR68, SR69, SR6A, SR6B;
+	SR66, SR68, SR69, SR6A, SR6B, CR9E;
 
     ENTER();
 
@@ -63,6 +63,7 @@ SMILynx_HWInit(ScrnInfoPtr pScrn)
     SR69 = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX,VGA_SEQ_DATA,0x69);
     SR6A = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX,VGA_SEQ_DATA,0x6A);
     SR6B = VGAIN8_INDEX(pSmi, VGA_SEQ_INDEX,VGA_SEQ_DATA,0x6B);
+    CR9E = VGAIN8_INDEX(pSmi, vgaCRIndex,vgaCRData,0x9E);
 
     if (pSmi->PCIBurst) {
 	SR17 |= 0x20;
@@ -108,6 +109,9 @@ SMILynx_HWInit(ScrnInfoPtr pScrn)
 	SR34 |= 0x80;
     }
 
+    /* Disable Vertical Expansion/Vertical Centering/Horizontal Centering */
+    CR9E &= ~0x7;
+
     /* Program MCLK */
     if (pSmi->MCLK > 0)
 	SMI_CommonCalcClock(pScrn->scrnIndex, pSmi->MCLK,
@@ -150,6 +154,7 @@ SMILynx_HWInit(ScrnInfoPtr pScrn)
     VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX,VGA_SEQ_DATA,0xA0, 0x00);
     VGAOUT8_INDEX(pSmi, vgaCRIndex, vgaCRData, 0x33, 0x00);
     VGAOUT8_INDEX(pSmi, vgaCRIndex, vgaCRData, 0x3A, 0x00);
+    VGAOUT8_INDEX(pSmi, vgaCRIndex, vgaCRData,0x9E, CR9E);
 
     LEAVE(TRUE);
 }
-- 
1.5.6.5

Attachment: pgpYC8VH9yNNy.pgp
Description: PGP signature

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to