Commit 8f1f736c authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

OMAPDSS: VENC: Replace dssdev->manager with dssdev->output->manager references

With addition of output entities, a device connects to an output, and an output
connects to overlay manager. Replace the dssdev->manager references with
dssdev->output->manager to access the manager correctly.

When enabling the VENC output, check whether the output entity connected to
display is not NULL.
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
parent 1db39c0a
...@@ -429,6 +429,7 @@ static const struct venc_config *venc_timings_to_config( ...@@ -429,6 +429,7 @@ static const struct venc_config *venc_timings_to_config(
static int venc_power_on(struct omap_dss_device *dssdev) static int venc_power_on(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = dssdev->output->manager;
u32 l; u32 l;
int r; int r;
...@@ -454,13 +455,13 @@ static int venc_power_on(struct omap_dss_device *dssdev) ...@@ -454,13 +455,13 @@ static int venc_power_on(struct omap_dss_device *dssdev)
venc_write_reg(VENC_OUTPUT_CONTROL, l); venc_write_reg(VENC_OUTPUT_CONTROL, l);
dss_mgr_set_timings(dssdev->manager, &venc.timings); dss_mgr_set_timings(mgr, &venc.timings);
r = regulator_enable(venc.vdda_dac_reg); r = regulator_enable(venc.vdda_dac_reg);
if (r) if (r)
goto err1; goto err1;
r = dss_mgr_enable(dssdev->manager); r = dss_mgr_enable(mgr);
if (r) if (r)
goto err2; goto err2;
...@@ -479,10 +480,12 @@ static int venc_power_on(struct omap_dss_device *dssdev) ...@@ -479,10 +480,12 @@ static int venc_power_on(struct omap_dss_device *dssdev)
static void venc_power_off(struct omap_dss_device *dssdev) static void venc_power_off(struct omap_dss_device *dssdev)
{ {
struct omap_overlay_manager *mgr = dssdev->output->manager;
venc_write_reg(VENC_OUTPUT_CONTROL, 0); venc_write_reg(VENC_OUTPUT_CONTROL, 0);
dss_set_dac_pwrdn_bgz(0); dss_set_dac_pwrdn_bgz(0);
dss_mgr_disable(dssdev->manager); dss_mgr_disable(mgr);
regulator_disable(venc.vdda_dac_reg); regulator_disable(venc.vdda_dac_reg);
...@@ -497,14 +500,15 @@ unsigned long venc_get_pixel_clock(void) ...@@ -497,14 +500,15 @@ unsigned long venc_get_pixel_clock(void)
int omapdss_venc_display_enable(struct omap_dss_device *dssdev) int omapdss_venc_display_enable(struct omap_dss_device *dssdev)
{ {
struct omap_dss_output *out = dssdev->output;
int r; int r;
DSSDBG("venc_display_enable\n"); DSSDBG("venc_display_enable\n");
mutex_lock(&venc.venc_lock); mutex_lock(&venc.venc_lock);
if (dssdev->manager == NULL) { if (out == NULL || out->manager == NULL) {
DSSERR("Failed to enable display: no manager\n"); DSSERR("Failed to enable display: no output/manager\n");
r = -ENODEV; r = -ENODEV;
goto err0; goto err0;
} }
......
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