Exemplo n.º 1
0
static void dss_uninit_connections(struct omap_dss_device *dssdev)
{
	if (dssdev->output) {
		struct omap_overlay_manager *mgr = dssdev->output->manager;

		if (mgr)
			mgr->unset_output(mgr);

		omapdss_output_unset_device(dssdev->output);
	}
}
Exemplo n.º 2
0
static void hdmi_disconnect(struct omap_dss_device *dssdev,
		struct omap_dss_device *dst)
{
	WARN_ON(dst != dssdev->dst);

	if (dst != dssdev->dst)
		return;

	omapdss_output_unset_device(dssdev);

	if (dssdev->manager)
		dss_mgr_disconnect(dssdev->manager, dssdev);
}
Exemplo n.º 3
0
/*
 * Connect dssdev to a manager if the manager is free or if force is specified.
 * Connect all overlays to that manager if they are free or if force is
 * specified.
 */
static int dss_init_connections(struct omap_dss_device *dssdev, bool force)
{
	struct omap_dss_output *out;
	struct omap_overlay_manager *mgr;
	int i, r;

	out = omapdss_get_output_from_dssdev(dssdev);

	WARN_ON(dssdev->output);
	WARN_ON(out->device);

	r = omapdss_output_set_device(out, dssdev);
	if (r) {
		DSSERR("failed to connect output to new device\n");
		return r;
	}

	mgr = omap_dss_get_overlay_manager(dssdev->channel);

	if (mgr->output && !force)
		return 0;

	if (mgr->output)
		mgr->unset_output(mgr);

	r = mgr->set_output(mgr, out);
	if (r) {
		DSSERR("failed to connect manager to output of new device\n");

		/* remove the output-device connection we just made */
		omapdss_output_unset_device(out);
		return r;
	}

	for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
		struct omap_overlay *ovl = omap_dss_get_overlay(i);

		if (!ovl->manager || force) {
			if (ovl->manager)
				ovl->unset_manager(ovl);

			r = ovl->set_manager(ovl, mgr);
			if (r) {
				DSSERR("failed to set initial overlay\n");
				return r;
			}
		}
	}

	return 0;
}
Exemplo n.º 4
0
Arquivo: sdi.c Projeto: krzk/linux
static void sdi_disconnect(struct omap_dss_device *dssdev,
		struct omap_dss_device *dst)
{
	struct sdi_device *sdi = dssdev_to_sdi(dssdev);

	WARN_ON(dst != dssdev->dst);

	if (dst != dssdev->dst)
		return;

	omapdss_output_unset_device(dssdev);

	dss_mgr_disconnect(&sdi->output, dssdev);
}
Exemplo n.º 5
0
static void __init hdmi_probe_pdata(struct platform_device *pdev)
{
	struct omap_dss_device *plat_dssdev;
	struct omap_dss_device *dssdev;
	struct omap_dss_hdmi_data *priv;
	int r;

	plat_dssdev = hdmi_find_dssdev(pdev);

	if (!plat_dssdev)
		return;

	dssdev = dss_alloc_and_init_device(&pdev->dev);
	if (!dssdev)
		return;

	dss_copy_device_pdata(dssdev, plat_dssdev);

	priv = dssdev->data;

	hdmi.ct_cp_hpd_gpio = priv->ct_cp_hpd_gpio;
	hdmi.ls_oe_gpio = priv->ls_oe_gpio;
	hdmi.hpd_gpio = priv->hpd_gpio;

	dssdev->channel = OMAP_DSS_CHANNEL_DIGIT;

	r = hdmi_init_display(dssdev);
	if (r) {
		DSSERR("device %s init failed: %d\n", dssdev->name, r);
		dss_put_device(dssdev);
		return;
	}

	r = omapdss_output_set_device(&hdmi.output, dssdev);
	if (r) {
		DSSERR("failed to connect output to new device: %s\n",
				dssdev->name);
		dss_put_device(dssdev);
		return;
	}

	r = dss_add_device(dssdev);
	if (r) {
		DSSERR("device %s register failed: %d\n", dssdev->name, r);
		omapdss_output_unset_device(&hdmi.output);
		hdmi_uninit_display(dssdev);
		dss_put_device(dssdev);
		return;
	}
}
Exemplo n.º 6
0
static void hdmi_disconnect(struct omap_dss_device *dssdev,
		struct omap_dss_device *dst)
{
	enum omap_channel channel = dssdev->dispc_channel;

	WARN_ON(dst != dssdev->dst);

	if (dst != dssdev->dst)
		return;

	omapdss_output_unset_device(dssdev);

	dss_mgr_disconnect(channel, dssdev);
}
Exemplo n.º 7
0
static int dpi_probe_pdata(struct platform_device *dpidev)
{
	struct omap_dss_device *plat_dssdev;
	struct omap_dss_device *dssdev;
	int r;

	plat_dssdev = dpi_find_dssdev(dpidev);

	if (!plat_dssdev)
		return 0;

	dssdev = dss_alloc_and_init_device(&dpidev->dev);
	if (!dssdev)
		return -ENOMEM;

	dss_copy_device_pdata(dssdev, plat_dssdev);

	r = dpi_init_display(dssdev);
	if (r) {
		DSSERR("device %s init failed: %d\n", dssdev->name, r);
		dss_put_device(dssdev);
		return r;
	}

	r = omapdss_output_set_device(&dpi.output, dssdev);
	if (r) {
		DSSERR("failed to connect output to new device: %s\n",
				dssdev->name);
		dss_put_device(dssdev);
		return r;
	}

	r = dss_add_device(dssdev);
	if (r) {
		DSSERR("device %s register failed: %d\n", dssdev->name, r);
		omapdss_output_unset_device(&dpi.output);
		dss_put_device(dssdev);
		return r;
	}

	return 0;
}