|
@@ -492,7 +492,7 @@ static void venc_power_off(struct omap_dss_device *dssdev)
|
|
|
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;
|
|
|
int r;
|
|
@@ -521,7 +521,7 @@ err0:
|
|
|
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");
|
|
|
|
|
@@ -532,7 +532,7 @@ void omapdss_venc_display_disable(struct omap_dss_device *dssdev)
|
|
|
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)
|
|
|
{
|
|
|
DSSDBG("venc_set_timings\n");
|
|
@@ -550,7 +550,7 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
|
|
|
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)
|
|
|
{
|
|
|
DSSDBG("venc_check_timings\n");
|
|
@@ -574,13 +574,13 @@ static void venc_get_timings(struct omap_dss_device *dssdev,
|
|
|
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 */
|
|
|
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;
|
|
|
int r;
|
|
@@ -609,7 +609,7 @@ err:
|
|
|
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)
|
|
|
{
|
|
|
mutex_lock(&venc.venc_lock);
|
|
@@ -619,7 +619,7 @@ void omapdss_venc_set_type(struct omap_dss_device *dssdev,
|
|
|
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)
|
|
|
{
|
|
|
mutex_lock(&venc.venc_lock);
|
|
@@ -721,74 +721,6 @@ static int venc_get_clocks(struct platform_device *pdev)
|
|
|
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,
|
|
|
struct omap_dss_device *dst)
|
|
|
{
|
|
@@ -836,18 +768,18 @@ static const struct omapdss_atv_ops venc_ops = {
|
|
|
.connect = venc_connect,
|
|
|
.disconnect = venc_disconnect,
|
|
|
|
|
|
- .enable = omapdss_venc_display_enable,
|
|
|
- .disable = omapdss_venc_display_disable,
|
|
|
+ .enable = venc_display_enable,
|
|
|
+ .disable = venc_display_disable,
|
|
|
|
|
|
- .check_timings = omapdss_venc_check_timings,
|
|
|
- .set_timings = omapdss_venc_set_timings,
|
|
|
+ .check_timings = venc_check_timings,
|
|
|
+ .set_timings = venc_set_timings,
|
|
|
.get_timings = venc_get_timings,
|
|
|
|
|
|
- .set_type = omapdss_venc_set_type,
|
|
|
- .invert_vid_out_polarity = omapdss_venc_invert_vid_out_polarity,
|
|
|
+ .set_type = venc_set_type,
|
|
|
+ .invert_vid_out_polarity = venc_invert_vid_out_polarity,
|
|
|
|
|
|
- .set_wss = omapdss_venc_set_wss,
|
|
|
- .get_wss = omapdss_venc_get_wss,
|
|
|
+ .set_wss = venc_set_wss,
|
|
|
+ .get_wss = venc_get_wss,
|
|
|
};
|
|
|
|
|
|
static void venc_init_output(struct platform_device *pdev)
|
|
@@ -913,26 +845,12 @@ static int omap_venchw_probe(struct platform_device *pdev)
|
|
|
|
|
|
venc_runtime_put();
|
|
|
|
|
|
- r = venc_panel_init();
|
|
|
- if (r)
|
|
|
- goto err_panel_init;
|
|
|
-
|
|
|
dss_debugfs_create_file("venc", venc_dump_regs);
|
|
|
|
|
|
venc_init_output(pdev);
|
|
|
|
|
|
- if (pdev->dev.platform_data) {
|
|
|
- r = venc_probe_pdata(pdev);
|
|
|
- if (r)
|
|
|
- goto err_probe;
|
|
|
- }
|
|
|
-
|
|
|
return 0;
|
|
|
|
|
|
-err_probe:
|
|
|
- venc_panel_exit();
|
|
|
- venc_uninit_output(pdev);
|
|
|
-err_panel_init:
|
|
|
err_runtime_get:
|
|
|
pm_runtime_disable(&pdev->dev);
|
|
|
return r;
|
|
@@ -940,10 +858,6 @@ err_runtime_get:
|
|
|
|
|
|
static int __exit omap_venchw_remove(struct platform_device *pdev)
|
|
|
{
|
|
|
- dss_unregister_child_devices(&pdev->dev);
|
|
|
-
|
|
|
- venc_panel_exit();
|
|
|
-
|
|
|
venc_uninit_output(pdev);
|
|
|
|
|
|
pm_runtime_disable(&pdev->dev);
|