Re: Problem with commit drm/i915: Fix detection of base of stolen memory in 3.2.45

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On ven., 2013-05-17 at 14:42 +0200, Yves-Alexis Perez wrote:
> On at least two boxes (Dell E4300 with GMA4500 and Thinkpad T61 with
> i965), as soon as i915 is loaded, backlight is switched of and doesn't
> reappear. The systems works fine, just no display.
> 
> Dmesg of a boot with drm.debug=0xf is attached. Note that it seems
> that
> "found %d bytes of stolen memory at %08lx\n" message is never printed,
> so I guess i915_stolen_to_physical() somehow returns 0 but I didn't
> yet
> instrumented the code to check that.
> 
> My guess would be that if base of stolen memory is not correctly
> detected
> on these boxes and then the aperture is too small for anything (thus
> the *ERROR* message).

I've tried to instrument the code a little to see what happens.

	base = 0;
	if (INTEL_INFO(dev)->gen >= 6) {
		/* Read Base Data of Stolen Memory Register (BDSM) directly.
		 * Note that there is also a MCHBAR miror at 0x1080c0 or
		 * we could use device 2:0x5c instead.
		*/
		pci_read_config_dword(pdev, 0xB0, &base);
		base &= ~4095; /* lower bits used for locking register */
	} else if (INTEL_INFO(dev)->gen > 3 || IS_G33(dev)) {
		/* Read Graphics Base of Stolen Memory directly */
		pci_read_config_dword(pdev, 0xA4, &base);
	}

	return base;

GMA4500 is gen4 so it uses the else branch and reads the register A4.
In both 3.2.45 and 3.8.13 (and I guess mainline), the register returns
0, so it seems that the bug happens later.

Note that I'm not sure if it's related, but documentation for my
chipset doesn't list anything at register A4, so it makes sense it's
all 0. But that doesn't mean I don't have stolen memory. On
00:02.1:0x5c the BSM register is available and has the value
0x7e000000.

Hope that helps,
-- 
Yves-Alexis

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]