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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 10 05:24:21 UTC 2016


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

--- Comment #5 from Kevin Brace <kevinbrace at gmx.com> ---
(In reply to HuangRan from comment #0)

Hi Frank,

> Created attachment 122190 [details]
> VX900 drm driver bootup log
> 
> I have a board ID-PDM9W which is based on VIA's C7 + VX900 platform. The
> board has a "HDMI+VGA" ports and with a serial port on the board.
> Then I install Ubuntu 12.04 OS and see UMS driver xf86-video-openchrome is
> working fine on VGA port. Then I am trying to get latest git openchrome
> driver and build it and see the latest UMS code can work on VGA port. That
> is good.
> And I preferred to make KMS driver work on OpenChrome, so I tried latest
> code on https://cgit.freedesktop.org/openchrome/drm-openchrome/ and build
> the kernel. After the kernel is built and reboot, I get the log with dmesg
> information as below:
> [    9.042371] [drm:via_driver_load [via]] *ERROR* Failed acquiring AGP
> device.
> [    9.049488] [drm:via_driver_load [via]] *ERROR* Failed to allocate AGP
> 
> Thanks,
> Frank

Congratulations for getting Linux kernel compiled for KMS.
I have not gotten that far so far, so you are way ahead of me. (^_^)
Anyway, it appears that via_driver_load function is inside via_drv.c is causing
problems.

https://cgit.freedesktop.org/openchrome/drm-openchrome/tree/drivers/gpu/drm/via/via_drv.c

_____________________________________________________________
static int
via_driver_load(struct drm_device *dev, unsigned long chipset)
{
. . .
#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");
    }
. . .
_____________________________________________________________

via_detect_agp function is where the error occurs.

_____________________________________________________________
static int
via_detect_agp(struct drm_device *dev)
{
    struct drm_via_private *dev_priv = dev->dev_private;
    struct drm_agp_info agp_info;
    struct drm_agp_mode mode;
    int ret = 0;

    ret = drm_agp_acquire(dev);
    if (ret) {
        DRM_ERROR("Failed acquiring AGP device.\n");
        return ret;
    }

    ret = drm_agp_info(dev, &agp_info);
. . .
_____________________________________________________________


I must say that James Simmons wrote far clearer code than the original
OpenChrome developers.
I guess the question now is what does this drm_agp_acquire DRM API call do?
Why is it failing at that point?

-- 
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/20160310/c87706f6/attachment.html>


More information about the Openchrome-devel mailing list