• Home
  • Raw
  • Download

Lines Matching refs:path

28 static struct mmp_overlay *path_get_overlay(struct mmp_path *path,  in path_get_overlay()  argument
31 if (path && overlay_id < path->overlay_num) in path_get_overlay()
32 return &path->overlays[overlay_id]; in path_get_overlay()
36 static int path_check_status(struct mmp_path *path) in path_check_status() argument
39 for (i = 0; i < path->overlay_num; i++) in path_check_status()
40 if (path->overlays[i].status) in path_check_status()
53 static int path_get_modelist(struct mmp_path *path, in path_get_modelist() argument
56 BUG_ON(!path || !modelist); in path_get_modelist()
58 if (path->panel && path->panel->get_modelist) in path_get_modelist()
59 return path->panel->get_modelist(path->panel, modelist); in path_get_modelist()
86 struct mmp_path *path; in mmp_register_panel() local
94 list_for_each_entry(path, &path_list, node) { in mmp_register_panel()
95 if (!strcmp(panel->plat_path_name, path->name)) { in mmp_register_panel()
97 path->name); in mmp_register_panel()
98 path->panel = panel; in mmp_register_panel()
116 struct mmp_path *path; in mmp_unregister_panel() local
121 list_for_each_entry(path, &path_list, node) { in mmp_unregister_panel()
122 if (path->panel && path->panel == panel) { in mmp_unregister_panel()
124 path->name); in mmp_unregister_panel()
125 path->panel = NULL; in mmp_unregister_panel()
142 struct mmp_path *path; in mmp_get_path() local
146 list_for_each_entry(path, &path_list, node) { in mmp_get_path()
147 if (!strcmp(name, path->name)) { in mmp_get_path()
154 return found ? path : NULL; in mmp_get_path()
169 struct mmp_path *path = NULL; in mmp_register_path() local
174 path = kzalloc(size, GFP_KERNEL); in mmp_register_path()
175 if (!path) in mmp_register_path()
179 mutex_init(&path->access_ok); in mmp_register_path()
180 path->dev = info->dev; in mmp_register_path()
181 path->id = info->id; in mmp_register_path()
182 path->name = info->name; in mmp_register_path()
183 path->output_type = info->output_type; in mmp_register_path()
184 path->overlay_num = info->overlay_num; in mmp_register_path()
185 path->plat_data = info->plat_data; in mmp_register_path()
186 path->ops.set_mode = info->set_mode; in mmp_register_path()
192 dev_info(path->dev, "get panel %s\n", panel->name); in mmp_register_path()
193 path->panel = panel; in mmp_register_path()
198 dev_info(path->dev, "register %s, overlay_num %d\n", in mmp_register_path()
199 path->name, path->overlay_num); in mmp_register_path()
202 if (!path->ops.check_status) in mmp_register_path()
203 path->ops.check_status = path_check_status; in mmp_register_path()
204 if (!path->ops.get_overlay) in mmp_register_path()
205 path->ops.get_overlay = path_get_overlay; in mmp_register_path()
206 if (!path->ops.get_modelist) in mmp_register_path()
207 path->ops.get_modelist = path_get_modelist; in mmp_register_path()
210 for (i = 0; i < path->overlay_num; i++) { in mmp_register_path()
211 path->overlays[i].path = path; in mmp_register_path()
212 path->overlays[i].id = i; in mmp_register_path()
213 mutex_init(&path->overlays[i].access_ok); in mmp_register_path()
214 path->overlays[i].ops = info->overlay_ops; in mmp_register_path()
218 list_add_tail(&path->node, &path_list); in mmp_register_path()
221 return path; in mmp_register_path()
231 void mmp_unregister_path(struct mmp_path *path) in mmp_unregister_path() argument
235 if (!path) in mmp_unregister_path()
240 list_del(&path->node); in mmp_unregister_path()
243 for (i = 0; i < path->overlay_num; i++) in mmp_unregister_path()
244 mutex_destroy(&path->overlays[i].access_ok); in mmp_unregister_path()
246 mutex_destroy(&path->access_ok); in mmp_unregister_path()
248 kfree(path); in mmp_unregister_path()