Lines Matching refs:panel
55 static inline struct seiko_panel *to_seiko_panel(struct drm_panel *panel) in to_seiko_panel() argument
57 return container_of(panel, struct seiko_panel, base); in to_seiko_panel()
60 static int seiko_panel_get_fixed_modes(struct seiko_panel *panel, in seiko_panel_get_fixed_modes() argument
66 if (!panel->desc) in seiko_panel_get_fixed_modes()
69 for (i = 0; i < panel->desc->num_timings; i++) { in seiko_panel_get_fixed_modes()
70 const struct display_timing *dt = &panel->desc->timings[i]; in seiko_panel_get_fixed_modes()
76 dev_err(panel->base.dev, "failed to add mode %ux%u\n", in seiko_panel_get_fixed_modes()
85 if (panel->desc->num_timings == 1) in seiko_panel_get_fixed_modes()
92 for (i = 0; i < panel->desc->num_modes; i++) { in seiko_panel_get_fixed_modes()
93 const struct drm_display_mode *m = &panel->desc->modes[i]; in seiko_panel_get_fixed_modes()
97 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", in seiko_panel_get_fixed_modes()
105 if (panel->desc->num_modes == 1) in seiko_panel_get_fixed_modes()
114 connector->display_info.bpc = panel->desc->bpc; in seiko_panel_get_fixed_modes()
115 connector->display_info.width_mm = panel->desc->size.width; in seiko_panel_get_fixed_modes()
116 connector->display_info.height_mm = panel->desc->size.height; in seiko_panel_get_fixed_modes()
117 if (panel->desc->bus_format) in seiko_panel_get_fixed_modes()
119 &panel->desc->bus_format, 1); in seiko_panel_get_fixed_modes()
120 connector->display_info.bus_flags = panel->desc->bus_flags; in seiko_panel_get_fixed_modes()
125 static int seiko_panel_disable(struct drm_panel *panel) in seiko_panel_disable() argument
127 struct seiko_panel *p = to_seiko_panel(panel); in seiko_panel_disable()
137 static int seiko_panel_unprepare(struct drm_panel *panel) in seiko_panel_unprepare() argument
139 struct seiko_panel *p = to_seiko_panel(panel); in seiko_panel_unprepare()
158 static int seiko_panel_prepare(struct drm_panel *panel) in seiko_panel_prepare() argument
160 struct seiko_panel *p = to_seiko_panel(panel); in seiko_panel_prepare()
168 dev_err(panel->dev, "failed to enable dvdd: %d\n", err); in seiko_panel_prepare()
177 dev_err(panel->dev, "failed to enable avdd: %d\n", err); in seiko_panel_prepare()
192 static int seiko_panel_enable(struct drm_panel *panel) in seiko_panel_enable() argument
194 struct seiko_panel *p = to_seiko_panel(panel); in seiko_panel_enable()
204 static int seiko_panel_get_modes(struct drm_panel *panel, in seiko_panel_get_modes() argument
207 struct seiko_panel *p = to_seiko_panel(panel); in seiko_panel_get_modes()
213 static int seiko_panel_get_timings(struct drm_panel *panel, in seiko_panel_get_timings() argument
217 struct seiko_panel *p = to_seiko_panel(panel); in seiko_panel_get_timings()
242 struct seiko_panel *panel; in seiko_panel_probe() local
245 panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); in seiko_panel_probe()
246 if (!panel) in seiko_panel_probe()
249 panel->enabled = false; in seiko_panel_probe()
250 panel->prepared = false; in seiko_panel_probe()
251 panel->desc = desc; in seiko_panel_probe()
253 panel->dvdd = devm_regulator_get(dev, "dvdd"); in seiko_panel_probe()
254 if (IS_ERR(panel->dvdd)) in seiko_panel_probe()
255 return PTR_ERR(panel->dvdd); in seiko_panel_probe()
257 panel->avdd = devm_regulator_get(dev, "avdd"); in seiko_panel_probe()
258 if (IS_ERR(panel->avdd)) in seiko_panel_probe()
259 return PTR_ERR(panel->avdd); in seiko_panel_probe()
261 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", in seiko_panel_probe()
263 if (IS_ERR(panel->enable_gpio)) in seiko_panel_probe()
264 return dev_err_probe(dev, PTR_ERR(panel->enable_gpio), in seiko_panel_probe()
267 drm_panel_init(&panel->base, dev, &seiko_panel_funcs, in seiko_panel_probe()
270 err = drm_panel_of_backlight(&panel->base); in seiko_panel_probe()
274 drm_panel_add(&panel->base); in seiko_panel_probe()
276 dev_set_drvdata(dev, panel); in seiko_panel_probe()
283 struct seiko_panel *panel = platform_get_drvdata(pdev); in seiko_panel_remove() local
285 drm_panel_remove(&panel->base); in seiko_panel_remove()
286 drm_panel_disable(&panel->base); in seiko_panel_remove()
291 struct seiko_panel *panel = platform_get_drvdata(pdev); in seiko_panel_shutdown() local
293 drm_panel_disable(&panel->base); in seiko_panel_shutdown()