diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-10 00:51:32 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-10 00:51:32 +0200 |
commit | 5f097cd249f00683442c3e265d6f27d80fc83563 (patch) | |
tree | 6b354913fcb2a099aa26e017895e1e6fdf6385e2 /drivers/video/omap2/dss/output.c | |
parent | Merge branch 'akpm' (updates from Andrew Morton) (diff) | |
parent | video: imxfb: Add DT support (diff) | |
download | linux-5f097cd249f00683442c3e265d6f27d80fc83563.tar.xz linux-5f097cd249f00683442c3e265d6f27d80fc83563.zip |
Merge tag 'fbdev-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev
Pull fbdev update from Jean-Christophe PLAGNIOL-VILLARD:
"Various fbdev changes for 3.11
- xilinxfb updates
- Small cleanups and fixes to multiple drivers
- OMAP display subsystem bug updates
- imxfb dt support"
* tag 'fbdev-for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev: (95 commits)
video: imxfb: Add DT support
video: i740fb: Make i740fb_init static
fb: make fp_get_options name argument const
video: mmp: fix graphics/video layer enable/mask swap issue
video: mmp: fix memcpy wrong size for mmp_addr issue
radeon: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
aty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
video: of_display_timing.h: Declare 'display_timing'
fbdev: bfin-lq035q1-fb: Use dev_pm_ops
fbmem: return -EFAULT on copy_to_user() failure
OMAPDSS: DPI: Fix wrong pixel clock limit
video: replace strict_strtoul() with kstrtoul()
uvesafb: Correct/simplify warning message
fb: fix atyfb unused data warnings
fb: fix atyfb build warning
video: imxfb: Make local symbols static
video: udlfb: Make local symbol static
video: udlfb: Use NULL instead of 0
video: smscufx: Use NULL instead of 0
video: remove unnecessary platform_set_drvdata()
...
Diffstat (limited to 'drivers/video/omap2/dss/output.c')
-rw-r--r-- | drivers/video/omap2/dss/output.c | 87 |
1 files changed, 80 insertions, 7 deletions
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c index 5214df63e0a9..3f5c0a758b32 100644 --- a/drivers/video/omap2/dss/output.c +++ b/drivers/video/omap2/dss/output.c @@ -27,7 +27,7 @@ static LIST_HEAD(output_list); static DEFINE_MUTEX(output_lock); -int omapdss_output_set_device(struct omap_dss_output *out, +int omapdss_output_set_device(struct omap_dss_device *out, struct omap_dss_device *dssdev) { int r; @@ -41,7 +41,7 @@ int omapdss_output_set_device(struct omap_dss_output *out, goto err; } - if (out->type != dssdev->type) { + if (out->output_type != dssdev->type) { DSSERR("output type and display type don't match\n"); r = -EINVAL; goto err; @@ -60,7 +60,7 @@ err: } EXPORT_SYMBOL(omapdss_output_set_device); -int omapdss_output_unset_device(struct omap_dss_output *out) +int omapdss_output_unset_device(struct omap_dss_device *out) { int r; @@ -92,19 +92,22 @@ err: } EXPORT_SYMBOL(omapdss_output_unset_device); -void dss_register_output(struct omap_dss_output *out) +int omapdss_register_output(struct omap_dss_device *out) { list_add_tail(&out->list, &output_list); + return 0; } +EXPORT_SYMBOL(omapdss_register_output); -void dss_unregister_output(struct omap_dss_output *out) +void omapdss_unregister_output(struct omap_dss_device *out) { list_del(&out->list); } +EXPORT_SYMBOL(omapdss_unregister_output); -struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id) +struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id) { - struct omap_dss_output *out; + struct omap_dss_device *out; list_for_each_entry(out, &output_list, list) { if (out->id == id) @@ -115,6 +118,62 @@ struct omap_dss_output *omap_dss_get_output(enum omap_dss_output_id id) } EXPORT_SYMBOL(omap_dss_get_output); +struct omap_dss_device *omap_dss_find_output(const char *name) +{ + struct omap_dss_device *out; + + list_for_each_entry(out, &output_list, list) { + if (strcmp(out->name, name) == 0) + return omap_dss_get_device(out); + } + + return NULL; +} +EXPORT_SYMBOL(omap_dss_find_output); + +struct omap_dss_device *omap_dss_find_output_by_node(struct device_node *node) +{ + struct omap_dss_device *out; + + list_for_each_entry(out, &output_list, list) { + if (out->dev->of_node == node) + return omap_dss_get_device(out); + } + + return NULL; +} +EXPORT_SYMBOL(omap_dss_find_output_by_node); + +struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev) +{ + while (dssdev->output) + dssdev = dssdev->output; + + if (dssdev->id != 0) + return omap_dss_get_device(dssdev); + + return NULL; +} +EXPORT_SYMBOL(omapdss_find_output_from_display); + +struct omap_overlay_manager *omapdss_find_mgr_from_display(struct omap_dss_device *dssdev) +{ + struct omap_dss_device *out; + struct omap_overlay_manager *mgr; + + out = omapdss_find_output_from_display(dssdev); + + if (out == NULL) + return NULL; + + mgr = out->manager; + + omap_dss_put_device(out); + + return mgr; +} +EXPORT_SYMBOL(omapdss_find_mgr_from_display); + static const struct dss_mgr_ops *dss_mgr_ops; int dss_install_mgr_ops(const struct dss_mgr_ops *mgr_ops) @@ -134,6 +193,20 @@ void dss_uninstall_mgr_ops(void) } EXPORT_SYMBOL(dss_uninstall_mgr_ops); +int dss_mgr_connect(struct omap_overlay_manager *mgr, + struct omap_dss_device *dst) +{ + return dss_mgr_ops->connect(mgr, dst); +} +EXPORT_SYMBOL(dss_mgr_connect); + +void dss_mgr_disconnect(struct omap_overlay_manager *mgr, + struct omap_dss_device *dst) +{ + dss_mgr_ops->disconnect(mgr, dst); +} +EXPORT_SYMBOL(dss_mgr_disconnect); + void dss_mgr_set_timings(struct omap_overlay_manager *mgr, const struct omap_video_timings *timings) { |