aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-09-07 08:24:27 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-26 07:58:36 -0400
commit8f1f736c4521ac709d4c5805fa31d395804b162a (patch)
tree92a87012e2c3558669866f5ca01ba47201fae630 /drivers/video
parent1db39c0a28483582c165b4f0ea07ca4a600a4630 (diff)
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: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/venc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 24d278b3e7fd..56efa3bb465d 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -429,6 +429,7 @@ static const struct venc_config *venc_timings_to_config(
429 429
430static int venc_power_on(struct omap_dss_device *dssdev) 430static int venc_power_on(struct omap_dss_device *dssdev)
431{ 431{
432 struct omap_overlay_manager *mgr = dssdev->output->manager;
432 u32 l; 433 u32 l;
433 int r; 434 int r;
434 435
@@ -454,13 +455,13 @@ static int venc_power_on(struct omap_dss_device *dssdev)
454 455
455 venc_write_reg(VENC_OUTPUT_CONTROL, l); 456 venc_write_reg(VENC_OUTPUT_CONTROL, l);
456 457
457 dss_mgr_set_timings(dssdev->manager, &venc.timings); 458 dss_mgr_set_timings(mgr, &venc.timings);
458 459
459 r = regulator_enable(venc.vdda_dac_reg); 460 r = regulator_enable(venc.vdda_dac_reg);
460 if (r) 461 if (r)
461 goto err1; 462 goto err1;
462 463
463 r = dss_mgr_enable(dssdev->manager); 464 r = dss_mgr_enable(mgr);
464 if (r) 465 if (r)
465 goto err2; 466 goto err2;
466 467
@@ -479,10 +480,12 @@ err0:
479 480
480static void venc_power_off(struct omap_dss_device *dssdev) 481static void venc_power_off(struct omap_dss_device *dssdev)
481{ 482{
483 struct omap_overlay_manager *mgr = dssdev->output->manager;
484
482 venc_write_reg(VENC_OUTPUT_CONTROL, 0); 485 venc_write_reg(VENC_OUTPUT_CONTROL, 0);
483 dss_set_dac_pwrdn_bgz(0); 486 dss_set_dac_pwrdn_bgz(0);
484 487
485 dss_mgr_disable(dssdev->manager); 488 dss_mgr_disable(mgr);
486 489
487 regulator_disable(venc.vdda_dac_reg); 490 regulator_disable(venc.vdda_dac_reg);
488 491
@@ -497,14 +500,15 @@ unsigned long venc_get_pixel_clock(void)
497 500
498int omapdss_venc_display_enable(struct omap_dss_device *dssdev) 501int omapdss_venc_display_enable(struct omap_dss_device *dssdev)
499{ 502{
503 struct omap_dss_output *out = dssdev->output;
500 int r; 504 int r;
501 505
502 DSSDBG("venc_display_enable\n"); 506 DSSDBG("venc_display_enable\n");
503 507
504 mutex_lock(&venc.venc_lock); 508 mutex_lock(&venc.venc_lock);
505 509
506 if (dssdev->manager == NULL) { 510 if (out == NULL || out->manager == NULL) {
507 DSSERR("Failed to enable display: no manager\n"); 511 DSSERR("Failed to enable display: no output/manager\n");
508 r = -ENODEV; 512 r = -ENODEV;
509 goto err0; 513 goto err0;
510 } 514 }