drm/omap: Add dispc_mgr_get_supported_outputs()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 4 Nov 2015 13:11:25 +0000 (15:11 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 3 Mar 2016 15:38:21 +0000 (17:38 +0200)
We are removing the use of the 'struct omap_overlay_manager' from
omapdrm, and one part of that is removing the use of
mgr->supported_outputs field.

This patch adds dispc_mgr_get_supported_outputs() function which can be
used instead of mgr->supported_outputs. omap_crtc.c is changed to use
the new function.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/dispc.c
drivers/gpu/drm/omapdrm/dss/omapdss.h
drivers/gpu/drm/omapdrm/omap_crtc.c

index a4274dca384a0cbf44069c612fd3887411e6bf89..a5940892a788364ae716efa428eb2442f2b328e8 100644 (file)
@@ -2910,6 +2910,12 @@ bool dispc_ovl_enabled(enum omap_plane plane)
 }
 EXPORT_SYMBOL(dispc_ovl_enabled);
 
+enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel)
+{
+       return dss_feat_get_supported_outputs(channel);
+}
+EXPORT_SYMBOL(dispc_mgr_get_supported_outputs);
+
 void dispc_mgr_enable(enum omap_channel channel, bool enable)
 {
        mgr_fld_write(channel, DISPC_MGR_FLD_ENABLE, enable);
index 7712ffef2836597321e872e6635ad54ed850955d..0a213489f133125d0a6094ce8b24f382c8dd38e4 100644 (file)
@@ -58,6 +58,8 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
                bool replication, const struct omap_video_timings *mgr_timings,
                bool mem_to_mem);
 
+enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel);
+
 struct dss_mgr_ops {
        int (*connect)(struct omap_overlay_manager *mgr,
                struct omap_dss_device *dst);
index 8c5caf8bb1b9badd7cc6f57a26f013cad73b21a6..6daf0bd67d067e553a22e7805dc43cbf5fc7bef0 100644 (file)
@@ -112,7 +112,7 @@ static int omap_crtc_dss_connect(struct omap_overlay_manager *mgr,
        if (mgr->output)
                return -EINVAL;
 
-       if ((mgr->supported_outputs & dst->id) == 0)
+       if ((dispc_mgr_get_supported_outputs(mgr->id) & dst->id) == 0)
                return -EINVAL;
 
        dst->manager = mgr;