summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-09-07 18:00:07 +0530
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-26 14:58:37 +0300
commit947b2254249ceab769dfa07d5291fd77e387a0c7 (patch)
treed6c89786cfb02bc5dd3783f9d06a0e5bf7847453 /drivers/video
parent952cbaaa9b8beacc425f9aedf370468cbb737a2c (diff)
downloadop-kernel-dev-947b2254249ceab769dfa07d5291fd77e387a0c7.zip
op-kernel-dev-947b2254249ceab769dfa07d5291fd77e387a0c7.tar.gz
OMAPDSS: MANAGER: Update display sysfs store
The display sysfs attribute's store function needs to be changed with the introduction of outputs. The DSS driver ensures that there is one display per output, and that a registered omap_dss_device will have an output connected to it. The display sysfs store function unsets the current output connected to the manager, and sets it with the output connected to the new display. If the new display doesn't have an output for some reason, we just bail out. The function doesn't set/unset output->device links. These remain the same as when the omap_dss_device was registered. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/manager-sysfs.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c
index 55cf955..9a2fb59 100644
--- a/drivers/video/omap2/dss/manager-sysfs.c
+++ b/drivers/video/omap2/dss/manager-sysfs.c
@@ -69,18 +69,29 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr,
if (dssdev)
DSSDBG("display %s found\n", dssdev->name);
- if (mgr->get_device(mgr)) {
- r = mgr->unset_device(mgr);
+ if (mgr->output) {
+ r = mgr->unset_output(mgr);
if (r) {
- DSSERR("failed to unset display\n");
+ DSSERR("failed to unset current output\n");
goto put_device;
}
}
if (dssdev) {
- r = mgr->set_device(mgr, dssdev);
+ struct omap_dss_output *out = dssdev->output;
+
+ /*
+ * a registered device should have an output connected to it
+ * already
+ */
+ if (!out) {
+ DSSERR("device has no output connected to it\n");
+ goto put_device;
+ }
+
+ r = mgr->set_output(mgr, out);
if (r) {
- DSSERR("failed to set manager\n");
+ DSSERR("failed to set manager output\n");
goto put_device;
}
OpenPOWER on IntegriCloud