Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333576
b: refs/heads/master
c: 81b87f5
h: refs/heads/master
v: v3
  • Loading branch information
Archit Taneja committed Sep 26, 2012
1 parent 1d3b891 commit 9d3f5a2
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 484dc404d233696ef65a8e676f9d4fe563b091ee
refs/heads/master: 81b87f515f6abbbe4eef42835065db9d0831ef35
24 changes: 24 additions & 0 deletions trunk/drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ static struct {
struct omap_video_timings timings;
struct dss_lcd_mgr_config mgr_config;
int data_lines;

struct omap_dss_output output;
} dpi;

static struct platform_device *dpi_get_dsidev(enum omap_dss_clk_source clk)
Expand Down Expand Up @@ -436,10 +438,30 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev)
}
}

static void __init dpi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &dpi.output;

out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_DPI;
out->type = OMAP_DISPLAY_TYPE_DPI;

dss_register_output(out);
}

static void __exit dpi_uninit_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &dpi.output;

dss_unregister_output(out);
}

static int __init omap_dpi_probe(struct platform_device *pdev)
{
mutex_init(&dpi.lock);

dpi_init_output(pdev);

dpi_probe_pdata(pdev);

return 0;
Expand All @@ -449,6 +471,8 @@ static int __exit omap_dpi_remove(struct platform_device *pdev)
{
dss_unregister_child_devices(&pdev->dev);

dpi_uninit_output(pdev);

return 0;
}

Expand Down
28 changes: 28 additions & 0 deletions trunk/drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ struct dsi_data {
enum omap_dss_dsi_pixel_format pix_fmt;
enum omap_dss_dsi_mode mode;
struct omap_dss_dsi_videomode_timings vm_timings;

struct omap_dss_output output;
};

struct dsi_packet_sent_handler_data {
Expand Down Expand Up @@ -5156,6 +5158,28 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev)
}
}

static void __init dsi_init_output(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_output *out = &dsi->output;

out->pdev = dsidev;
out->id = dsi->module_id == 0 ?
OMAP_DSS_OUTPUT_DSI1 : OMAP_DSS_OUTPUT_DSI2;

out->type = OMAP_DISPLAY_TYPE_DSI;

dss_register_output(out);
}

static void __exit dsi_uninit_output(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_output *out = &dsi->output;

dss_unregister_output(out);
}

/* DSI1 HW IP initialisation */
static int __init omap_dsihw_probe(struct platform_device *dsidev)
{
Expand Down Expand Up @@ -5250,6 +5274,8 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev)
else
dsi->num_lanes_supported = 3;

dsi_init_output(dsidev);

dsi_probe_pdata(dsidev);

dsi_runtime_put(dsidev);
Expand Down Expand Up @@ -5281,6 +5307,8 @@ static int __exit omap_dsihw_remove(struct platform_device *dsidev)

dss_unregister_child_devices(&dsidev->dev);

dsi_uninit_output(dsidev);

pm_runtime_disable(&dsidev->dev);

dsi_put_clocks(dsidev);
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ static struct {
int ct_cp_hpd_gpio;
int ls_oe_gpio;
int hpd_gpio;

struct omap_dss_output output;
} hdmi;

/*
Expand Down Expand Up @@ -970,6 +972,24 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
}
}

static void __init hdmi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &hdmi.output;

out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_HDMI;
out->type = OMAP_DISPLAY_TYPE_HDMI;

dss_register_output(out);
}

static void __exit hdmi_uninit_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &hdmi.output;

dss_unregister_output(out);
}

/* HDMI HW IP initialisation */
static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
{
Expand Down Expand Up @@ -1013,6 +1033,8 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)

dss_debugfs_create_file("hdmi", hdmi_dump_regs);

hdmi_init_output(pdev);

hdmi_probe_pdata(pdev);

return 0;
Expand All @@ -1033,6 +1055,8 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)

hdmi_panel_exit();

hdmi_uninit_output(pdev);

pm_runtime_disable(&pdev->dev);

hdmi_put_clocks();
Expand Down
26 changes: 26 additions & 0 deletions trunk/drivers/video/omap2/dss/rfbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ static struct {
int pixel_size;
int data_lines;
struct rfbi_timings intf_timings;

struct omap_dss_output output;
} rfbi;

static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val)
Expand Down Expand Up @@ -1002,6 +1004,24 @@ static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
}
}

static void __init rfbi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &rfbi.output;

out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_DBI;
out->type = OMAP_DISPLAY_TYPE_DBI;

dss_register_output(out);
}

static void __exit rfbi_uninit_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &rfbi.output;

dss_unregister_output(out);
}

/* RFBI HW IP initialisation */
static int __init omap_rfbihw_probe(struct platform_device *pdev)
{
Expand Down Expand Up @@ -1053,6 +1073,8 @@ static int __init omap_rfbihw_probe(struct platform_device *pdev)

dss_debugfs_create_file("rfbi", rfbi_dump_regs);

rfbi_init_output(pdev);

rfbi_probe_pdata(pdev);

return 0;
Expand All @@ -1065,7 +1087,11 @@ static int __init omap_rfbihw_probe(struct platform_device *pdev)
static int __exit omap_rfbihw_remove(struct platform_device *pdev)
{
dss_unregister_child_devices(&pdev->dev);

rfbi_uninit_output(pdev);

pm_runtime_disable(&pdev->dev);

return 0;
}

Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/video/omap2/dss/sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ static struct {
struct dss_lcd_mgr_config mgr_config;
struct omap_video_timings timings;
int datapairs;

struct omap_dss_output output;
} sdi;

static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
Expand Down Expand Up @@ -255,8 +257,28 @@ static void __init sdi_probe_pdata(struct platform_device *sdidev)
}
}

static void __init sdi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &sdi.output;

out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_SDI;
out->type = OMAP_DISPLAY_TYPE_SDI;

dss_register_output(out);
}

static void __exit sdi_uninit_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &sdi.output;

dss_unregister_output(out);
}

static int __init omap_sdi_probe(struct platform_device *pdev)
{
sdi_init_output(pdev);

sdi_probe_pdata(pdev);

return 0;
Expand All @@ -266,6 +288,8 @@ static int __exit omap_sdi_remove(struct platform_device *pdev)
{
dss_unregister_child_devices(&pdev->dev);

sdi_uninit_output(pdev);

return 0;
}

Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/video/omap2/dss/venc.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ static struct {
struct omap_video_timings timings;
enum omap_dss_venc_type type;
bool invert_polarity;

struct omap_dss_output output;
} venc;

static inline void venc_write_reg(int idx, u32 val)
Expand Down Expand Up @@ -797,6 +799,24 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
}
}

static void __init venc_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &venc.output;

out->pdev = pdev;
out->id = OMAP_DSS_OUTPUT_VENC;
out->type = OMAP_DISPLAY_TYPE_VENC;

dss_register_output(out);
}

static void __exit venc_uninit_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &venc.output;

dss_unregister_output(out);
}

/* VENC HW IP initialisation */
static int __init omap_venchw_probe(struct platform_device *pdev)
{
Expand Down Expand Up @@ -844,6 +864,8 @@ static int __init omap_venchw_probe(struct platform_device *pdev)

dss_debugfs_create_file("venc", venc_dump_regs);

venc_init_output(pdev);

venc_probe_pdata(pdev);

return 0;
Expand All @@ -866,6 +888,8 @@ static int __exit omap_venchw_remove(struct platform_device *pdev)

venc_panel_exit();

venc_uninit_output(pdev);

pm_runtime_disable(&pdev->dev);
venc_put_clocks();

Expand Down

0 comments on commit 9d3f5a2

Please sign in to comment.