Bug 14440 - [830] kernel 2.6.24 regression: Couldn't bind memory for ring buffer
Summary: [830] kernel 2.6.24 regression: Couldn't bind memory for ring buffer
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.3 (2007.09)
Hardware: Other All
: medium normal
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-09 02:14 UTC by Brice Goglin
Modified: 2008-02-14 21:35 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
830m stolen mem mask fix (442 bytes, patch)
2008-02-14 06:42 UTC, Wang Zhenyu
no flags Details | Splinter Review
BIOS unchanged (32.05 KB, text/plain)
2008-02-14 21:28 UTC, Joerg Platte
no flags Details
BIOS settings (311.04 KB, image/jpeg)
2008-02-14 21:30 UTC, Joerg Platte
no flags Details
Xorg log when setting "VGA fram buffer size" to 8 M (31.99 KB, text/plain)
2008-02-14 21:32 UTC, Joerg Platte
no flags Details

Description Brice Goglin 2008-02-09 02:14:21 UTC
Bug reported by Joerg Platte on the Debian BTS yesterday. He using 2.2.0.90.
(we discussed this issue a bit with Jesse Barnes yesterday)


"On my S100 equipped with an 82830 CGC graphic controller X is not able to start when booting with a 2.6.24 kernel. With the same configuration and a 2.6.23 kernel X starts normally."

The log is available at
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=464661

The dmesg output of 2.6.23 (-rc6 actually) is visible at
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=dmesg.working;att=2;bug=464661
and the one of 2.6.24 at
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=dmesg;att=1;bug=464661

The dmesg diff contains things like
 Linux agpgart interface v0.102
 agpgart: Detected an Intel 830M Chipset.
-agpgart: No pre-allocated video memory detected.
+agpgart: Detected 8060K stolen memory.
 agpgart: AGP aperture is 128M @ 0xf0000000
[...]
 [drm] Initialized i915 1.6.0 20060119 on minor 0
 ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKA] -> GSI 7 (level, low) -> IRQ 7
 [drm] Initialized i915 1.6.0 20060119 on minor 1
+agpgart: pg_start == 0x00000000,intel_private.gtt_entries == 0x000007df
+agpgart: Trying to insert into local/stolen memory

Joerg also said:
"Hmmm, the computer is a set top box with only 128 MB of memory."
and
"Maybe it is related to this bug:
http://kerneltrap.org/mailarchive/linux-kernel/2007/10/5/330704"
Comment 1 Wang Zhenyu 2008-02-11 06:58:03 UTC
Have you changed any bios setting?

G33 issue is not relevant here.

Could you try to test by revert this commit or change it by hand?
(ignore G33 line above it, which was reverted later.) I don't know
if I had something to confuse Dave, I'll check the doc any way.

commit e67aa27a6179c287983c6c525beb5320f5cd1672
Author: Dave Airlie <airlied@linux.ie>
Date:   Tue Sep 18 22:46:35 2007 -0700

    intel-agp: Fix i830 mask variable that changed with G33 support

    The mask on i830 should be 0x70 always, later chips 0xF0 should be okay.

    Signed-off-by: Dave Airlie <airlied@linux.ie>
    Acked-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
    Cc: Michael Haas <laga@laga.ath.cx>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 7c69bf2..a5d0e95 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -511,7 +511,7 @@ static void intel_i830_init_gtt_entries(void)
                 */
                if (IS_G33)
                        size = 0;
-               switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
+               switch (gmch_ctrl & I855_GMCH_GMS_MASK) {
                case I855_GMCH_GMS_STOLEN_1M:
                        gtt_entries = MB(1) - KB(size);
                        break;

Comment 2 Joerg Platte 2008-02-11 09:50:35 UTC
I changed in back to
                }
        } else {
                switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
                case I855_GMCH_GMS_STOLEN_1M:
                        gtt_entries = MB(1) - KB(size);

but this does not help. X does not start and the error message is still the same. 

I did not change any BIOS settings.
Comment 3 Gordon Jin 2008-02-14 00:02:50 UTC
So it seems not an xf86-video-intel issue, but a kernel issue. Anyway, we can continue to track it here.
Comment 4 Wang Zhenyu 2008-02-14 06:41:56 UTC
(In reply to comment #2)
> I changed in back to
>                 }
>         } else {
>                 switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
>                 case I855_GMCH_GMS_STOLEN_1M:
>                         gtt_entries = MB(1) - KB(size);
> 
> but this does not help. X does not start and the error message is still the
> same. 

yeah, I misread the code, that line doesn't apply to 830M chipset.

So the problem seems with 830M stolen memory size mask, with the I830_GMCH_GMS_MASK change in 2.6.24, kernel agpgart now should detect real stolen mem size which fixed the origin check error. But this change hasn't been applied to intel video driver yet.

I don't have 830M GMCH data sheet by hand, will double-check later. Could you try below patch against xf86-video-intel driver?
Comment 5 Wang Zhenyu 2008-02-14 06:42:51 UTC
Created attachment 14308 [details] [review]
830m stolen mem mask fix
Comment 6 Joerg Platte 2008-02-14 13:57:07 UTC
I applied the patch to the current debian sources (version 2.2.0.90-3). The patch fixes the problem. X now starts again without an error message! Thank you very much!
Comment 7 Wang Zhenyu 2008-02-14 19:19:51 UTC
Could you attach your current fine X log? And could you help me to check your bios setting to see if your stolen memory size config is 8M really?

I'd like to check with other chips to fully fix this stolen size detect problem. Thanks.
Comment 8 Joerg Platte 2008-02-14 21:28:21 UTC
Created attachment 14325 [details]
BIOS unchanged

The BIOS settings were unchanged (factory default) for this config.
Comment 9 Joerg Platte 2008-02-14 21:30:34 UTC
Created attachment 14326 [details]
BIOS settings
Comment 10 Joerg Platte 2008-02-14 21:32:10 UTC
Created attachment 14327 [details]
Xorg log when setting "VGA fram buffer size" to 8 M
Comment 11 Wang Zhenyu 2008-02-14 21:35:14 UTC
ok, thanks for the info. 

The patch has been pushed upstream.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.