drm/omap: Reverse direction of DSS device (dis)connect operations
The omapdrm and omapdss drivers are architectured based on display pipelines made of multiple components handled from sink (display) to source (DSS output). This is incompatible with the DRM bridge and panel APIs that handle components from source to sink. To reconcile the omapdrm and omapdss drivers with the DRM bridge and panel model, we need to reverse the direction of the DSS device operations. Start with the connect and disconnect operations. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:

committed by
Tomi Valkeinen

parent
2ee767922e
commit
511afb44d7
@@ -190,24 +190,24 @@ int omapdss_device_connect(struct dss_device *dss,
|
||||
{
|
||||
int ret;
|
||||
|
||||
dev_dbg(src->dev, "connect\n");
|
||||
dev_dbg(dst->dev, "connect\n");
|
||||
|
||||
if (omapdss_device_is_connected(src))
|
||||
if (omapdss_device_is_connected(dst))
|
||||
return -EBUSY;
|
||||
|
||||
src->dss = dss;
|
||||
dst->dss = dss;
|
||||
|
||||
if (src->driver)
|
||||
ret = src->driver->connect(src);
|
||||
if (dst->driver)
|
||||
ret = dst->driver->connect(src, dst);
|
||||
else
|
||||
ret = src->ops->connect(src, dst);
|
||||
ret = dst->ops->connect(src, dst);
|
||||
|
||||
if (ret < 0) {
|
||||
src->dss = NULL;
|
||||
dst->dss = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (dst) {
|
||||
if (src) {
|
||||
dst->src = src;
|
||||
src->dst = dst;
|
||||
}
|
||||
@@ -219,14 +219,14 @@ EXPORT_SYMBOL_GPL(omapdss_device_connect);
|
||||
void omapdss_device_disconnect(struct omap_dss_device *src,
|
||||
struct omap_dss_device *dst)
|
||||
{
|
||||
dev_dbg(src->dev, "disconnect\n");
|
||||
dev_dbg(dst->dev, "disconnect\n");
|
||||
|
||||
if (!src->id && !omapdss_device_is_connected(src)) {
|
||||
WARN_ON(!src->driver);
|
||||
if (!dst->id && !omapdss_device_is_connected(dst)) {
|
||||
WARN_ON(!dst->driver);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dst) {
|
||||
if (src) {
|
||||
if (WARN_ON(dst != src->dst))
|
||||
return;
|
||||
|
||||
@@ -234,12 +234,12 @@ void omapdss_device_disconnect(struct omap_dss_device *src,
|
||||
src->dst = NULL;
|
||||
}
|
||||
|
||||
if (src->driver)
|
||||
src->driver->disconnect(src);
|
||||
if (dst->driver)
|
||||
dst->driver->disconnect(src, dst);
|
||||
else
|
||||
src->ops->disconnect(src, dst);
|
||||
dst->ops->disconnect(src, dst);
|
||||
|
||||
src->dss = NULL;
|
||||
dst->dss = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omapdss_device_disconnect);
|
||||
|
||||
|
Reference in New Issue
Block a user