-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'omapdrm-4.12' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/tomba/linux into drm-next omapdrm changes for 4.12 Main changes include: * Add support for render nodes. * Refactor omapdss code to allow multiple DISPC implementations. This is pre-work for DSS6 support. * Fix replication logic bug, which caused RGB565 fb to be shown too dark on a 24bit display. * Improve detection of display stack readiness, which should remove the probe order issues. * Link panel-dpi with its backlight, so that they are turned on/off in sync. * Fix possibly incorrect setup of sync and data-enable signals. * Get rid of DRM_OMAP_NUM_CRTCS config option. * tag 'omapdrm-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (34 commits) drm/omap: Major omap_modeset_init() cleanup drm/omap: Remove the obsolete #define omap_plane _omap_plane hack drm/omap: Fix one ugly indentation style break left by coccinelle drm/omap: Rename enum omap_plane to enum omap_plane_id drm/omap: Get rid of DRM_OMAP_NUM_CRTCS config option drm/omap: fix crash on module unload drm/omap: use drm_atomic_helper_shutdown() drm/omap: fix display SYNC/DE flags drm/omap: dispc: improve debug print of display flags drm/omap: displays: panel-dpi: Support for handling backlight devices drm/omap: poll only connectors where the connect/disconnect can be checked drm/omap: display: Add displays in sorted order to the panel_list drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up drm/omap: dss: Support for detecting display stack readiness drm/omap: dss: Functions to check components in the display/output list drm/omap: fix replication logic drm/omap: remove unused dispc_wb_enable & dispc_wb_is_enabled drm/omap: remove all EXPORT_SYMBOLs from dispc.c drm/omap: use dispc_ops drm/omap: fill dispc_ops ...
- Loading branch information
Showing
26 changed files
with
802 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/of.h> | ||
#include <linux/of_graph.h> | ||
#include <linux/list.h> | ||
#include "omapdss.h" | ||
|
||
static bool dss_initialized; | ||
static const struct dispc_ops *ops; | ||
|
||
static struct list_head omapdss_comp_list; | ||
|
||
struct omapdss_comp_node { | ||
struct list_head list; | ||
struct device_node *node; | ||
bool dss_core_component; | ||
}; | ||
|
||
void omapdss_set_is_initialized(bool set) | ||
{ | ||
dss_initialized = set; | ||
} | ||
EXPORT_SYMBOL(omapdss_set_is_initialized); | ||
|
||
bool omapdss_is_initialized(void) | ||
{ | ||
return dss_initialized; | ||
} | ||
EXPORT_SYMBOL(omapdss_is_initialized); | ||
|
||
void dispc_set_ops(const struct dispc_ops *o) | ||
{ | ||
ops = o; | ||
} | ||
EXPORT_SYMBOL(dispc_set_ops); | ||
|
||
const struct dispc_ops *dispc_get_ops(void) | ||
{ | ||
return ops; | ||
} | ||
EXPORT_SYMBOL(dispc_get_ops); | ||
|
||
static bool omapdss_list_contains(const struct device_node *node) | ||
{ | ||
struct omapdss_comp_node *comp; | ||
|
||
list_for_each_entry(comp, &omapdss_comp_list, list) { | ||
if (comp->node == node) | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
static void omapdss_walk_device(struct device *dev, struct device_node *node, | ||
bool dss_core) | ||
{ | ||
struct device_node *n; | ||
struct omapdss_comp_node *comp = devm_kzalloc(dev, sizeof(*comp), | ||
GFP_KERNEL); | ||
|
||
if (comp) { | ||
comp->node = node; | ||
comp->dss_core_component = dss_core; | ||
list_add(&comp->list, &omapdss_comp_list); | ||
} | ||
|
||
/* | ||
* of_graph_get_remote_port_parent() prints an error if there is no | ||
* port/ports node. To avoid that, check first that there's the node. | ||
*/ | ||
n = of_get_child_by_name(node, "ports"); | ||
if (!n) | ||
n = of_get_child_by_name(node, "port"); | ||
if (!n) | ||
return; | ||
|
||
of_node_put(n); | ||
|
||
n = NULL; | ||
while ((n = of_graph_get_next_endpoint(node, n)) != NULL) { | ||
struct device_node *pn = of_graph_get_remote_port_parent(n); | ||
|
||
if (!pn) | ||
continue; | ||
|
||
if (!of_device_is_available(pn) || omapdss_list_contains(pn)) { | ||
of_node_put(pn); | ||
continue; | ||
} | ||
|
||
omapdss_walk_device(dev, pn, false); | ||
} | ||
} | ||
|
||
void omapdss_gather_components(struct device *dev) | ||
{ | ||
struct device_node *child; | ||
|
||
INIT_LIST_HEAD(&omapdss_comp_list); | ||
|
||
omapdss_walk_device(dev, dev->of_node, true); | ||
|
||
for_each_available_child_of_node(dev->of_node, child) { | ||
if (!of_find_property(child, "compatible", NULL)) | ||
continue; | ||
|
||
omapdss_walk_device(dev, child, true); | ||
} | ||
} | ||
EXPORT_SYMBOL(omapdss_gather_components); | ||
|
||
static bool omapdss_component_is_loaded(struct omapdss_comp_node *comp) | ||
{ | ||
if (comp->dss_core_component) | ||
return true; | ||
if (omapdss_component_is_display(comp->node)) | ||
return true; | ||
if (omapdss_component_is_output(comp->node)) | ||
return true; | ||
|
||
return false; | ||
} | ||
|
||
bool omapdss_stack_is_ready(void) | ||
{ | ||
struct omapdss_comp_node *comp; | ||
|
||
list_for_each_entry(comp, &omapdss_comp_list, list) { | ||
if (!omapdss_component_is_loaded(comp)) | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
EXPORT_SYMBOL(omapdss_stack_is_ready); | ||
|
||
MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@ti.com>"); | ||
MODULE_DESCRIPTION("OMAP Display Subsystem Base"); | ||
MODULE_LICENSE("GPL v2"); |
Oops, something went wrong.