aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-02-13 07:00:38 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-01 02:18:18 -0500
commit28d79f3e56b2c1d5ff0fd363da3229be0962cc85 (patch)
tree7b2272cffb1ad422de2e3bbf33be75a741cbcc85 /drivers/gpu
parentf81b0fd4701c6c25481a81f8ec279ddb9fa2c27a (diff)
drm: omapdrm: dss: Pass omap_dss_device pointer to dss_mgr_*() functions
The dss_mgr_*() functions take a channel argument to identify the channel they operate on. This prevents the functions from accessing driver data structures without resorting to global variables. In an effort to remove global variables, pass the omap_dss_device pointer associated with the channel instead. This will be used to look up the omap_drm_private data structure to pass to the dss_mgr_ops. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dpi.c32
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c30
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi4.c20
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5.c20
-rw-r--r--drivers/gpu/drm/omapdrm/dss/omapdss.h22
-rw-r--r--drivers/gpu/drm/omapdrm/dss/output.c42
-rw-r--r--drivers/gpu/drm/omapdrm/dss/sdi.c28
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c18
8 files changed, 88 insertions, 124 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
index 338ceb1ba61b..e818e7836cbb 100644
--- a/drivers/gpu/drm/omapdrm/dss/dpi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
@@ -343,8 +343,6 @@ static int dpi_set_dispc_clk(struct dpi_data *dpi, unsigned long pck_req,
343 343
344static int dpi_set_mode(struct dpi_data *dpi) 344static int dpi_set_mode(struct dpi_data *dpi)
345{ 345{
346 struct omap_dss_device *out = &dpi->output;
347 enum omap_channel channel = out->dispc_channel;
348 struct videomode *vm = &dpi->vm; 346 struct videomode *vm = &dpi->vm;
349 int lck_div = 0, pck_div = 0; 347 int lck_div = 0, pck_div = 0;
350 unsigned long fck = 0; 348 unsigned long fck = 0;
@@ -352,8 +350,8 @@ static int dpi_set_mode(struct dpi_data *dpi)
352 int r = 0; 350 int r = 0;
353 351
354 if (dpi->pll) 352 if (dpi->pll)
355 r = dpi_set_pll_clk(dpi, channel, vm->pixelclock, &fck, 353 r = dpi_set_pll_clk(dpi, dpi->output.dispc_channel,
356 &lck_div, &pck_div); 354 vm->pixelclock, &fck, &lck_div, &pck_div);
357 else 355 else
358 r = dpi_set_dispc_clk(dpi, vm->pixelclock, &fck, 356 r = dpi_set_dispc_clk(dpi, vm->pixelclock, &fck,
359 &lck_div, &pck_div); 357 &lck_div, &pck_div);
@@ -369,16 +367,13 @@ static int dpi_set_mode(struct dpi_data *dpi)
369 vm->pixelclock = pck; 367 vm->pixelclock = pck;
370 } 368 }
371 369
372 dss_mgr_set_timings(channel, vm); 370 dss_mgr_set_timings(&dpi->output, vm);
373 371
374 return 0; 372 return 0;
375} 373}
376 374
377static void dpi_config_lcd_manager(struct dpi_data *dpi) 375static void dpi_config_lcd_manager(struct dpi_data *dpi)
378{ 376{
379 struct omap_dss_device *out = &dpi->output;
380 enum omap_channel channel = out->dispc_channel;
381
382 dpi->mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; 377 dpi->mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS;
383 378
384 dpi->mgr_config.stallmode = false; 379 dpi->mgr_config.stallmode = false;
@@ -388,14 +383,13 @@ static void dpi_config_lcd_manager(struct dpi_data *dpi)
388 383
389 dpi->mgr_config.lcden_sig_polarity = 0; 384 dpi->mgr_config.lcden_sig_polarity = 0;
390 385
391 dss_mgr_set_lcd_config(channel, &dpi->mgr_config); 386 dss_mgr_set_lcd_config(&dpi->output, &dpi->mgr_config);
392} 387}
393 388
394static int dpi_display_enable(struct omap_dss_device *dssdev) 389static int dpi_display_enable(struct omap_dss_device *dssdev)
395{ 390{
396 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); 391 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
397 struct omap_dss_device *out = &dpi->output; 392 struct omap_dss_device *out = &dpi->output;
398 enum omap_channel channel = out->dispc_channel;
399 int r; 393 int r;
400 394
401 mutex_lock(&dpi->lock); 395 mutex_lock(&dpi->lock);
@@ -416,7 +410,7 @@ static int dpi_display_enable(struct omap_dss_device *dssdev)
416 if (r) 410 if (r)
417 goto err_get_dispc; 411 goto err_get_dispc;
418 412
419 r = dss_dpi_select_source(dpi->dss, out->port_num, channel); 413 r = dss_dpi_select_source(dpi->dss, out->port_num, out->dispc_channel);
420 if (r) 414 if (r)
421 goto err_src_sel; 415 goto err_src_sel;
422 416
@@ -434,7 +428,7 @@ static int dpi_display_enable(struct omap_dss_device *dssdev)
434 428
435 mdelay(2); 429 mdelay(2);
436 430
437 r = dss_mgr_enable(channel); 431 r = dss_mgr_enable(&dpi->output);
438 if (r) 432 if (r)
439 goto err_mgr_enable; 433 goto err_mgr_enable;
440 434
@@ -461,14 +455,14 @@ err_no_out_mgr:
461static void dpi_display_disable(struct omap_dss_device *dssdev) 455static void dpi_display_disable(struct omap_dss_device *dssdev)
462{ 456{
463 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); 457 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
464 enum omap_channel channel = dpi->output.dispc_channel;
465 458
466 mutex_lock(&dpi->lock); 459 mutex_lock(&dpi->lock);
467 460
468 dss_mgr_disable(channel); 461 dss_mgr_disable(&dpi->output);
469 462
470 if (dpi->pll) { 463 if (dpi->pll) {
471 dss_select_lcd_clk_source(dpi->dss, channel, DSS_CLK_SRC_FCK); 464 dss_select_lcd_clk_source(dpi->dss, dpi->output.dispc_channel,
465 DSS_CLK_SRC_FCK);
472 dss_pll_disable(dpi->pll); 466 dss_pll_disable(dpi->pll);
473 } 467 }
474 468
@@ -658,7 +652,6 @@ static int dpi_connect(struct omap_dss_device *dssdev,
658 struct omap_dss_device *dst) 652 struct omap_dss_device *dst)
659{ 653{
660 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); 654 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
661 enum omap_channel channel = dpi->output.dispc_channel;
662 int r; 655 int r;
663 656
664 r = dpi_init_regulator(dpi); 657 r = dpi_init_regulator(dpi);
@@ -667,7 +660,7 @@ static int dpi_connect(struct omap_dss_device *dssdev,
667 660
668 dpi_init_pll(dpi); 661 dpi_init_pll(dpi);
669 662
670 r = dss_mgr_connect(channel, dssdev); 663 r = dss_mgr_connect(&dpi->output, dssdev);
671 if (r) 664 if (r)
672 return r; 665 return r;
673 666
@@ -675,7 +668,7 @@ static int dpi_connect(struct omap_dss_device *dssdev,
675 if (r) { 668 if (r) {
676 DSSERR("failed to connect output to new device: %s\n", 669 DSSERR("failed to connect output to new device: %s\n",
677 dst->name); 670 dst->name);
678 dss_mgr_disconnect(channel, dssdev); 671 dss_mgr_disconnect(&dpi->output, dssdev);
679 return r; 672 return r;
680 } 673 }
681 674
@@ -686,7 +679,6 @@ static void dpi_disconnect(struct omap_dss_device *dssdev,
686 struct omap_dss_device *dst) 679 struct omap_dss_device *dst)
687{ 680{
688 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); 681 struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev);
689 enum omap_channel channel = dpi->output.dispc_channel;
690 682
691 WARN_ON(dst != dssdev->dst); 683 WARN_ON(dst != dssdev->dst);
692 684
@@ -695,7 +687,7 @@ static void dpi_disconnect(struct omap_dss_device *dssdev,
695 687
696 omapdss_output_unset_device(dssdev); 688 omapdss_output_unset_device(dssdev);
697 689
698 dss_mgr_disconnect(channel, dssdev); 690 dss_mgr_disconnect(&dpi->output, dssdev);
699} 691}
700 692
701static const struct omapdss_dpi_ops dpi_ops = { 693static const struct omapdss_dpi_ops dpi_ops = {
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 0c4668e722b9..66c4d973e7eb 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -3831,7 +3831,6 @@ static int dsi_configure_pins(struct omap_dss_device *dssdev,
3831static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) 3831static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
3832{ 3832{
3833 struct dsi_data *dsi = to_dsi_data(dssdev); 3833 struct dsi_data *dsi = to_dsi_data(dssdev);
3834 enum omap_channel dispc_channel = dssdev->dispc_channel;
3835 int bpp = dsi_get_pixel_size(dsi->pix_fmt); 3834 int bpp = dsi_get_pixel_size(dsi->pix_fmt);
3836 struct omap_dss_device *out = &dsi->output; 3835 struct omap_dss_device *out = &dsi->output;
3837 u8 data_type; 3836 u8 data_type;
@@ -3881,7 +3880,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
3881 dsi_if_enable(dsi, true); 3880 dsi_if_enable(dsi, true);
3882 } 3881 }
3883 3882
3884 r = dss_mgr_enable(dispc_channel); 3883 r = dss_mgr_enable(&dsi->output);
3885 if (r) 3884 if (r)
3886 goto err_mgr_enable; 3885 goto err_mgr_enable;
3887 3886
@@ -3901,7 +3900,6 @@ err_init_dispc:
3901static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel) 3900static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
3902{ 3901{
3903 struct dsi_data *dsi = to_dsi_data(dssdev); 3902 struct dsi_data *dsi = to_dsi_data(dssdev);
3904 enum omap_channel dispc_channel = dssdev->dispc_channel;
3905 3903
3906 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { 3904 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
3907 dsi_if_enable(dsi, false); 3905 dsi_if_enable(dsi, false);
@@ -3914,14 +3912,13 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel
3914 dsi_if_enable(dsi, true); 3912 dsi_if_enable(dsi, true);
3915 } 3913 }
3916 3914
3917 dss_mgr_disable(dispc_channel); 3915 dss_mgr_disable(&dsi->output);
3918 3916
3919 dsi_display_uninit_dispc(dsi); 3917 dsi_display_uninit_dispc(dsi);
3920} 3918}
3921 3919
3922static void dsi_update_screen_dispc(struct dsi_data *dsi) 3920static void dsi_update_screen_dispc(struct dsi_data *dsi)
3923{ 3921{
3924 enum omap_channel dispc_channel = dsi->output.dispc_channel;
3925 unsigned int bytespp; 3922 unsigned int bytespp;
3926 unsigned int bytespl; 3923 unsigned int bytespl;
3927 unsigned int bytespf; 3924 unsigned int bytespf;
@@ -3983,9 +3980,9 @@ static void dsi_update_screen_dispc(struct dsi_data *dsi)
3983 msecs_to_jiffies(250)); 3980 msecs_to_jiffies(250));
3984 BUG_ON(r == 0); 3981 BUG_ON(r == 0);
3985 3982
3986 dss_mgr_set_timings(dispc_channel, &dsi->vm); 3983 dss_mgr_set_timings(&dsi->output, &dsi->vm);
3987 3984
3988 dss_mgr_start_update(dispc_channel); 3985 dss_mgr_start_update(&dsi->output);
3989 3986
3990 if (dsi->te_enabled) { 3987 if (dsi->te_enabled) {
3991 /* disable LP_RX_TO, so that we can receive TE. Time to wait 3988 /* disable LP_RX_TO, so that we can receive TE. Time to wait
@@ -4112,7 +4109,7 @@ static int dsi_display_init_dispc(struct dsi_data *dsi)
4112 DSS_CLK_SRC_PLL2_1); 4109 DSS_CLK_SRC_PLL2_1);
4113 4110
4114 if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) { 4111 if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) {
4115 r = dss_mgr_register_framedone_handler(channel, 4112 r = dss_mgr_register_framedone_handler(&dsi->output,
4116 dsi_framedone_irq_callback, dsi); 4113 dsi_framedone_irq_callback, dsi);
4117 if (r) { 4114 if (r) {
4118 DSSERR("can't register FRAMEDONE handler\n"); 4115 DSSERR("can't register FRAMEDONE handler\n");
@@ -4142,7 +4139,7 @@ static int dsi_display_init_dispc(struct dsi_data *dsi)
4142 dsi->vm.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE; 4139 dsi->vm.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE;
4143 dsi->vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE; 4140 dsi->vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE;
4144 4141
4145 dss_mgr_set_timings(channel, &dsi->vm); 4142 dss_mgr_set_timings(&dsi->output, &dsi->vm);
4146 4143
4147 r = dsi_configure_dispc_clocks(dsi); 4144 r = dsi_configure_dispc_clocks(dsi);
4148 if (r) 4145 if (r)
@@ -4153,12 +4150,12 @@ static int dsi_display_init_dispc(struct dsi_data *dsi)
4153 dsi_get_pixel_size(dsi->pix_fmt); 4150 dsi_get_pixel_size(dsi->pix_fmt);
4154 dsi->mgr_config.lcden_sig_polarity = 0; 4151 dsi->mgr_config.lcden_sig_polarity = 0;
4155 4152
4156 dss_mgr_set_lcd_config(channel, &dsi->mgr_config); 4153 dss_mgr_set_lcd_config(&dsi->output, &dsi->mgr_config);
4157 4154
4158 return 0; 4155 return 0;
4159err1: 4156err1:
4160 if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) 4157 if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
4161 dss_mgr_unregister_framedone_handler(channel, 4158 dss_mgr_unregister_framedone_handler(&dsi->output,
4162 dsi_framedone_irq_callback, dsi); 4159 dsi_framedone_irq_callback, dsi);
4163err: 4160err:
4164 dss_select_lcd_clk_source(dsi->dss, channel, DSS_CLK_SRC_FCK); 4161 dss_select_lcd_clk_source(dsi->dss, channel, DSS_CLK_SRC_FCK);
@@ -4170,7 +4167,7 @@ static void dsi_display_uninit_dispc(struct dsi_data *dsi)
4170 enum omap_channel channel = dsi->output.dispc_channel; 4167 enum omap_channel channel = dsi->output.dispc_channel;
4171 4168
4172 if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) 4169 if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
4173 dss_mgr_unregister_framedone_handler(channel, 4170 dss_mgr_unregister_framedone_handler(&dsi->output,
4174 dsi_framedone_irq_callback, dsi); 4171 dsi_framedone_irq_callback, dsi);
4175 4172
4176 dss_select_lcd_clk_source(dsi->dss, channel, DSS_CLK_SRC_FCK); 4173 dss_select_lcd_clk_source(dsi->dss, channel, DSS_CLK_SRC_FCK);
@@ -4965,14 +4962,13 @@ static int dsi_connect(struct omap_dss_device *dssdev,
4965 struct omap_dss_device *dst) 4962 struct omap_dss_device *dst)
4966{ 4963{
4967 struct dsi_data *dsi = to_dsi_data(dssdev); 4964 struct dsi_data *dsi = to_dsi_data(dssdev);
4968 enum omap_channel dispc_channel = dssdev->dispc_channel;
4969 int r; 4965 int r;
4970 4966
4971 r = dsi_regulator_init(dsi); 4967 r = dsi_regulator_init(dsi);
4972 if (r) 4968 if (r)
4973 return r; 4969 return r;
4974 4970
4975 r = dss_mgr_connect(dispc_channel, dssdev); 4971 r = dss_mgr_connect(&dsi->output, dssdev);
4976 if (r) 4972 if (r)
4977 return r; 4973 return r;
4978 4974
@@ -4980,7 +4976,7 @@ static int dsi_connect(struct omap_dss_device *dssdev,
4980 if (r) { 4976 if (r) {
4981 DSSERR("failed to connect output to new device: %s\n", 4977 DSSERR("failed to connect output to new device: %s\n",
4982 dssdev->name); 4978 dssdev->name);
4983 dss_mgr_disconnect(dispc_channel, dssdev); 4979 dss_mgr_disconnect(&dsi->output, dssdev);
4984 return r; 4980 return r;
4985 } 4981 }
4986 4982
@@ -4990,7 +4986,7 @@ static int dsi_connect(struct omap_dss_device *dssdev,
4990static void dsi_disconnect(struct omap_dss_device *dssdev, 4986static void dsi_disconnect(struct omap_dss_device *dssdev,
4991 struct omap_dss_device *dst) 4987 struct omap_dss_device *dst)
4992{ 4988{
4993 enum omap_channel dispc_channel = dssdev->dispc_channel; 4989 struct dsi_data *dsi = to_dsi_data(dssdev);
4994 4990
4995 WARN_ON(dst != dssdev->dst); 4991 WARN_ON(dst != dssdev->dst);
4996 4992
@@ -4999,7 +4995,7 @@ static void dsi_disconnect(struct omap_dss_device *dssdev,
4999 4995
5000 omapdss_output_unset_device(dssdev); 4996 omapdss_output_unset_device(dssdev);
5001 4997
5002 dss_mgr_disconnect(dispc_channel, dssdev); 4998 dss_mgr_disconnect(&dsi->output, dssdev);
5003} 4999}
5004 5000
5005static const struct omapdss_dsi_ops dsi_ops = { 5001static const struct omapdss_dsi_ops dsi_ops = {
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
index 48608ebfeb0c..096542fb75d2 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
@@ -177,7 +177,6 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
177{ 177{
178 int r; 178 int r;
179 struct videomode *vm; 179 struct videomode *vm;
180 enum omap_channel channel = dssdev->dispc_channel;
181 struct hdmi_wp_data *wp = &hdmi.wp; 180 struct hdmi_wp_data *wp = &hdmi.wp;
182 struct dss_pll_clock_info hdmi_cinfo = { 0 }; 181 struct dss_pll_clock_info hdmi_cinfo = { 0 };
183 unsigned int pc; 182 unsigned int pc;
@@ -231,9 +230,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
231 hdmi4_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg); 230 hdmi4_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg);
232 231
233 /* tv size */ 232 /* tv size */
234 dss_mgr_set_timings(channel, vm); 233 dss_mgr_set_timings(&hdmi.output, vm);
235 234
236 r = dss_mgr_enable(channel); 235 r = dss_mgr_enable(&hdmi.output);
237 if (r) 236 if (r)
238 goto err_mgr_enable; 237 goto err_mgr_enable;
239 238
@@ -247,7 +246,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
247 return 0; 246 return 0;
248 247
249err_vid_enable: 248err_vid_enable:
250 dss_mgr_disable(channel); 249 dss_mgr_disable(&hdmi.output);
251err_mgr_enable: 250err_mgr_enable:
252 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 251 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
253err_phy_pwr: 252err_phy_pwr:
@@ -261,13 +260,11 @@ err_pll_enable:
261 260
262static void hdmi_power_off_full(struct omap_dss_device *dssdev) 261static void hdmi_power_off_full(struct omap_dss_device *dssdev)
263{ 262{
264 enum omap_channel channel = dssdev->dispc_channel;
265
266 hdmi_wp_clear_irqenable(&hdmi.wp, ~HDMI_IRQ_CORE); 263 hdmi_wp_clear_irqenable(&hdmi.wp, ~HDMI_IRQ_CORE);
267 264
268 hdmi_wp_video_stop(&hdmi.wp); 265 hdmi_wp_video_stop(&hdmi.wp);
269 266
270 dss_mgr_disable(channel); 267 dss_mgr_disable(&hdmi.output);
271 268
272 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 269 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
273 270
@@ -451,14 +448,13 @@ void hdmi4_core_disable(struct omap_dss_device *dssdev)
451static int hdmi_connect(struct omap_dss_device *dssdev, 448static int hdmi_connect(struct omap_dss_device *dssdev,
452 struct omap_dss_device *dst) 449 struct omap_dss_device *dst)
453{ 450{
454 enum omap_channel channel = dssdev->dispc_channel;
455 int r; 451 int r;
456 452
457 r = hdmi_init_regulator(); 453 r = hdmi_init_regulator();
458 if (r) 454 if (r)
459 return r; 455 return r;
460 456
461 r = dss_mgr_connect(channel, dssdev); 457 r = dss_mgr_connect(&hdmi.output, dssdev);
462 if (r) 458 if (r)
463 return r; 459 return r;
464 460
@@ -466,7 +462,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
466 if (r) { 462 if (r) {
467 DSSERR("failed to connect output to new device: %s\n", 463 DSSERR("failed to connect output to new device: %s\n",
468 dst->name); 464 dst->name);
469 dss_mgr_disconnect(channel, dssdev); 465 dss_mgr_disconnect(&hdmi.output, dssdev);
470 return r; 466 return r;
471 } 467 }
472 468
@@ -476,8 +472,6 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
476static void hdmi_disconnect(struct omap_dss_device *dssdev, 472static void hdmi_disconnect(struct omap_dss_device *dssdev,
477 struct omap_dss_device *dst) 473 struct omap_dss_device *dst)
478{ 474{
479 enum omap_channel channel = dssdev->dispc_channel;
480
481 WARN_ON(dst != dssdev->dst); 475 WARN_ON(dst != dssdev->dst);
482 476
483 if (dst != dssdev->dst) 477 if (dst != dssdev->dst)
@@ -485,7 +479,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev,
485 479
486 omapdss_output_unset_device(dssdev); 480 omapdss_output_unset_device(dssdev);
487 481
488 dss_mgr_disconnect(channel, dssdev); 482 dss_mgr_disconnect(&hdmi.output, dssdev);
489} 483}
490 484
491static int hdmi_read_edid(struct omap_dss_device *dssdev, 485static int hdmi_read_edid(struct omap_dss_device *dssdev,
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
index 8ede19c3d8e7..597baebd959c 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
@@ -173,7 +173,6 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
173{ 173{
174 int r; 174 int r;
175 struct videomode *vm; 175 struct videomode *vm;
176 enum omap_channel channel = dssdev->dispc_channel;
177 struct dss_pll_clock_info hdmi_cinfo = { 0 }; 176 struct dss_pll_clock_info hdmi_cinfo = { 0 };
178 unsigned int pc; 177 unsigned int pc;
179 178
@@ -227,9 +226,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
227 hdmi5_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg); 226 hdmi5_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg);
228 227
229 /* tv size */ 228 /* tv size */
230 dss_mgr_set_timings(channel, vm); 229 dss_mgr_set_timings(&hdmi.output, vm);
231 230
232 r = dss_mgr_enable(channel); 231 r = dss_mgr_enable(&hdmi.output);
233 if (r) 232 if (r)
234 goto err_mgr_enable; 233 goto err_mgr_enable;
235 234
@@ -243,7 +242,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
243 return 0; 242 return 0;
244 243
245err_vid_enable: 244err_vid_enable:
246 dss_mgr_disable(channel); 245 dss_mgr_disable(&hdmi.output);
247err_mgr_enable: 246err_mgr_enable:
248 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 247 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
249err_phy_pwr: 248err_phy_pwr:
@@ -257,13 +256,11 @@ err_pll_enable:
257 256
258static void hdmi_power_off_full(struct omap_dss_device *dssdev) 257static void hdmi_power_off_full(struct omap_dss_device *dssdev)
259{ 258{
260 enum omap_channel channel = dssdev->dispc_channel;
261
262 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); 259 hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff);
263 260
264 hdmi_wp_video_stop(&hdmi.wp); 261 hdmi_wp_video_stop(&hdmi.wp);
265 262
266 dss_mgr_disable(channel); 263 dss_mgr_disable(&hdmi.output);
267 264
268 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 265 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
269 266
@@ -456,14 +453,13 @@ static void hdmi_core_disable(struct omap_dss_device *dssdev)
456static int hdmi_connect(struct omap_dss_device *dssdev, 453static int hdmi_connect(struct omap_dss_device *dssdev,
457 struct omap_dss_device *dst) 454 struct omap_dss_device *dst)
458{ 455{
459 enum omap_channel channel = dssdev->dispc_channel;
460 int r; 456 int r;
461 457
462 r = hdmi_init_regulator(); 458 r = hdmi_init_regulator();
463 if (r) 459 if (r)
464 return r; 460 return r;
465 461
466 r = dss_mgr_connect(channel, dssdev); 462 r = dss_mgr_connect(&hdmi.output, dssdev);
467 if (r) 463 if (r)
468 return r; 464 return r;
469 465
@@ -471,7 +467,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
471 if (r) { 467 if (r) {
472 DSSERR("failed to connect output to new device: %s\n", 468 DSSERR("failed to connect output to new device: %s\n",
473 dst->name); 469 dst->name);
474 dss_mgr_disconnect(channel, dssdev); 470 dss_mgr_disconnect(&hdmi.output, dssdev);
475 return r; 471 return r;
476 } 472 }
477 473
@@ -481,8 +477,6 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
481static void hdmi_disconnect(struct omap_dss_device *dssdev, 477static void hdmi_disconnect(struct omap_dss_device *dssdev,
482 struct omap_dss_device *dst) 478 struct omap_dss_device *dst)
483{ 479{
484 enum omap_channel channel = dssdev->dispc_channel;
485
486 WARN_ON(dst != dssdev->dst); 480 WARN_ON(dst != dssdev->dst);
487 481
488 if (dst != dssdev->dst) 482 if (dst != dssdev->dst)
@@ -490,7 +484,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev,
490 484
491 omapdss_output_unset_device(dssdev); 485 omapdss_output_unset_device(dssdev);
492 486
493 dss_mgr_disconnect(channel, dssdev); 487 dss_mgr_disconnect(&hdmi.output, dssdev);
494} 488}
495 489
496static int hdmi_read_edid(struct omap_dss_device *dssdev, 490static int hdmi_read_edid(struct omap_dss_device *dssdev,
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 4222661d4c88..aeaa337b29c7 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -656,20 +656,20 @@ struct dss_mgr_ops {
656int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops); 656int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops);
657void dss_uninstall_mgr_ops(void); 657void dss_uninstall_mgr_ops(void);
658 658
659int dss_mgr_connect(enum omap_channel channel, 659int dss_mgr_connect(struct omap_dss_device *dssdev,
660 struct omap_dss_device *dst); 660 struct omap_dss_device *dst);
661void dss_mgr_disconnect(enum omap_channel channel, 661void dss_mgr_disconnect(struct omap_dss_device *dssdev,
662 struct omap_dss_device *dst); 662 struct omap_dss_device *dst);
663void dss_mgr_set_timings(enum omap_channel channel, 663void dss_mgr_set_timings(struct omap_dss_device *dssdev,
664 const struct videomode *vm); 664 const struct videomode *vm);
665void dss_mgr_set_lcd_config(enum omap_channel channel, 665void dss_mgr_set_lcd_config(struct omap_dss_device *dssdev,
666 const struct dss_lcd_mgr_config *config); 666 const struct dss_lcd_mgr_config *config);
667int dss_mgr_enable(enum omap_channel channel); 667int dss_mgr_enable(struct omap_dss_device *dssdev);
668void dss_mgr_disable(enum omap_channel channel); 668void dss_mgr_disable(struct omap_dss_device *dssdev);
669void dss_mgr_start_update(enum omap_channel channel); 669void dss_mgr_start_update(struct omap_dss_device *dssdev);
670int dss_mgr_register_framedone_handler(enum omap_channel channel, 670int dss_mgr_register_framedone_handler(struct omap_dss_device *dssdev,
671 void (*handler)(void *), void *data); 671 void (*handler)(void *), void *data);
672void dss_mgr_unregister_framedone_handler(enum omap_channel channel, 672void dss_mgr_unregister_framedone_handler(struct omap_dss_device *dssdev,
673 void (*handler)(void *), void *data); 673 void (*handler)(void *), void *data);
674 674
675/* dispc ops */ 675/* dispc ops */
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c
index a28e00c94c05..9ff29dea28ce 100644
--- a/drivers/gpu/drm/omapdrm/dss/output.c
+++ b/drivers/gpu/drm/omapdrm/dss/output.c
@@ -188,61 +188,63 @@ void dss_uninstall_mgr_ops(void)
188} 188}
189EXPORT_SYMBOL(dss_uninstall_mgr_ops); 189EXPORT_SYMBOL(dss_uninstall_mgr_ops);
190 190
191int dss_mgr_connect(enum omap_channel channel, 191int dss_mgr_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst)
192 struct omap_dss_device *dst)
193{ 192{
194 return dss_mgr_ops->connect(channel, dst); 193 return dss_mgr_ops->connect(dssdev->dispc_channel, dst);
195} 194}
196EXPORT_SYMBOL(dss_mgr_connect); 195EXPORT_SYMBOL(dss_mgr_connect);
197 196
198void dss_mgr_disconnect(enum omap_channel channel, 197void dss_mgr_disconnect(struct omap_dss_device *dssdev,
199 struct omap_dss_device *dst) 198 struct omap_dss_device *dst)
200{ 199{
201 dss_mgr_ops->disconnect(channel, dst); 200 dss_mgr_ops->disconnect(dssdev->dispc_channel, dst);
202} 201}
203EXPORT_SYMBOL(dss_mgr_disconnect); 202EXPORT_SYMBOL(dss_mgr_disconnect);
204 203
205void dss_mgr_set_timings(enum omap_channel channel, const struct videomode *vm) 204void dss_mgr_set_timings(struct omap_dss_device *dssdev,
205 const struct videomode *vm)
206{ 206{
207 dss_mgr_ops->set_timings(channel, vm); 207 dss_mgr_ops->set_timings(dssdev->dispc_channel, vm);
208} 208}
209EXPORT_SYMBOL(dss_mgr_set_timings); 209EXPORT_SYMBOL(dss_mgr_set_timings);
210 210
211void dss_mgr_set_lcd_config(enum omap_channel channel, 211void dss_mgr_set_lcd_config(struct omap_dss_device *dssdev,
212 const struct dss_lcd_mgr_config *config) 212 const struct dss_lcd_mgr_config *config)
213{ 213{
214 dss_mgr_ops->set_lcd_config(channel, config); 214 dss_mgr_ops->set_lcd_config(dssdev->dispc_channel, config);
215} 215}
216EXPORT_SYMBOL(dss_mgr_set_lcd_config); 216EXPORT_SYMBOL(dss_mgr_set_lcd_config);
217 217
218int dss_mgr_enable(enum omap_channel channel) 218int dss_mgr_enable(struct omap_dss_device *dssdev)
219{ 219{
220 return dss_mgr_ops->enable(channel); 220 return dss_mgr_ops->enable(dssdev->dispc_channel);
221} 221}
222EXPORT_SYMBOL(dss_mgr_enable); 222EXPORT_SYMBOL(dss_mgr_enable);
223 223
224void dss_mgr_disable(enum omap_channel channel) 224void dss_mgr_disable(struct omap_dss_device *dssdev)
225{ 225{
226 dss_mgr_ops->disable(channel); 226 dss_mgr_ops->disable(dssdev->dispc_channel);
227} 227}
228EXPORT_SYMBOL(dss_mgr_disable); 228EXPORT_SYMBOL(dss_mgr_disable);
229 229
230void dss_mgr_start_update(enum omap_channel channel) 230void dss_mgr_start_update(struct omap_dss_device *dssdev)
231{ 231{
232 dss_mgr_ops->start_update(channel); 232 dss_mgr_ops->start_update(dssdev->dispc_channel);
233} 233}
234EXPORT_SYMBOL(dss_mgr_start_update); 234EXPORT_SYMBOL(dss_mgr_start_update);
235 235
236int dss_mgr_register_framedone_handler(enum omap_channel channel, 236int dss_mgr_register_framedone_handler(struct omap_dss_device *dssdev,
237 void (*handler)(void *), void *data) 237 void (*handler)(void *), void *data)
238{ 238{
239 return dss_mgr_ops->register_framedone_handler(channel, handler, data); 239 return dss_mgr_ops->register_framedone_handler(dssdev->dispc_channel,
240 handler, data);
240} 241}
241EXPORT_SYMBOL(dss_mgr_register_framedone_handler); 242EXPORT_SYMBOL(dss_mgr_register_framedone_handler);
242 243
243void dss_mgr_unregister_framedone_handler(enum omap_channel channel, 244void dss_mgr_unregister_framedone_handler(struct omap_dss_device *dssdev,
244 void (*handler)(void *), void *data) 245 void (*handler)(void *), void *data)
245{ 246{
246 dss_mgr_ops->unregister_framedone_handler(channel, handler, data); 247 dss_mgr_ops->unregister_framedone_handler(dssdev->dispc_channel,
248 handler, data);
247} 249}
248EXPORT_SYMBOL(dss_mgr_unregister_framedone_handler); 250EXPORT_SYMBOL(dss_mgr_unregister_framedone_handler);
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
index 6f39e0ff3055..bf225ae69b06 100644
--- a/drivers/gpu/drm/omapdrm/dss/sdi.c
+++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
@@ -113,8 +113,6 @@ static int sdi_calc_clock_div(unsigned long pclk,
113 113
114static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) 114static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
115{ 115{
116 enum omap_channel channel = dssdev->dispc_channel;
117
118 sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; 116 sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS;
119 117
120 sdi.mgr_config.stallmode = false; 118 sdi.mgr_config.stallmode = false;
@@ -123,20 +121,18 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
123 sdi.mgr_config.video_port_width = 24; 121 sdi.mgr_config.video_port_width = 24;
124 sdi.mgr_config.lcden_sig_polarity = 1; 122 sdi.mgr_config.lcden_sig_polarity = 1;
125 123
126 dss_mgr_set_lcd_config(channel, &sdi.mgr_config); 124 dss_mgr_set_lcd_config(&sdi.output, &sdi.mgr_config);
127} 125}
128 126
129static int sdi_display_enable(struct omap_dss_device *dssdev) 127static int sdi_display_enable(struct omap_dss_device *dssdev)
130{ 128{
131 struct omap_dss_device *out = &sdi.output;
132 enum omap_channel channel = dssdev->dispc_channel;
133 struct videomode *vm = &sdi.vm; 129 struct videomode *vm = &sdi.vm;
134 unsigned long fck; 130 unsigned long fck;
135 struct dispc_clock_info dispc_cinfo; 131 struct dispc_clock_info dispc_cinfo;
136 unsigned long pck; 132 unsigned long pck;
137 int r; 133 int r;
138 134
139 if (!out->dispc_channel_connected) { 135 if (!sdi.output.dispc_channel_connected) {
140 DSSERR("failed to enable display: no output/manager\n"); 136 DSSERR("failed to enable display: no output/manager\n");
141 return -ENODEV; 137 return -ENODEV;
142 } 138 }
@@ -168,7 +164,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
168 } 164 }
169 165
170 166
171 dss_mgr_set_timings(channel, vm); 167 dss_mgr_set_timings(&sdi.output, vm);
172 168
173 r = dss_set_fck_rate(sdi.dss, fck); 169 r = dss_set_fck_rate(sdi.dss, fck);
174 if (r) 170 if (r)
@@ -187,7 +183,8 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
187 * need to care about the shadow register mechanism for pck-free. The 183 * need to care about the shadow register mechanism for pck-free. The
188 * exact reason for this is unknown. 184 * exact reason for this is unknown.
189 */ 185 */
190 dispc_mgr_set_clock_div(channel, &sdi.mgr_config.clock_info); 186 dispc_mgr_set_clock_div(sdi.output.dispc_channel,
187 &sdi.mgr_config.clock_info);
191 188
192 dss_sdi_init(sdi.dss, sdi.datapairs); 189 dss_sdi_init(sdi.dss, sdi.datapairs);
193 r = dss_sdi_enable(sdi.dss); 190 r = dss_sdi_enable(sdi.dss);
@@ -195,7 +192,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev)
195 goto err_sdi_enable; 192 goto err_sdi_enable;
196 mdelay(2); 193 mdelay(2);
197 194
198 r = dss_mgr_enable(channel); 195 r = dss_mgr_enable(&sdi.output);
199 if (r) 196 if (r)
200 goto err_mgr_enable; 197 goto err_mgr_enable;
201 198
@@ -215,9 +212,7 @@ err_reg_enable:
215 212
216static void sdi_display_disable(struct omap_dss_device *dssdev) 213static void sdi_display_disable(struct omap_dss_device *dssdev)
217{ 214{
218 enum omap_channel channel = dssdev->dispc_channel; 215 dss_mgr_disable(&sdi.output);
219
220 dss_mgr_disable(channel);
221 216
222 dss_sdi_disable(sdi.dss); 217 dss_sdi_disable(sdi.dss);
223 218
@@ -274,14 +269,13 @@ static int sdi_init_regulator(void)
274static int sdi_connect(struct omap_dss_device *dssdev, 269static int sdi_connect(struct omap_dss_device *dssdev,
275 struct omap_dss_device *dst) 270 struct omap_dss_device *dst)
276{ 271{
277 enum omap_channel channel = dssdev->dispc_channel;
278 int r; 272 int r;
279 273
280 r = sdi_init_regulator(); 274 r = sdi_init_regulator();
281 if (r) 275 if (r)
282 return r; 276 return r;
283 277
284 r = dss_mgr_connect(channel, dssdev); 278 r = dss_mgr_connect(&sdi.output, dssdev);
285 if (r) 279 if (r)
286 return r; 280 return r;
287 281
@@ -289,7 +283,7 @@ static int sdi_connect(struct omap_dss_device *dssdev,
289 if (r) { 283 if (r) {
290 DSSERR("failed to connect output to new device: %s\n", 284 DSSERR("failed to connect output to new device: %s\n",
291 dst->name); 285 dst->name);
292 dss_mgr_disconnect(channel, dssdev); 286 dss_mgr_disconnect(&sdi.output, dssdev);
293 return r; 287 return r;
294 } 288 }
295 289
@@ -299,8 +293,6 @@ static int sdi_connect(struct omap_dss_device *dssdev,
299static void sdi_disconnect(struct omap_dss_device *dssdev, 293static void sdi_disconnect(struct omap_dss_device *dssdev,
300 struct omap_dss_device *dst) 294 struct omap_dss_device *dst)
301{ 295{
302 enum omap_channel channel = dssdev->dispc_channel;
303
304 WARN_ON(dst != dssdev->dst); 296 WARN_ON(dst != dssdev->dst);
305 297
306 if (dst != dssdev->dst) 298 if (dst != dssdev->dst)
@@ -308,7 +300,7 @@ static void sdi_disconnect(struct omap_dss_device *dssdev,
308 300
309 omapdss_output_unset_device(dssdev); 301 omapdss_output_unset_device(dssdev);
310 302
311 dss_mgr_disconnect(channel, dssdev); 303 dss_mgr_disconnect(&sdi.output, dssdev);
312} 304}
313 305
314static const struct omapdss_sdi_ops sdi_ops = { 306static const struct omapdss_sdi_ops sdi_ops = {
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index ed756d4c7210..bed3b54b70b2 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -460,7 +460,6 @@ static const struct venc_config *venc_timings_to_config(struct videomode *vm)
460 460
461static int venc_power_on(struct omap_dss_device *dssdev) 461static int venc_power_on(struct omap_dss_device *dssdev)
462{ 462{
463 enum omap_channel channel = dssdev->dispc_channel;
464 u32 l; 463 u32 l;
465 int r; 464 int r;
466 465
@@ -486,13 +485,13 @@ static int venc_power_on(struct omap_dss_device *dssdev)
486 485
487 venc_write_reg(VENC_OUTPUT_CONTROL, l); 486 venc_write_reg(VENC_OUTPUT_CONTROL, l);
488 487
489 dss_mgr_set_timings(channel, &venc.vm); 488 dss_mgr_set_timings(&venc.output, &venc.vm);
490 489
491 r = regulator_enable(venc.vdda_dac_reg); 490 r = regulator_enable(venc.vdda_dac_reg);
492 if (r) 491 if (r)
493 goto err1; 492 goto err1;
494 493
495 r = dss_mgr_enable(channel); 494 r = dss_mgr_enable(&venc.output);
496 if (r) 495 if (r)
497 goto err2; 496 goto err2;
498 497
@@ -511,12 +510,10 @@ err0:
511 510
512static void venc_power_off(struct omap_dss_device *dssdev) 511static void venc_power_off(struct omap_dss_device *dssdev)
513{ 512{
514 enum omap_channel channel = dssdev->dispc_channel;
515
516 venc_write_reg(VENC_OUTPUT_CONTROL, 0); 513 venc_write_reg(VENC_OUTPUT_CONTROL, 0);
517 dss_set_dac_pwrdn_bgz(venc.dss, 0); 514 dss_set_dac_pwrdn_bgz(venc.dss, 0);
518 515
519 dss_mgr_disable(channel); 516 dss_mgr_disable(&venc.output);
520 517
521 regulator_disable(venc.vdda_dac_reg); 518 regulator_disable(venc.vdda_dac_reg);
522 519
@@ -749,14 +746,13 @@ static int venc_get_clocks(struct platform_device *pdev)
749static int venc_connect(struct omap_dss_device *dssdev, 746static int venc_connect(struct omap_dss_device *dssdev,
750 struct omap_dss_device *dst) 747 struct omap_dss_device *dst)
751{ 748{
752 enum omap_channel channel = dssdev->dispc_channel;
753 int r; 749 int r;
754 750
755 r = venc_init_regulator(); 751 r = venc_init_regulator();
756 if (r) 752 if (r)
757 return r; 753 return r;
758 754
759 r = dss_mgr_connect(channel, dssdev); 755 r = dss_mgr_connect(&venc.output, dssdev);
760 if (r) 756 if (r)
761 return r; 757 return r;
762 758
@@ -764,7 +760,7 @@ static int venc_connect(struct omap_dss_device *dssdev,
764 if (r) { 760 if (r) {
765 DSSERR("failed to connect output to new device: %s\n", 761 DSSERR("failed to connect output to new device: %s\n",
766 dst->name); 762 dst->name);
767 dss_mgr_disconnect(channel, dssdev); 763 dss_mgr_disconnect(&venc.output, dssdev);
768 return r; 764 return r;
769 } 765 }
770 766
@@ -774,8 +770,6 @@ static int venc_connect(struct omap_dss_device *dssdev,
774static void venc_disconnect(struct omap_dss_device *dssdev, 770static void venc_disconnect(struct omap_dss_device *dssdev,
775 struct omap_dss_device *dst) 771 struct omap_dss_device *dst)
776{ 772{
777 enum omap_channel channel = dssdev->dispc_channel;
778
779 WARN_ON(dst != dssdev->dst); 773 WARN_ON(dst != dssdev->dst);
780 774
781 if (dst != dssdev->dst) 775 if (dst != dssdev->dst)
@@ -783,7 +777,7 @@ static void venc_disconnect(struct omap_dss_device *dssdev,
783 777
784 omapdss_output_unset_device(dssdev); 778 omapdss_output_unset_device(dssdev);
785 779
786 dss_mgr_disconnect(channel, dssdev); 780 dss_mgr_disconnect(&venc.output, dssdev);
787} 781}
788 782
789static const struct omapdss_atv_ops venc_ops = { 783static const struct omapdss_atv_ops venc_ops = {