<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - DRM / KMS bootup error on VX900 platform"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94473#c27">Comment # 27</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - DRM / KMS bootup error on VX900 platform"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94473">bug 94473</a>
              from <span class="vcard"><a class="email" href="mailto:kevinbrace@gmx.com" title="Kevin Brace <kevinbrace@gmx.com>"> <span class="fn">Kevin Brace</span></a>
</span></b>
        <pre>Hi Frank,

(In reply to HuangRan from <a href="show_bug.cgi?id=94473#c22">comment #22</a>)
<span class="quote">> 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</span >

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?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>