summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/output.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/output.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c
index a901af5a9bc3..655c5d73eac9 100644
--- a/drivers/gpu/drm/omapdrm/dss/output.c
+++ b/drivers/gpu/drm/omapdrm/dss/output.c
@@ -22,7 +22,6 @@
#include <linux/of.h>
#include "omapdss.h"
-#include "dss.h"
static LIST_HEAD(output_list);
static DEFINE_MUTEX(output_lock);
@@ -35,14 +34,15 @@ int omapdss_output_set_device(struct omap_dss_device *out,
mutex_lock(&output_lock);
if (out->dst) {
- DSSERR("output already has device %s connected to it\n",
+ dev_err(out->dev,
+ "output already has device %s connected to it\n",
out->dst->name);
r = -EINVAL;
goto err;
}
if (out->output_type != dssdev->type) {
- DSSERR("output type and display type don't match\n");
+ dev_err(out->dev, "output type and display type don't match\n");
r = -EINVAL;
goto err;
}
@@ -67,14 +67,16 @@ int omapdss_output_unset_device(struct omap_dss_device *out)
mutex_lock(&output_lock);
if (!out->dst) {
- DSSERR("output doesn't have a device connected to it\n");
+ dev_err(out->dev,
+ "output doesn't have a device connected to it\n");
r = -EINVAL;
goto err;
}
if (out->dst->state != OMAP_DSS_DISPLAY_DISABLED) {
- DSSERR("device %s is not disabled, cannot unset device\n",
- out->dst->name);
+ dev_err(out->dev,
+ "device %s is not disabled, cannot unset device\n",
+ out->dst->name);
r = -EINVAL;
goto err;
}
@@ -105,6 +107,19 @@ void omapdss_unregister_output(struct omap_dss_device *out)
}
EXPORT_SYMBOL(omapdss_unregister_output);
+bool omapdss_component_is_output(struct device_node *node)
+{
+ struct omap_dss_device *out;
+
+ list_for_each_entry(out, &output_list, list) {
+ if (out->dev->of_node == node)
+ return true;
+ }
+
+ return false;
+}
+EXPORT_SYMBOL(omapdss_component_is_output);
+
struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id)
{
struct omap_dss_device *out;