Exemple #1
0
static int rfbi_display_enable(struct omap_dss_device *dssdev)
{
	struct omap_dss_device *out = &rfbi.output;
	int r;

	if (!out->dispc_channel_connected) {
		DSSERR("failed to enable display: no output/manager\n");
		return -ENODEV;
	}

	r = rfbi_runtime_get();
	if (r)
		return r;

	r = dss_mgr_register_framedone_handler(out->manager,
			framedone_callback, NULL);
	if (r) {
		DSSERR("can't get FRAMEDONE irq\n");
		goto err1;
	}

	rfbi_config_lcd_manager(dssdev);

	rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size,
			rfbi.data_lines);

	rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings);

	return 0;
err1:
	rfbi_runtime_put();
	return r;
}
Exemple #2
0
int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)
{
	int r;

	if (dssdev->manager == NULL) {
		DSSERR("failed to enable display: no manager\n");
		return -ENODEV;
	}

	r = rfbi_runtime_get();
	if (r)
		return r;

	r = omap_dss_start_device(dssdev);
	if (r) {
		DSSERR("failed to start device\n");
		goto err0;
	}

	r = omap_dispc_register_isr(framedone_callback, NULL,
			DISPC_IRQ_FRAMEDONE);
	if (r) {
		DSSERR("can't get FRAMEDONE irq\n");
		goto err1;
	}

	dispc_mgr_set_lcd_display_type(dssdev->manager->id,
			OMAP_DSS_LCD_DISPLAY_TFT);

	dispc_mgr_set_io_pad_mode(DSS_IO_PAD_MODE_RFBI);
	dispc_mgr_enable_stallmode(dssdev->manager->id, true);

	dispc_mgr_set_tft_data_lines(dssdev->manager->id, dssdev->ctrl.pixel_size);

	rfbi_configure(dssdev->phy.rfbi.channel,
			       dssdev->ctrl.pixel_size,
			       dssdev->phy.rfbi.data_lines);

	rfbi_set_timings(dssdev->phy.rfbi.channel,
			 &dssdev->ctrl.rfbi_timings);


	return 0;
err1:
	omap_dss_stop_device(dssdev);
err0:
	rfbi_runtime_put();
	return r;
}
static int rfbi_display_enable(struct omap_dss_device *dssdev)
{
	int r;

	dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;

	r = omap_dss_start_device(dssdev);
	if (r) {
		DSSERR("failed to start device\n");
		goto err0;
	}

	r = omap_dispc_register_isr(framedone_callback, NULL,
			DISPC_IRQ_FRAMEDONE);
	if (r) {
		DSSERR("can't get FRAMEDONE irq\n");
		goto err1;
	}

	dispc_set_lcd_display_type(OMAP_DSS_LCD_DISPLAY_TFT);

	dispc_set_parallel_interface_mode(OMAP_DSS_PARALLELMODE_RFBI);

	dispc_set_tft_data_lines(dssdev->ctrl.pixel_size);

	rfbi_configure(dssdev->phy.rfbi.channel,
			       dssdev->ctrl.pixel_size,
			       dssdev->phy.rfbi.data_lines);

	rfbi_set_timings(dssdev->phy.rfbi.channel,
			 &dssdev->ctrl.rfbi_timings);


	if (dssdev->driver->enable) {
		r = dssdev->driver->enable(dssdev);
		if (r)
			goto err2;
	}

	return 0;
err2:
	omap_dispc_unregister_isr(framedone_callback, NULL,
			DISPC_IRQ_FRAMEDONE);
err1:
	omap_dss_stop_device(dssdev);
err0:
	return r;
}
Exemple #4
0
int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)
{
        int r;

        struct dispc_clock_info dispc_cinfo;

	struct omap_video_timings timings = {
                       .hsw            = 1,
                       .hfp            = 1,
                       .hbp            = 1,
                       .vsw            = 1,
                       .vfp            = 0,
                       .vbp            = 0,
		};

        r = omap_dss_start_device(dssdev);
        if (r) {
                DSSERR("RFBI: failed to start device\n");
                return r;
        }

	r = rfbi_runtime_get();
	if (r) {
		DSSERR("RFBI: failed to get runtime\n");
		goto err0;
	}


        r = omap_dispc_register_isr(framedone_callback, NULL,
                        DISPC_IRQ_FRAMEDONE);
        if (r) {
                DSSERR("RFBI: can't get FRAMEDONE irq\n");
                goto err1;
        }

        dispc_set_parallel_interface_mode(dssdev->manager->id,
                        OMAP_DSS_PARALLELMODE_RFBI);

	dispc_enable_fifohandcheck(dssdev->manager->id, 1);

        dispc_set_lcd_display_type(dssdev->manager->id,
                        OMAP_DSS_LCD_DISPLAY_TFT);

        dispc_set_tft_data_lines(dssdev->manager->id, dssdev->ctrl.pixel_size);

	dispc_set_lcd_timings(dssdev->manager->id, &timings);

	r = dispc_set_clock_div(dssdev->manager->id, &dispc_cinfo);
	if (r) {
		DSSERR("RFBI: Failed to set dispc clocks\n");
		goto err1;
	}

        rfbi_configure(dssdev->phy.rfbi.channel,
                               dssdev->ctrl.pixel_size,
                               dssdev->phy.rfbi.data_lines);

        rfbi_set_timings(dssdev->phy.rfbi.channel,
                         &dssdev->ctrl.rfbi_timings);


        return 0;
err1:
        rfbi_runtime_put();
err0:
        omap_dss_stop_device(dssdev);
        return r;
}
EXPORT_SYMBOL(omapdss_rfbi_display_enable);

void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev)
{
        omap_dispc_unregister_isr(framedone_callback, NULL,
                        DISPC_IRQ_FRAMEDONE);
        omap_dss_stop_device(dssdev);

        rfbi_runtime_put();
}