Commit 09d2e7cd authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: VENC: remove code related to old panel model

Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.

This patch removes the code from the VENC driver.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarArchit Taneja <archit@ti.com>
parent cd6e915b
...@@ -7,7 +7,7 @@ omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \ ...@@ -7,7 +7,7 @@ omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
dispc-compat.o display-sysfs.o dispc-compat.o display-sysfs.o
omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o ti_hdmi_4xxx_ip.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o ti_hdmi_4xxx_ip.o
......
...@@ -434,20 +434,6 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, ...@@ -434,20 +434,6 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
/* VENC */ /* VENC */
int venc_init_platform_driver(void) __init; int venc_init_platform_driver(void) __init;
void venc_uninit_platform_driver(void) __exit; void venc_uninit_platform_driver(void) __exit;
int omapdss_venc_display_enable(struct omap_dss_device *dssdev);
void omapdss_venc_display_disable(struct omap_dss_device *dssdev);
void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings);
int omapdss_venc_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings);
u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev);
int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss);
void omapdss_venc_set_type(struct omap_dss_device *dssdev,
enum omap_dss_venc_type type);
void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
bool invert_polarity);
int venc_panel_init(void);
void venc_panel_exit(void);
/* HDMI */ /* HDMI */
int hdmi_init_platform_driver(void) __init; int hdmi_init_platform_driver(void) __init;
......
...@@ -492,7 +492,7 @@ static void venc_power_off(struct omap_dss_device *dssdev) ...@@ -492,7 +492,7 @@ static void venc_power_off(struct omap_dss_device *dssdev)
venc_runtime_put(); venc_runtime_put();
} }
int omapdss_venc_display_enable(struct omap_dss_device *dssdev) static int venc_display_enable(struct omap_dss_device *dssdev)
{ {
struct omap_dss_device *out = &venc.output; struct omap_dss_device *out = &venc.output;
int r; int r;
...@@ -521,7 +521,7 @@ int omapdss_venc_display_enable(struct omap_dss_device *dssdev) ...@@ -521,7 +521,7 @@ int omapdss_venc_display_enable(struct omap_dss_device *dssdev)
return r; return r;
} }
void omapdss_venc_display_disable(struct omap_dss_device *dssdev) static void venc_display_disable(struct omap_dss_device *dssdev)
{ {
DSSDBG("venc_display_disable\n"); DSSDBG("venc_display_disable\n");
...@@ -532,7 +532,7 @@ void omapdss_venc_display_disable(struct omap_dss_device *dssdev) ...@@ -532,7 +532,7 @@ void omapdss_venc_display_disable(struct omap_dss_device *dssdev)
mutex_unlock(&venc.venc_lock); mutex_unlock(&venc.venc_lock);
} }
void omapdss_venc_set_timings(struct omap_dss_device *dssdev, static void venc_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct omap_video_timings *timings)
{ {
DSSDBG("venc_set_timings\n"); DSSDBG("venc_set_timings\n");
...@@ -550,7 +550,7 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev, ...@@ -550,7 +550,7 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock); mutex_unlock(&venc.venc_lock);
} }
int omapdss_venc_check_timings(struct omap_dss_device *dssdev, static int venc_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings) struct omap_video_timings *timings)
{ {
DSSDBG("venc_check_timings\n"); DSSDBG("venc_check_timings\n");
...@@ -574,13 +574,13 @@ static void venc_get_timings(struct omap_dss_device *dssdev, ...@@ -574,13 +574,13 @@ static void venc_get_timings(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock); mutex_unlock(&venc.venc_lock);
} }
u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev) static u32 venc_get_wss(struct omap_dss_device *dssdev)
{ {
/* Invert due to VENC_L21_WC_CTL:INV=1 */ /* Invert due to VENC_L21_WC_CTL:INV=1 */
return (venc.wss_data >> 8) ^ 0xfffff; return (venc.wss_data >> 8) ^ 0xfffff;
} }
int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss) static int venc_set_wss(struct omap_dss_device *dssdev, u32 wss)
{ {
const struct venc_config *config; const struct venc_config *config;
int r; int r;
...@@ -609,7 +609,7 @@ int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss) ...@@ -609,7 +609,7 @@ int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss)
return r; return r;
} }
void omapdss_venc_set_type(struct omap_dss_device *dssdev, static void venc_set_type(struct omap_dss_device *dssdev,
enum omap_dss_venc_type type) enum omap_dss_venc_type type)
{ {
mutex_lock(&venc.venc_lock); mutex_lock(&venc.venc_lock);
...@@ -619,7 +619,7 @@ void omapdss_venc_set_type(struct omap_dss_device *dssdev, ...@@ -619,7 +619,7 @@ void omapdss_venc_set_type(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock); mutex_unlock(&venc.venc_lock);
} }
void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev, static void venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
bool invert_polarity) bool invert_polarity)
{ {
mutex_lock(&venc.venc_lock); mutex_lock(&venc.venc_lock);
...@@ -721,74 +721,6 @@ static int venc_get_clocks(struct platform_device *pdev) ...@@ -721,74 +721,6 @@ static int venc_get_clocks(struct platform_device *pdev)
return 0; return 0;
} }
static struct omap_dss_device *venc_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
struct omap_dss_device *def_dssdev;
int i;
def_dssdev = NULL;
for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];
if (dssdev->type != OMAP_DISPLAY_TYPE_VENC)
continue;
if (def_dssdev == NULL)
def_dssdev = dssdev;
if (def_disp_name != NULL &&
strcmp(dssdev->name, def_disp_name) == 0) {
def_dssdev = dssdev;
break;
}
}
return def_dssdev;
}
static int venc_probe_pdata(struct platform_device *vencdev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
int r;
plat_dssdev = venc_find_dssdev(vencdev);
if (!plat_dssdev)
return 0;
r = venc_init_regulator();
if (r)
return r;
dssdev = dss_alloc_and_init_device(&vencdev->dev);
if (!dssdev)
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
r = omapdss_output_set_device(&venc.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(&venc.output);
dss_put_device(dssdev);
return r;
}
return 0;
}
static int venc_connect(struct omap_dss_device *dssdev, static int venc_connect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
...@@ -836,18 +768,18 @@ static const struct omapdss_atv_ops venc_ops = { ...@@ -836,18 +768,18 @@ static const struct omapdss_atv_ops venc_ops = {
.connect = venc_connect, .connect = venc_connect,
.disconnect = venc_disconnect, .disconnect = venc_disconnect,
.enable = omapdss_venc_display_enable, .enable = venc_display_enable,
.disable = omapdss_venc_display_disable, .disable = venc_display_disable,
.check_timings = omapdss_venc_check_timings, .check_timings = venc_check_timings,
.set_timings = omapdss_venc_set_timings, .set_timings = venc_set_timings,
.get_timings = venc_get_timings, .get_timings = venc_get_timings,
.set_type = omapdss_venc_set_type, .set_type = venc_set_type,
.invert_vid_out_polarity = omapdss_venc_invert_vid_out_polarity, .invert_vid_out_polarity = venc_invert_vid_out_polarity,
.set_wss = omapdss_venc_set_wss, .set_wss = venc_set_wss,
.get_wss = omapdss_venc_get_wss, .get_wss = venc_get_wss,
}; };
static void venc_init_output(struct platform_device *pdev) static void venc_init_output(struct platform_device *pdev)
...@@ -913,26 +845,12 @@ static int omap_venchw_probe(struct platform_device *pdev) ...@@ -913,26 +845,12 @@ static int omap_venchw_probe(struct platform_device *pdev)
venc_runtime_put(); venc_runtime_put();
r = venc_panel_init();
if (r)
goto err_panel_init;
dss_debugfs_create_file("venc", venc_dump_regs); dss_debugfs_create_file("venc", venc_dump_regs);
venc_init_output(pdev); venc_init_output(pdev);
if (pdev->dev.platform_data) {
r = venc_probe_pdata(pdev);
if (r)
goto err_probe;
}
return 0; return 0;
err_probe:
venc_panel_exit();
venc_uninit_output(pdev);
err_panel_init:
err_runtime_get: err_runtime_get:
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return r; return r;
...@@ -940,10 +858,6 @@ static int omap_venchw_probe(struct platform_device *pdev) ...@@ -940,10 +858,6 @@ static int omap_venchw_probe(struct platform_device *pdev)
static int __exit omap_venchw_remove(struct platform_device *pdev) static int __exit omap_venchw_remove(struct platform_device *pdev)
{ {
dss_unregister_child_devices(&pdev->dev);
venc_panel_exit();
venc_uninit_output(pdev); venc_uninit_output(pdev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment