示例#1
0
static int
sisdrm_probe(device_t parent, cfdata_t match, void *aux)
{
	struct pci_attach_args *pa = aux;

	return drm_probe(pa, sis_pciidlist);
}
static int
nouveau_probe(device_t kdev)
{
	int vendor;

	if (pci_get_class(kdev) == PCIC_DISPLAY) {
		vendor = pci_get_vendor(kdev);
		if (vendor == 0x10de) {

			const char *ident;
			char model[64];

			if (pci_get_vpd_ident(kdev, &ident) == 0) {
				snprintf(model, 64, "%s", ident);
				device_set_desc_copy(kdev, model);
				DRM_DEBUG("VPD : %s\n", model);
			}

			return drm_probe(kdev, nouveau_pciidlist);
		}
	}
	return ENXIO;
}
示例#3
0
static int
mach64_probe(device_t dev)
{
	return drm_probe(dev, mach64_pciidlist);
}
示例#4
0
static int
r128_probe(device_t kdev)
{
	return drm_probe(kdev, r128_pciidlist);
}
示例#5
0
文件: sis_drv.c 项目: Ionic/nx-libs
static int
sis_probe(device_t dev)
{
	return drm_probe(dev, sis_pciidlist);
}
示例#6
0
static int
i915drm_probe(struct device *parent, struct cfdata *match, void *aux)
{
	struct pci_attach_args *pa = aux;
	return drm_probe(pa, i915_pciidlist);
}
示例#7
0
static int
i915_probe(device_t dev)
{
	return drm_probe(dev, i915_pciidlist);
}
示例#8
0
static int
vboxvideo_probe(device_t kdev)
{
	return drm_probe(kdev, vboxvideo_pciidlist);
}
示例#9
0
static int
via_probe(device_t kdev)
{
	return drm_probe(kdev, via_pciidlist);
}
示例#10
0
static int
radeon_probe(device_t kdev)
{

	return drm_probe(kdev, pciidlist);
}
示例#11
0
/**
 * Attach entry point, to attach a device to the system or resume it.
 *
 * @param   pDip            The module structure instance.
 * @param   enmCmd          Operation type (attach/resume).
 *
 * @returns corresponding solaris error code.
 */
static int VBoxVideoSolarisAttach(dev_info_t *pDip, ddi_attach_cmd_t enmCmd)
{
    LogFlow((DEVICE_NAME ":VBoxVideoSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd));
    cmn_err(CE_NOTE, DEVICE_NAME ":attach\n");

    switch (enmCmd)
    {
        case DDI_ATTACH:
        {
            drm_device_t *pState;
            int Instance = ddi_get_instance(pDip);
            int rc = ddi_soft_state_zalloc(g_pVBoxVideoSolarisState, Instance);
            if (rc == DDI_SUCCESS)
            {
                pState = ddi_get_soft_state(g_pVBoxVideoSolarisState, Instance);
                pState->dip = pDip;
                pState->driver = &g_VBoxVideoSolarisDRMDriver;

                /*
                 * Register using the DRM module which will create the minor nodes
                 */
                void *pDRMHandle = drm_supp_register(pDip, pState);
                if (pDRMHandle)
                {
                    pState->drm_handle = pDRMHandle;

                    /*
                     * Probe with our pci-id.
                     * -XXX- is probing really required???
                     */
                    pState->drm_supported = DRM_UNSUPPORT;
                    rc = drm_probe(pState, vboxvideo_pciidlist);
                    if (rc == DDI_SUCCESS)
                    {
                        pState->drm_supported = DRM_SUPPORT;

                        /*
                         * Call the common attach DRM routine.
                         */
                        rc = drm_attach(pState);
                        if (rc == DDI_SUCCESS)
                        {
                            return DDI_SUCCESS;
                        }
                        else
                            LogRel((DEVICE_NAME ":VBoxVideoSolarisAttach drm_attach failed.rc=%d\n", rc));
                    }
                    else
                        LogRel((DEVICE_NAME ":VBoxVideoSolarisAttach drm_probe failed.rc=%d\n", rc));

                    drm_supp_unregister(pDRMHandle);
                }
                else
                    LogRel((DEVICE_NAME ":VBoxVideoSolarisAttach drm_supp_register failed.\n"));

                ddi_soft_state_free(g_pVBoxVideoSolarisState, Instance);
            }
            else
                LogRel((DEVICE_NAME ":VBoxVideoSolarisAttach failed to alloc memory for soft state.rc=%d\n", rc));
            return DDI_FAILURE;
        }

        case DDI_RESUME:
        {
            /* Nothing to do here... */
            return DDI_SUCCESS;
        }
    }
    return DDI_FAILURE;
}
示例#12
0
r128drm_probe(struct device *parent, struct cfdata *match, void *aux)
#endif
{
	return drm_probe((struct pci_attach_args *)aux, r128_pciidlist);
}
示例#13
0
static int
tdfx_probe(device_t kdev)
{
	return drm_probe(kdev, tdfx_pciidlist);
}
示例#14
0
static int
savage_probe(device_t kdev)
{
	return drm_probe(kdev, savage_pciidlist);
}
示例#15
0
static int
pscnv_probe(device_t kdev)
{
	return drm_probe(kdev, pciidlist);
}