当前位置: 首页>>代码示例>>C++>>正文


C++ drm_get_pci_dev函数代码示例

本文整理汇总了C++中drm_get_pci_dev函数的典型用法代码示例。如果您正苦于以下问题:C++ drm_get_pci_dev函数的具体用法?C++ drm_get_pci_dev怎么用?C++ drm_get_pci_dev使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了drm_get_pci_dev函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: i915_pci_probe

static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	struct intel_device_info *intel_info =
		(struct intel_device_info *) ent->driver_data;

	if (IS_PRELIMINARY_HW(intel_info) && !i915.preliminary_hw_support) {
		DRM_INFO("This hardware requires preliminary hardware support.\n"
			 "See CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT, and/or modparam preliminary_hw_support\n");
		return -ENODEV;
	}

	/* Only bind to function 0 of the device. Early generations
	 * used function 1 as a placeholder for multi-head. This causes
	 * us confusion instead, especially on the systems where both
	 * functions have the same PCI-ID!
	 */
	if (PCI_FUNC(pdev->devfn))
		return -ENODEV;

	/*
	 * apple-gmux is needed on dual GPU MacBook Pro
	 * to probe the panel if we're the inactive GPU.
	 */
	if (IS_ENABLED(CONFIG_VGA_ARB) && IS_ENABLED(CONFIG_VGA_SWITCHEROO) &&
	    apple_gmux_present() && pdev != vga_default_device() &&
	    !vga_switcheroo_handler_flags())
		return -EPROBE_DEFER;

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:unusual-thoughts,项目名称:linux-xps13,代码行数:30,代码来源:i915_drv.c

示例2: i915_pci_probe

static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	struct intel_device_info *intel_info =
		(struct intel_device_info *) ent->driver_data;

	if (intel_info->is_valleyview)
		if(!i915_preliminary_hw_support) {
			DRM_ERROR("Preliminary hardware support disabled\n");
			return -ENODEV;
		}

	/* Only bind to function 0 of the device. Early generations
	 * used function 1 as a placeholder for multi-head. This causes
	 * us confusion instead, especially on the systems where both
	 * functions have the same PCI-ID!
	 */
	if (PCI_FUNC(pdev->devfn))
		return -ENODEV;

	/* We've managed to ship a kms-enabled ddx that shipped with an XvMC
	 * implementation for gen3 (and only gen3) that used legacy drm maps
	 * (gasp!) to share buffers between X and the client. Hence we need to
	 * keep around the fake agp stuff for gen3, even when kms is enabled. */
	if (intel_info->gen != 3) {
		driver.driver_features &=
			~(DRIVER_USE_AGP | DRIVER_REQUIRE_AGP);
	} else if (!intel_agp_enabled) {
		DRM_ERROR("drm/i915 can't work without intel_agp module!\n");
		return -ENODEV;
	}

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:33,代码来源:i915_drv.c

示例3: mga_pci_probe

static int __devinit
mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	mgag200_kick_out_firmware_fb(pdev);

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:Jubei-Mitsuyoshi,项目名称:sprezzos-world,代码行数:7,代码来源:mgag200_drv.c

示例4: i915_pci_probe

static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	struct intel_device_info *intel_info =
		(struct intel_device_info *) ent->driver_data;

	if (IS_PRELIMINARY_HW(intel_info) && !i915_preliminary_hw_support) {
		DRM_INFO("This hardware requires preliminary hardware support.\n"
			 "See CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT, and/or modparam preliminary_hw_support\n");
		return -ENODEV;
	}

	/* Only bind to function 0 of the device. Early generations
	 * used function 1 as a placeholder for multi-head. This causes
	 * us confusion instead, especially on the systems where both
	 * functions have the same PCI-ID!
	 */
	if (PCI_FUNC(pdev->devfn))
		return -ENODEV;

	driver.driver_features &= ~(DRIVER_USE_AGP);

#ifdef CONFIG_I915_VGT
	/* enforce dependancy and initialize the vGT driver */
	if (i915_start_vgt(pdev) == 0) {
		printk("i915: xen_start_vgt done\n");
		i915_host_mediate = true;
	}
#endif

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:Truefans,项目名称:KVMGT-kernel,代码行数:31,代码来源:i915_drv.c

示例5: radeon_pci_probe

static int __devinit
radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	/* Get rid of things like offb */
	radeon_kick_out_firmware_fb(pdev);

	return drm_get_pci_dev(pdev, ent, &kms_driver);
}
开发者ID:AsherBond,项目名称:ceph-client,代码行数:8,代码来源:radeon_drv.c

示例6: i915_pci_probe

static int __devinit
i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	if (PCI_FUNC(pdev->devfn))
		return -ENODEV;

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:mjduddin,项目名称:B14CKB1RD_kernel_m8,代码行数:8,代码来源:i915_drv.c

示例7: cirrus_pci_probe

static int cirrus_pci_probe(struct pci_dev *pdev,
			    const struct pci_device_id *ent)
{
	int ret;

	ret = cirrus_kick_out_firmware_fb(pdev);
	if (ret)
		return ret;

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:174high,项目名称:dell-driver,代码行数:11,代码来源:cirrus_drv.c

示例8: cirrus_pci_probe

static int cirrus_pci_probe(struct pci_dev *pdev,
			    const struct pci_device_id *ent)
{
	int ret;

	ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, 0, "cirrusdrmfb");
	if (ret)
		return ret;

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:11,代码来源:cirrus_drv.c

示例9: i915_pci_probe

static int __devinit
i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	/* Only bind to function 0 of the device. Early generations
	 * used function 1 as a placeholder for multi-head. This causes
	 * us confusion instead, especially on the systems where both
	 * functions have the same PCI-ID!
	 */
	if (PCI_FUNC(pdev->devfn))
		return -ENODEV;

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:jebtang,项目名称:mortar,代码行数:13,代码来源:i915_drv.c

示例10: drm_attach_helper

/*
 * drm_attach_helper: called by a driver at the end of its attach
 * method.
 */
int
drm_attach_helper(device_t kdev, drm_pci_id_list_t *idlist,
    struct drm_driver *driver)
{
	struct drm_device *dev;
	int vendor, device;
	int ret;

	dev = device_get_softc(kdev);

	vendor = pci_get_vendor(kdev);
	device = pci_get_device(kdev);
	dev->id_entry = drm_find_description(vendor, device, idlist);

	ret = drm_get_pci_dev(kdev, dev, driver);

	return (ret);
}
开发者ID:cyrilmagsuci,项目名称:freebsd,代码行数:22,代码来源:drm_os_freebsd.c

示例11: bochs_pci_probe

static int bochs_pci_probe(struct pci_dev *pdev,
                           const struct pci_device_id *ent)
{
    unsigned long fbsize;
    int ret;

    fbsize = pci_resource_len(pdev, 0);
    if (fbsize < 4 * 1024 * 1024) {
        DRM_ERROR("less than 4 MB video memory, ignoring device\n");
        return -ENOMEM;
    }

    ret = bochs_kick_out_firmware_fb(pdev);
    if (ret)
        return ret;

    return drm_get_pci_dev(pdev, ent, &bochs_driver);
}
开发者ID:moontide,项目名称:linux,代码行数:18,代码来源:bochs_drv.c

示例12: i915_pci_probe

static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	struct intel_device_info *intel_info =
		(struct intel_device_info *) ent->driver_data;

	if (IS_PRELIMINARY_HW(intel_info) && !i915.preliminary_hw_support) {
		DRM_INFO("This hardware requires preliminary hardware support.\n"
			 "See CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT, and/or modparam preliminary_hw_support\n");
		return -ENODEV;
	}

	/* Only bind to function 0 of the device. Early generations
	 * used function 1 as a placeholder for multi-head. This causes
	 * us confusion instead, especially on the systems where both
	 * functions have the same PCI-ID!
	 */
	if (PCI_FUNC(pdev->devfn))
		return -ENODEV;

	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:a2hojsjsjs,项目名称:linux,代码行数:21,代码来源:i915_drv.c

示例13: i915_init

int i915_init(void)
{
    static pci_dev_t device;
    const struct pci_device_id  *ent;
    int  err;

    ent = find_pci_device(&device, pciidlist);
    if( unlikely(ent == NULL) )
    {
        dbgprintf("device not found\n");
        return -ENODEV;
    };

    drm_core_init();

    DRM_INFO("device %x:%x\n", device.pci_dev.vendor,
                                device.pci_dev.device);

    driver.driver_features |= DRIVER_MODESET;

    err = drm_get_pci_dev(&device.pci_dev, ent, &driver);

    return err;
}
开发者ID:Misha-Mainenko,项目名称:kolibrios-llvm,代码行数:24,代码来源:i915_drv.c

示例14: vbox_pci_probe

static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	return drm_get_pci_dev(pdev, ent, &driver);
}
开发者ID:mdamt,项目名称:linux,代码行数:4,代码来源:vbox_drv.c

示例15: radeon_pci_probe

static int __devinit
radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
	return drm_get_pci_dev(pdev, ent, &kms_driver);
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:5,代码来源:radeon_drv.c


注:本文中的drm_get_pci_dev函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。