mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
drm/omap: display: Add displays in sorted order to the panel_list
Keep the panel_list ordered according to aliases. The DRM connectors will be created following the panel_list. By keeping the list ordered the DRM connectors will be created in the same order regardless of the driver probe order. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
a09d2bc150
commit
389c5763be
@ -83,6 +83,7 @@ static int disp_num_counter;
|
|||||||
int omapdss_register_display(struct omap_dss_device *dssdev)
|
int omapdss_register_display(struct omap_dss_device *dssdev)
|
||||||
{
|
{
|
||||||
struct omap_dss_driver *drv = dssdev->driver;
|
struct omap_dss_driver *drv = dssdev->driver;
|
||||||
|
struct list_head *cur;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -118,7 +119,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
|
|||||||
drv->get_timings = omapdss_default_get_timings;
|
drv->get_timings = omapdss_default_get_timings;
|
||||||
|
|
||||||
mutex_lock(&panel_list_mutex);
|
mutex_lock(&panel_list_mutex);
|
||||||
list_add_tail(&dssdev->panel_list, &panel_list);
|
list_for_each(cur, &panel_list) {
|
||||||
|
struct omap_dss_device *ldev = list_entry(cur,
|
||||||
|
struct omap_dss_device,
|
||||||
|
panel_list);
|
||||||
|
if (strcmp(ldev->alias, dssdev->alias) > 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
list_add_tail(&dssdev->panel_list, cur);
|
||||||
mutex_unlock(&panel_list_mutex);
|
mutex_unlock(&panel_list_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user