Пример #1
0
static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct exynos_drm_subdrv *subdrv;
	struct drm_hdmi_context *ctx;

	DRM_DEBUG_KMS("%s\n", __FILE__);

	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
	if (!ctx) {
		DRM_LOG_KMS("failed to alloc common hdmi context.\n");
		return -ENOMEM;
	}

	subdrv = &ctx->subdrv;

	subdrv->dev = dev;
	subdrv->manager = &hdmi_manager;
	subdrv->probe = hdmi_subdrv_probe;
	subdrv->open = hdmi_subdrv_open;
	subdrv->close = hdmi_subdrv_close;

#if defined(CONFIG_BUSFREQ_OPP) || defined(CONFIG_BUSFREQ_LOCK_WRAPPER)
	/* To lock bus frequency in OPP mode */
	ctx->bus_dev = dev_get("exynos-busfreq");
#endif

	platform_set_drvdata(pdev, subdrv);

	exynos_drm_subdrv_register(subdrv);

	return 0;
}
Пример #2
0
static int __devinit exynos_drm_hdmi_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct exynos_drm_subdrv *subdrv;
	struct drm_hdmi_context *ctx;

	DRM_DEBUG_KMS("%s\n", __FILE__);

	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
	if (!ctx) {
		DRM_LOG_KMS("failed to alloc common hdmi context.\n");
		return -ENOMEM;
	}

	subdrv = &ctx->subdrv;

	subdrv->probe = hdmi_subdrv_probe;
	subdrv->manager.pipe = -1;
	subdrv->manager.ops = &drm_hdmi_manager_ops;
	subdrv->manager.overlay_ops = &drm_hdmi_overlay_ops;
	subdrv->manager.display_ops = &drm_hdmi_display_ops;
	subdrv->manager.dev = dev;

	platform_set_drvdata(pdev, subdrv);

	exynos_drm_subdrv_register(subdrv);

	return 0;
}
Пример #3
0
static int exynos_drm_hdmi_probe(struct platform_device *pdev)
{
    struct device *dev = &pdev->dev;
    struct exynos_drm_subdrv *subdrv;
    struct drm_hdmi_context *ctx;

    DRM_DEBUG_KMS("%s\n", __FILE__);

    ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
    if (!ctx) {
        DRM_LOG_KMS("failed to alloc common hdmi context.\n");
        return -ENOMEM;
    }

    subdrv = &ctx->subdrv;

    subdrv->dev = dev;
    subdrv->manager = &hdmi_manager;
    subdrv->probe = hdmi_subdrv_probe;
    subdrv->remove = hdmi_subdrv_remove;

    platform_set_drvdata(pdev, subdrv);

    exynos_drm_subdrv_register(subdrv);

    return 0;
}