Lines Matching +full:rtsm +full:- +full:display
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
27 #include <linux/media-bus-format.h>
46 * struct panel_desc - Describes a simple panel.
62 * @timings: Pointer to array of display timings
78 * @size.width: Width (in mm) of the active display area.
83 * @size.height: Height (in mm) of the active display area.
99 * @delay.enable: Time for the panel to display a valid frame.
102 * display the first valid frame after starting to receive
108 * @delay.disable: Time for the panel to turn the display off.
111 * turn the display off (no content is visible).
169 for (i = 0; i < panel->desc->num_timings; i++) { in panel_simple_get_timings_modes()
170 const struct display_timing *dt = &panel->desc->timings[i]; in panel_simple_get_timings_modes()
174 mode = drm_mode_create(connector->dev); in panel_simple_get_timings_modes()
176 dev_err(panel->base.dev, "failed to add mode %ux%u\n", in panel_simple_get_timings_modes()
177 dt->hactive.typ, dt->vactive.typ); in panel_simple_get_timings_modes()
183 mode->type |= DRM_MODE_TYPE_DRIVER; in panel_simple_get_timings_modes()
185 if (panel->desc->num_timings == 1) in panel_simple_get_timings_modes()
186 mode->type |= DRM_MODE_TYPE_PREFERRED; in panel_simple_get_timings_modes()
201 for (i = 0; i < panel->desc->num_modes; i++) { in panel_simple_get_display_modes()
202 const struct drm_display_mode *m = &panel->desc->modes[i]; in panel_simple_get_display_modes()
204 mode = drm_mode_duplicate(connector->dev, m); in panel_simple_get_display_modes()
206 dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n", in panel_simple_get_display_modes()
207 m->hdisplay, m->vdisplay, in panel_simple_get_display_modes()
212 mode->type |= DRM_MODE_TYPE_DRIVER; in panel_simple_get_display_modes()
214 if (panel->desc->num_modes == 1) in panel_simple_get_display_modes()
215 mode->type |= DRM_MODE_TYPE_PREFERRED; in panel_simple_get_display_modes()
230 bool has_override = panel->override_mode.type; in panel_simple_get_non_edid_modes()
233 if (!panel->desc) in panel_simple_get_non_edid_modes()
237 mode = drm_mode_duplicate(connector->dev, in panel_simple_get_non_edid_modes()
238 &panel->override_mode); in panel_simple_get_non_edid_modes()
243 dev_err(panel->base.dev, "failed to add override mode\n"); in panel_simple_get_non_edid_modes()
248 if (num == 0 && panel->desc->num_timings) in panel_simple_get_non_edid_modes()
254 * We should only ever have either the display timings specified in panel_simple_get_non_edid_modes()
257 WARN_ON(panel->desc->num_timings && panel->desc->num_modes); in panel_simple_get_non_edid_modes()
261 connector->display_info.bpc = panel->desc->bpc; in panel_simple_get_non_edid_modes()
262 connector->display_info.width_mm = panel->desc->size.width; in panel_simple_get_non_edid_modes()
263 connector->display_info.height_mm = panel->desc->size.height; in panel_simple_get_non_edid_modes()
264 if (panel->desc->bus_format) in panel_simple_get_non_edid_modes()
265 drm_display_info_set_bus_formats(&connector->display_info, in panel_simple_get_non_edid_modes()
266 &panel->desc->bus_format, 1); in panel_simple_get_non_edid_modes()
267 connector->display_info.bus_flags = panel->desc->bus_flags; in panel_simple_get_non_edid_modes()
290 if (p->desc->delay.disable) in panel_simple_disable()
291 msleep(p->desc->delay.disable); in panel_simple_disable()
300 gpiod_set_value_cansleep(p->enable_gpio, 0); in panel_simple_suspend()
301 regulator_disable(p->supply); in panel_simple_suspend()
302 p->unprepared_time = ktime_get_boottime(); in panel_simple_suspend()
304 drm_edid_free(p->drm_edid); in panel_simple_suspend()
305 p->drm_edid = NULL; in panel_simple_suspend()
314 pm_runtime_mark_last_busy(panel->dev); in panel_simple_unprepare()
315 ret = pm_runtime_put_autosuspend(panel->dev); in panel_simple_unprepare()
327 panel_simple_wait(p->unprepared_time, p->desc->delay.unprepare); in panel_simple_resume()
329 err = regulator_enable(p->supply); in panel_simple_resume()
335 gpiod_set_value_cansleep(p->enable_gpio, 1); in panel_simple_resume()
337 if (p->desc->delay.prepare) in panel_simple_resume()
338 msleep(p->desc->delay.prepare); in panel_simple_resume()
347 ret = pm_runtime_get_sync(panel->dev); in panel_simple_prepare()
349 pm_runtime_put_autosuspend(panel->dev); in panel_simple_prepare()
360 if (p->desc->delay.enable) in panel_simple_enable()
361 msleep(p->desc->delay.enable); in panel_simple_enable()
373 if (p->ddc) { in panel_simple_get_modes()
374 pm_runtime_get_sync(panel->dev); in panel_simple_get_modes()
376 if (!p->drm_edid) in panel_simple_get_modes()
377 p->drm_edid = drm_edid_read_ddc(connector, p->ddc); in panel_simple_get_modes()
379 drm_edid_connector_update(connector, p->drm_edid); in panel_simple_get_modes()
383 pm_runtime_mark_last_busy(panel->dev); in panel_simple_get_modes()
384 pm_runtime_put_autosuspend(panel->dev); in panel_simple_get_modes()
387 /* add hard-coded panel modes */ in panel_simple_get_modes()
394 drm_connector_set_panel_orientation(connector, p->orientation); in panel_simple_get_modes()
406 if (p->desc->num_timings < num_timings) in panel_simple_get_timings()
407 num_timings = p->desc->num_timings; in panel_simple_get_timings()
411 timings[i] = p->desc->timings[i]; in panel_simple_get_timings()
413 return p->desc->num_timings; in panel_simple_get_timings()
420 return p->orientation; in panel_simple_get_orientation()
445 np = dev->of_node; in panel_dpi_probe()
448 return -ENOMEM; in panel_dpi_probe()
452 return -ENOMEM; in panel_dpi_probe()
454 ret = of_get_display_timing(np, "panel-timing", timing); in panel_dpi_probe()
456 dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n", in panel_dpi_probe()
461 desc->timings = timing; in panel_dpi_probe()
462 desc->num_timings = 1; in panel_dpi_probe()
464 of_property_read_u32(np, "width-mm", &desc->size.width); in panel_dpi_probe()
465 of_property_read_u32(np, "height-mm", &desc->size.height); in panel_dpi_probe()
469 vm.flags = timing->flags; in panel_dpi_probe()
471 desc->bus_flags = bus_flags; in panel_dpi_probe()
474 desc->connector_type = DRM_MODE_CONNECTOR_DPI; in panel_dpi_probe()
476 panel->desc = desc; in panel_dpi_probe()
482 (to_check->field.typ >= bounds->field.min && \
483 to_check->field.typ <= bounds->field.max)
488 const struct panel_desc *desc = panel->desc; in panel_simple_parse_panel_timing_node()
492 if (WARN_ON(desc->num_modes)) { in panel_simple_parse_panel_timing_node()
496 if (WARN_ON(!desc->num_timings)) { in panel_simple_parse_panel_timing_node()
501 for (i = 0; i < panel->desc->num_timings; i++) { in panel_simple_parse_panel_timing_node()
502 const struct display_timing *dt = &panel->desc->timings[i]; in panel_simple_parse_panel_timing_node()
514 if (ot->flags != dt->flags) in panel_simple_parse_panel_timing_node()
518 drm_display_mode_from_videomode(&vm, &panel->override_mode); in panel_simple_parse_panel_timing_node()
519 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER | in panel_simple_parse_panel_timing_node()
524 if (WARN_ON(!panel->override_mode.type)) in panel_simple_parse_panel_timing_node()
533 ret = drm_of_lvds_get_data_mapping(dev->of_node); in panel_simple_override_nondefault_lvds_datamapping()
535 if (ret == -EINVAL) in panel_simple_override_nondefault_lvds_datamapping()
536 dev_warn(dev, "Ignore invalid data-mapping property\n"); in panel_simple_override_nondefault_lvds_datamapping()
539 * Ignore non-existing or malformatted property, fallback to in panel_simple_override_nondefault_lvds_datamapping()
540 * default data-mapping, and return 0. in panel_simple_override_nondefault_lvds_datamapping()
558 if (panel->desc->bpc != bpc || panel->desc->bus_format != ret) { in panel_simple_override_nondefault_lvds_datamapping()
561 override_desc = devm_kmemdup(dev, panel->desc, sizeof(*panel->desc), GFP_KERNEL); in panel_simple_override_nondefault_lvds_datamapping()
563 return -ENOMEM; in panel_simple_override_nondefault_lvds_datamapping()
565 override_desc->bus_format = ret; in panel_simple_override_nondefault_lvds_datamapping()
566 override_desc->bpc = bpc; in panel_simple_override_nondefault_lvds_datamapping()
567 panel->desc = override_desc; in panel_simple_override_nondefault_lvds_datamapping()
584 return -ENOMEM; in panel_simple_probe()
586 panel->desc = desc; in panel_simple_probe()
588 panel->supply = devm_regulator_get(dev, "power"); in panel_simple_probe()
589 if (IS_ERR(panel->supply)) in panel_simple_probe()
590 return PTR_ERR(panel->supply); in panel_simple_probe()
592 panel->enable_gpio = devm_gpiod_get_optional(dev, "enable", in panel_simple_probe()
594 if (IS_ERR(panel->enable_gpio)) in panel_simple_probe()
595 return dev_err_probe(dev, PTR_ERR(panel->enable_gpio), in panel_simple_probe()
598 err = of_drm_get_panel_orientation(dev->of_node, &panel->orientation); in panel_simple_probe()
600 dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err); in panel_simple_probe()
604 ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0); in panel_simple_probe()
606 panel->ddc = of_find_i2c_adapter_by_node(ddc); in panel_simple_probe()
609 if (!panel->ddc) in panel_simple_probe()
610 return -EPROBE_DEFER; in panel_simple_probe()
614 /* Handle the generic panel-dpi binding */ in panel_simple_probe()
618 desc = panel->desc; in panel_simple_probe()
620 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt)) in panel_simple_probe()
624 if (desc->connector_type == DRM_MODE_CONNECTOR_LVDS) { in panel_simple_probe()
625 /* Optional data-mapping property for overriding bus format */ in panel_simple_probe()
631 connector_type = desc->connector_type; in panel_simple_probe()
639 WARN_ON(desc->bus_flags & in panel_simple_probe()
644 WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && in panel_simple_probe()
645 desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG && in panel_simple_probe()
646 desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA); in panel_simple_probe()
647 WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG && in panel_simple_probe()
648 desc->bpc != 6); in panel_simple_probe()
649 WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG || in panel_simple_probe()
650 desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) && in panel_simple_probe()
651 desc->bpc != 8); in panel_simple_probe()
654 dev_warn(dev, "eDP panels moved to panel-edp\n"); in panel_simple_probe()
655 err = -EINVAL; in panel_simple_probe()
658 if (desc->bpc != 6 && desc->bpc != 8) in panel_simple_probe()
659 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); in panel_simple_probe()
670 if (desc->bus_flags & ~bus_flags) in panel_simple_probe()
671 dev_warn(dev, "Unexpected bus_flags(%d)\n", desc->bus_flags & ~bus_flags); in panel_simple_probe()
672 if (!(desc->bus_flags & bus_flags)) in panel_simple_probe()
674 if (desc->bus_format == 0) in panel_simple_probe()
676 if (desc->bpc != 6 && desc->bpc != 8) in panel_simple_probe()
677 dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc); in panel_simple_probe()
680 dev_warn(dev, "Specify a valid connector_type: %d\n", desc->connector_type); in panel_simple_probe()
697 drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type); in panel_simple_probe()
699 err = drm_panel_of_backlight(&panel->base); in panel_simple_probe()
705 drm_panel_add(&panel->base); in panel_simple_probe()
713 if (panel->ddc) in panel_simple_probe()
714 put_device(&panel->ddc->dev); in panel_simple_probe()
729 * different DRM modeset drivers used with panel-simple. Once we've in panel_simple_shutdown()
743 if (panel->base.enabled) in panel_simple_shutdown()
744 drm_panel_disable(&panel->base); in panel_simple_shutdown()
745 if (panel->base.prepared) in panel_simple_shutdown()
746 drm_panel_unprepare(&panel->base); in panel_simple_shutdown()
753 drm_panel_remove(&panel->base); in panel_simple_remove()
758 if (panel->ddc) in panel_simple_remove()
759 put_device(&panel->ddc->dev); in panel_simple_remove()
1529 /* S070PWS19HP-FC21 2017/04/22 */
1556 /* S070SWV29HG-DC44 2017/09/21 */
3574 * https://www.adafruit.com/images/product-files/2406/c3163.pdf
4435 .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
4439 .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
4596 .compatible = "ampire,am-1280800n3tzqw-t00h",
4599 .compatible = "ampire,am-480272h3tmqw-t01h",
4602 .compatible = "ampire,am-800480l1tmqw-t00h",
4608 .compatible = "ampire,am800600p5tmqw-tb8h",
4611 .compatible = "arm,rtsm-display",
4614 .compatible = "armadeus,st0700-adapt",
4665 .compatible = "bananapi,s070wv20-ct16",
4668 .compatible = "boe,bp082wx1-100",
4671 .compatible = "boe,bp101wx1-100",
4674 .compatible = "boe,ev121wxm-n10-1850",
4677 .compatible = "boe,hv070wsa-100",
4683 .compatible = "cdtech,s043wq26h-ct7",
4686 .compatible = "cdtech,s070pws19hp-fc21",
4689 .compatible = "cdtech,s070swv29hg-dc44",
4692 .compatible = "cdtech,s070wv95-ct16",
4695 .compatible = "chefree,ch101olhlwh-002",
4716 .compatible = "dlc,dlc0700yzg-1",
4758 .compatible = "eink,vb3300-kca",
4767 .compatible = "foxlink,fl500wvr00-a0t",
4800 .compatible = "innolux,g070ace-l01",
4803 .compatible = "innolux,g070ace-lh3",
4806 .compatible = "innolux,g070y2-l01",
4809 .compatible = "innolux,g070y2-t02",
4812 .compatible = "innolux,g101ice-l01",
4815 .compatible = "innolux,g121i1-l01",
4818 .compatible = "innolux,g121x1-l03",
4821 .compatible = "innolux,g121xce-l01",
4824 .compatible = "innolux,g156hce-l01",
4827 .compatible = "innolux,n156bge-l21",
4830 .compatible = "innolux,zj070na-01p",
4845 .compatible = "lemaker,bl035-rgb-002",
4851 .compatible = "lincolntech,lcd185-101ct",
4857 .compatible = "logictechno,lt161010-2nhc",
4860 .compatible = "logictechno,lt161010-2nhr",
4863 .compatible = "logictechno,lt170410-2whc",
4866 .compatible = "logictechno,lttd800480070-l2rt",
4869 .compatible = "logictechno,lttd800480070-l6wh-rt",
4872 .compatible = "microtips,mf-101hiebcaf0",
4875 .compatible = "microtips,mf-103hieb0ga0",
4878 .compatible = "mitsubishi,aa070mc01-ca1",
4884 .compatible = "multi-inno,mi0700s4t-6",
4887 .compatible = "multi-inno,mi0800ft-9",
4890 .compatible = "multi-inno,mi1010ait-1cp",
4893 .compatible = "nec,nl12880bc20-05",
4896 .compatible = "nec,nl4827hc19-05b",
4899 .compatible = "netron-dy,e231732",
4902 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
4905 .compatible = "nlt,nl192108ac18-02d",
4911 .compatible = "okaya,rs800480t-7x0gp",
4914 .compatible = "olimex,lcd-olinuxino-43-ts",
4917 .compatible = "ontat,kd50g21-40nt-a1",
4932 .compatible = "osddisplays,osd070t1718-19ts",
4935 .compatible = "pda,91-00156-a0",
4938 .compatible = "powertip,ph128800t006-zhc01",
4941 .compatible = "powertip,ph800480t013-idf02",
4947 .compatible = "qiaodian,qd43003c0-40",
4950 .compatible = "qishenglong,gopher2b-lcd",
4959 .compatible = "rocktech,rk101ii01d-ct",
4983 .compatible = "shelly,sca07010-bfn-lnn",
4992 .compatible = "team-source-display,tst043015cmhx",
4995 .compatible = "tfc,s9700rtwv43tr-01b",
5007 .compatible = "ti,nspire-cx-lcd-panel",
5010 .compatible = "ti,nspire-classic-lcd-panel",
5016 .compatible = "tpk,f07a-0102",
5019 .compatible = "tpk,f10a-0102",
5022 .compatible = "urt,umsh-8596md-t",
5025 .compatible = "urt,umsh-8596md-1t",
5028 .compatible = "urt,umsh-8596md-7t",
5031 .compatible = "urt,umsh-8596md-11t",
5034 .compatible = "urt,umsh-8596md-19t",
5037 .compatible = "urt,umsh-8596md-20t",
5040 .compatible = "vivax,tpc9150-panel",
5043 .compatible = "vxt,vl050-8048nt-c01",
5049 .compatible = "yes-optoelectronics,ytc700tlag-05-201c",
5053 .compatible = "panel-dpi",
5065 desc = of_device_get_match_data(&pdev->dev); in panel_simple_platform_probe()
5067 return -ENODEV; in panel_simple_platform_probe()
5069 return panel_simple_probe(&pdev->dev, desc); in panel_simple_platform_probe()
5074 panel_simple_remove(&pdev->dev); in panel_simple_platform_remove()
5079 panel_simple_shutdown(&pdev->dev); in panel_simple_platform_shutdown()
5090 .name = "panel-simple",
5314 .compatible = "boe,tv080wum-nl0",
5317 .compatible = "lg,ld070wx3-sl01",
5320 .compatible = "lg,lh500wx1-sd03",
5326 .compatible = "lg,acx467akm-7",
5329 .compatible = "osddisplays,osd101t2045-53ts",
5342 desc = of_device_get_match_data(&dsi->dev); in panel_simple_dsi_probe()
5344 return -ENODEV; in panel_simple_dsi_probe()
5346 err = panel_simple_probe(&dsi->dev, &desc->desc); in panel_simple_dsi_probe()
5350 dsi->mode_flags = desc->flags; in panel_simple_dsi_probe()
5351 dsi->format = desc->format; in panel_simple_dsi_probe()
5352 dsi->lanes = desc->lanes; in panel_simple_dsi_probe()
5358 drm_panel_remove(&panel->base); in panel_simple_dsi_probe()
5370 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); in panel_simple_dsi_remove()
5372 panel_simple_remove(&dsi->dev); in panel_simple_dsi_remove()
5377 panel_simple_shutdown(&dsi->dev); in panel_simple_dsi_shutdown()
5382 .name = "panel-simple-dsi",