DSS2: RFBI: how to make it work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, all!

I'm trying to rewrite my old driver to DSS2. The driver is for small
176x220 module attached over RFBI interface
on OMAP3525. It basically works with old kernel and drivers/video/omap/*.

I still can't make it work, so is it known which code is necessary to
initialize a panel? I tried
to compare APIs with old and new subsystems and can't see what I am doing wrong.

In original code, I just init rfbi and dispc, and then directly write
to panel (commands and their parameters).

The same code with new API does not seem to produce any results.
Display stays uninitialized,
so commands seem not to get to it.

The code:
...

static struct omap_video_timings panel_timings = {
        .x_res          = 176,
        .y_res          = 220,
};

static int panel_probe(struct omap_dss_device *dssdev)
{
        int err;
        struct rfbi_timings t;
        pr_debug("%s\n", __func__);
        dssdev->panel.config = OMAP_DSS_LCD_TFT |
                                OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS;
        dssdev->panel.timings = panel_timings;
        dssdev->phy.rfbi.channel = 0;
        dssdev->ctrl.pixel_size = 24;
        dssdev->phy.rfbi.data_lines = 8;
        hx8340_dss = dssdev;

        t.cs_on_time = 0;
        t.we_on_time = t.cs_on_time + 0;
        t.re_on_time = t.we_on_time + 0;
        t.we_off_time = t.we_on_time + 15000;
        t.re_off_time = t.we_off_time + 15000;
        t.access_time = 0;
        t.cs_off_time = t.we_off_time + 0;
        t.we_cycle_time = t.cs_off_time + 10000;
        t.re_cycle_time = t.we_cycle_time + 15000;
        t.cs_pulse_width = 41000;
        dssdev->ctrl.rfbi_timings = t;
        if (dssdev->platform_enable)
                dssdev->platform_enable(dssdev);
.....
        return 0;
}
static void cmd_data(u8 cmd, u8 data)
{
        omap_rfbi_write_command(&cmd, 1);
        omap_rfbi_write_data(&data, 1);
}

static int panel_power_on(struct omap_dss_device *dssdev)
{
        int err;
        err = omapdss_rfbi_display_enable(dssdev);
        if (err < 0)
                return err;
        if (dssdev->platform_enable) {
                err = dssdev->platform_enable(dssdev);
                if (err)
                        return err;
        }
        cmd_data(0x18, 0x44);
        cmd_data(0x1B, 0x44);
.....

        return 0;
}
static int panel_enable(struct omap_dss_device *dssdev)
{
        panel_power_on(dssdev);
        dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
        return 0;
}
...
static void panel_get_timings(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
{
        *timings = dssdev->panel.timings;
}

static int panel_check_timings(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
{
        return 0;
}
struct omap_dss_driver hx8340_panel_driver = {
        .probe          = panel_probe,
....
        .enable         = panel_enable,
...
        .get_timings    = panel_get_timings,
        .check_timings  = panel_check_timings,
...
        .driver         = {
                .name   = "custom-panel",
                .owner  = THIS_MODULE,
        },
};

Any ideas on what is wrong with initialization?
Driver works with old susbystem, but it is very messed-up and requires
patching of subsystem itself.
I skip timer-based auto-update setup here, because I want to make
initialization work first and then move
to that portion later.

Thanks a lot,
S.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux