Commit 00b30e79 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm/omap: Pass pipe pointer to omap_crtc_init()

Replace the dss display device pointer by a pipe pointer that will allow
the omap_crtc_init() function to access both the display and the DSS
output. As a result we can remove the omapdss_device_get_dispc_channel()
function that is now unneeded.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 3be0f15b
...@@ -246,15 +246,6 @@ void omapdss_device_disconnect(struct omap_dss_device *src, ...@@ -246,15 +246,6 @@ void omapdss_device_disconnect(struct omap_dss_device *src,
} }
EXPORT_SYMBOL_GPL(omapdss_device_disconnect); EXPORT_SYMBOL_GPL(omapdss_device_disconnect);
enum omap_channel omapdss_device_get_dispc_channel(struct omap_dss_device *dssdev)
{
while (dssdev->src)
dssdev = dssdev->src;
return dssdev->dispc_channel;
}
EXPORT_SYMBOL(omapdss_device_get_dispc_channel);
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Components Handling * Components Handling
*/ */
......
...@@ -513,7 +513,6 @@ int omapdss_device_connect(struct dss_device *dss, ...@@ -513,7 +513,6 @@ int omapdss_device_connect(struct dss_device *dss,
struct omap_dss_device *dst); struct omap_dss_device *dst);
void omapdss_device_disconnect(struct omap_dss_device *src, void omapdss_device_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst); struct omap_dss_device *dst);
enum omap_channel omapdss_device_get_dispc_channel(struct omap_dss_device *dssdev);
int omap_dss_get_num_overlay_managers(void); int omap_dss_get_num_overlay_managers(void);
......
...@@ -693,7 +693,8 @@ void omap_crtc_pre_uninit(struct omap_drm_private *priv) ...@@ -693,7 +693,8 @@ void omap_crtc_pre_uninit(struct omap_drm_private *priv)
/* initialize crtc */ /* initialize crtc */
struct drm_crtc *omap_crtc_init(struct drm_device *dev, struct drm_crtc *omap_crtc_init(struct drm_device *dev,
struct drm_plane *plane, struct omap_dss_device *dssdev) struct omap_drm_pipeline *pipe,
struct drm_plane *plane)
{ {
struct omap_drm_private *priv = dev->dev_private; struct omap_drm_private *priv = dev->dev_private;
struct drm_crtc *crtc = NULL; struct drm_crtc *crtc = NULL;
...@@ -701,7 +702,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev, ...@@ -701,7 +702,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
enum omap_channel channel; enum omap_channel channel;
int ret; int ret;
channel = omapdss_device_get_dispc_channel(dssdev); channel = pipe->output->dispc_channel;
DBG("%s", channel_names[channel]); DBG("%s", channel_names[channel]);
...@@ -724,7 +725,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev, ...@@ -724,7 +725,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
&omap_crtc_funcs, NULL); &omap_crtc_funcs, NULL);
if (ret < 0) { if (ret < 0) {
dev_err(dev->dev, "%s(): could not init crtc for: %s\n", dev_err(dev->dev, "%s(): could not init crtc for: %s\n",
__func__, dssdev->name); __func__, pipe->display->name);
kfree(omap_crtc); kfree(omap_crtc);
return ERR_PTR(ret); return ERR_PTR(ret);
} }
......
...@@ -27,6 +27,7 @@ enum omap_channel; ...@@ -27,6 +27,7 @@ enum omap_channel;
struct drm_crtc; struct drm_crtc;
struct drm_device; struct drm_device;
struct drm_plane; struct drm_plane;
struct omap_drm_pipeline;
struct omap_dss_device; struct omap_dss_device;
struct videomode; struct videomode;
...@@ -35,7 +36,8 @@ enum omap_channel omap_crtc_channel(struct drm_crtc *crtc); ...@@ -35,7 +36,8 @@ enum omap_channel omap_crtc_channel(struct drm_crtc *crtc);
void omap_crtc_pre_init(struct omap_drm_private *priv); void omap_crtc_pre_init(struct omap_drm_private *priv);
void omap_crtc_pre_uninit(struct omap_drm_private *priv); void omap_crtc_pre_uninit(struct omap_drm_private *priv);
struct drm_crtc *omap_crtc_init(struct drm_device *dev, struct drm_crtc *omap_crtc_init(struct drm_device *dev,
struct drm_plane *plane, struct omap_dss_device *dssdev); struct omap_drm_pipeline *pipe,
struct drm_plane *plane);
int omap_crtc_wait_pending(struct drm_crtc *crtc); int omap_crtc_wait_pending(struct drm_crtc *crtc);
void omap_crtc_error_irq(struct drm_crtc *crtc, u32 irqstatus); void omap_crtc_error_irq(struct drm_crtc *crtc, u32 irqstatus);
void omap_crtc_vblank_irq(struct drm_crtc *crtc); void omap_crtc_vblank_irq(struct drm_crtc *crtc);
......
...@@ -308,7 +308,7 @@ static int omap_modeset_init(struct drm_device *dev) ...@@ -308,7 +308,7 @@ static int omap_modeset_init(struct drm_device *dev)
if (!connector) if (!connector)
return -ENOMEM; return -ENOMEM;
crtc = omap_crtc_init(dev, priv->planes[i], display); crtc = omap_crtc_init(dev, pipe, priv->planes[i]);
if (IS_ERR(crtc)) if (IS_ERR(crtc))
return PTR_ERR(crtc); return PTR_ERR(crtc);
......
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