hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c
....@@ -1,18 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
34 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License version 2 as published by
7
- * the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along with
15
- * this program. If not, see <http://www.gnu.org/licenses/>.
165 */
176
187 /*
....@@ -184,9 +173,29 @@
184173 {},
185174 };
186175
176
+static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = {
177
+ { .compatible = "panel-dsi-cm" },
178
+ {},
179
+};
180
+
181
+static void __init omapdss_find_children(struct device_node *np)
182
+{
183
+ struct device_node *child;
184
+
185
+ for_each_available_child_of_node(np, child) {
186
+ if (!of_find_property(child, "compatible", NULL))
187
+ continue;
188
+
189
+ omapdss_walk_device(child, true);
190
+
191
+ if (of_device_is_compatible(child, "ti,sysc"))
192
+ omapdss_find_children(child);
193
+ }
194
+}
195
+
187196 static int __init omapdss_boot_init(void)
188197 {
189
- struct device_node *dss, *child;
198
+ struct device_node *dss;
190199
191200 INIT_LIST_HEAD(&dss_conv_list);
192201
....@@ -196,13 +205,7 @@
196205 goto put_node;
197206
198207 omapdss_walk_device(dss, true);
199
-
200
- for_each_available_child_of_node(dss, child) {
201
- if (!of_find_property(child, "compatible", NULL))
202
- continue;
203
-
204
- omapdss_walk_device(child, true);
205
- }
208
+ omapdss_find_children(dss);
206209
207210 while (!list_empty(&dss_conv_list)) {
208211 struct dss_conv_node *n;
....@@ -210,7 +213,7 @@
210213 n = list_first_entry(&dss_conv_list, struct dss_conv_node,
211214 list);
212215
213
- if (!n->root)
216
+ if (of_match_node(omapdss_of_fixups_whitelist, n->node))
214217 omapdss_omapify_node(n->node);
215218
216219 list_del(&n->list);