Пример #1
0
static int rpmsg_probe(struct rpmsg_channel *_rpdev)
{
	struct dce_rpc_connect_req req = {
			.hdr = MKHDR(CONNECT),
			.chipset_id = GET_OMAP_TYPE,
			.debug = drm_debug ? 1 : 3,
	};
	int ret;

	DBG("");
	rpdev = _rpdev;

	/* send connect msg: */
	ret = rpsend(NULL, NULL, hdr(&req), sizeof(req));
	if (ret) {
		DBG("rpsend failed: %d", ret);
		return ret;
	}

	return omap_drm_register_plugin(&plugin);
}

static void __devexit rpmsg_remove(struct rpmsg_channel *_rpdev)
{
	DBG("");
	omap_drm_unregister_plugin(&plugin);
	rpdev = NULL;
}
Пример #2
0
static int __init PVRSRVDrmInit(void)
{
	int iRes;

#if !defined(SUPPORT_DRI_DRM_EXTERNAL)
	sPVRDrmDriver.num_ioctls = pvr_max_ioctl;
#endif

	PVRDPFInit();

#if defined(PVR_DRI_DRM_NOT_PCI)
	iRes = drm_pvr_dev_add();
	if (iRes != 0)
	{
		return iRes;
	}
#endif

#if defined(SUPPORT_DRI_DRM_EXTERNAL)
	iRes = omap_drm_register_plugin(&plugin);
	pvr_ioctl_base = plugin.ioctl_base;
	pvr_mapper_id = omap_drm_register_mapper();
#else
	iRes = drm_init(&sPVRDrmDriver);
#endif

#if defined(PVR_DRI_DRM_NOT_PCI)
	if (iRes != 0)
	{
		drm_pvr_dev_remove();
	}
#endif
	return iRes;
}