The display controller of the Ingenic X1600 is not the one ingenic-drm drives: it fetches frames through descriptors and keeps its interface and timings in register blocks of their own. It is the X2000's controller without the composer. This series adds a binding and a driver for it, then the panel of the HiBy R1, an X1600 audio player: 480x800 parallel RGB, set up over a 3-wire SPI bus.
The driver covers what the R1 uses and what could be tested: parallel RGB panels on a 24-bit bus and one full-screen RGB565 plane. The composer, smart panels and other pixel formats are left out. Two things come from the vendor kernel rather than the manual. A flip also writes SRD_CHAIN_START, which the manual doesn't describe for a running controller; flips without it were not tried. The panel's set-up sequence is the vendor's too: HiBy calls the panel LG35583, its maker and controller are unknown, hence the hiby prefix. Changes in v2, all in 3/5 and all found by the Sashiko review of v1: - Commits wait for flip_done instead of a vblank before the planes are cleaned up. A flip's event waits until the controller reports reading the new descriptor, which can be a frame after the vblank that v1's default commit_tail waited for, so the old framebuffer could be freed while still scanned out. - A CRTC being enabled sends its event from atomic_enable(), once the controller runs; v1 sent it from atomic_flush(), which runs first. - A plane that is not visible is rejected: the controller always scans out a whole frame, so v1 would have read past the end of a small framebuffer placed off-screen. - atomic_disable() returns early when atomic_enable() failed to start the pixel clock, instead of touching an unclocked controller. Tested on a HiBy R1: the fbdev console and a player drawing through fbdev, blanking and unblanking, 60 page flips in 0.97 s at about 61 Hz, and the colour order (RGB order swaps red and blue on this panel). For v2 also: 120 fbdev pans in 1.95 s (one flip per frame, none timing out), three blank/unblank cycles, and a 64x64 framebuffer set on the primary plane just past the right edge through SETPLANE, which v1 accepted and v2 refuses with -EINVAL, while a full-screen one is still accepted. The X1600 has no device tree upstream yet; its support is being posted one subsystem at a time. The R1's backlight uses the X1600 PWM driver posted separately, now at v2: https://lore.kernel.org/r/[email protected] v1: https://lore.kernel.org/r/[email protected] Olivier Louvignes (5): dt-bindings: vendor-prefixes: Add HiBy dt-bindings: display: Add the Ingenic X1600 LCD controller drm/ingenic: Add a driver for the X1600 LCD controller dt-bindings: display: panel: Add the HiBy LG35583 drm/panel: Add the HiBy LG35583 .../bindings/display/ingenic,x1600-lcd.yaml | 70 ++ .../bindings/display/panel/hiby,lg35583.yaml | 71 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 12 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/ingenic/Kconfig | 22 + drivers/gpu/drm/ingenic/Makefile | 1 + drivers/gpu/drm/ingenic/ingenic-x1600-drm.c | 744 ++++++++++++++++++ drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-hiby-lg35583.c | 342 ++++++++ 11 files changed, 1276 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/ingenic,x1600-lcd.yaml create mode 100644 Documentation/devicetree/bindings/display/panel/hiby,lg35583.yaml create mode 100644 drivers/gpu/drm/ingenic/ingenic-x1600-drm.c create mode 100644 drivers/gpu/drm/panel/panel-hiby-lg35583.c base-commit: cf61bef3801c3c9d0d8c39026b7b2fb242898a3a -- 2.39.5
