[Openchrome-devel] [Bug 94473] DRM / KMS bootup error on VX900 platform

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 17 16:20:56 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94473

--- Comment #27 from Kevin Brace <kevinbrace at gmx.com> ---
Hi Frank,

(In reply to HuangRan from comment #22)
> With further kernel debugging, we found that in via_driver_load() function,
> it has the code as below:
> #if __OS_HAS_AGP
> 	if ((dev_priv->engine_type > VIA_ENG_H2) ||
> 	    (dev->agp && drm_pci_device_is_agp(dev))) {
> 		ret = via_detect_agp(dev);
> 		if (!ret)
> 			via_agp_engine_init(dev_priv);
> 		else
> 			DRM_ERROR("Failed to allocate AGP\n");
> 	}
> #endif
> 
> Actually dev->agp is NULL for VX900. But because dev_priv->engine_type value
> is greater than VIA_ENG_H2, via_detect_agp() is called.
> I am not sure what does engine_type mean? Can anybody give some comments?
> And why is it related to AGP detect?
> 
> Thanks,
> Frank

Regarding this if statement in question,

     if ((dev_priv->engine_type > VIA_ENG_H2) ||
         (dev->agp && drm_pci_device_is_agp(dev))) {

Every VIA IGP is considered an AGP device, if I am correct.
This might not be true for Chrome 9, however.
In fact, many IGPs "look" like an AGP device, at least from the OS.
In other words, even the ones without an external AGP slot, at least from the
OS, looks like an AGP device.
Since almost every VIA IGPs are AGP devices, perhaps we can rewrite the code
like this.

     if (dev->agp && drm_pci_device_is_agp(dev)) {

Regarding the "> VIA_ENG_H2" part, it appears to mean Chrome 9.
However, these are still considered AGP devices, if I am correct.
Personally, I do not see a compelling reason why this line has to be part of
the if statement.

(dev_priv->engine_type > VIA_ENG_H2)

Why not you remove the above line, and see what happens?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/openchrome-devel/attachments/20160317/23a67566/attachment-0001.html>


More information about the Openchrome-devel mailing list