Skip to content

Enable display driver for Luckfox Pico Ultra and 86Panel#5

Open
rgrizzell wants to merge 6 commits into
plan44:openwrt-p44-6.6.93from
rgrizzell:drm-rv1106-vop
Open

Enable display driver for Luckfox Pico Ultra and 86Panel#5
rgrizzell wants to merge 6 commits into
plan44:openwrt-p44-6.6.93from
rgrizzell:drm-rv1106-vop

Conversation

@rgrizzell

@rgrizzell rgrizzell commented May 29, 2026

Copy link
Copy Markdown

These change enable the VOP display driver for the LF40-720720-ARK and LF40-480480-ARK.

IMG_20260529_001839

https://wiki.luckfox.com/Luckfox-Pico-Ultra/RGB-Screen/

rgrizzell and others added 6 commits May 1, 2026 11:44
- nvmem/rockchip-otp: enable add_legacy_fixed_of_cells so OTP cells are
  accessible via the legacy fixed-of-cells interface used by OpenWRT
- soc/rockchip/Makefile: remove duplicate pm_domains.o build entry; the
  driver was moved to drivers/pmdomain/ in 6.5, building both causes
  "Driver 'rockchip-pm-domain' is already registered" at boot
- include/linux/extcon.h: add EXTCON_USB_VBUS_EN constant (value 3),
  required by phy-rockchip-inno-usb2.c for USB gadget VBUS control
- sound/soc/rockchip/rockchip_i2s_tdm.c: add rv1106 match entry with no
  soc_data (same as vendor 5.10 kernel); without this the i2s driver
  never binds and asoc-simple-card loops on -EPROBE_DEFER

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The RV1106 VOP IP is functionally identical to PX30's lit variant (same
register addresses, same interrupt layout, single primary RGB window).
The vendor 5.10 SDK calls the same IP rk3366_lit, but PX30 in 6.6
already covers it -- every register define I checked matches byte-for-
byte (PX30_DSP_CTRL0 == RK3366_LIT_DSP_CTRL0 == 0x20, etc).

So the whole port is one new vop_data struct that reuses PX30's
existing per-block tables, plus an of_match entry. ~15 LOC.

RV1106-specific bits from the vendor source:
  - VOP_VERSION(2, 0xc)            -- carried over
  - max output 1280x1280 (vs PX30's 1920x1080) -- carried over
  - GRF-driven dclk-inversion      -- dropped; 6.6 struct vop_data has
    no grf_ctrl field, and the driver-core support for it was lost
    between 5.10 and 6.6. Re-introducing requires touching
    rockchip_drm_vop.c which is out of scope per the spec; if a panel
    needs inverted dclk we can revisit.
  - .soc_id / .vop_id / .max_input -- 5.10-only fields; dropped.

Verified against vendor luckfox-pico SDK source at
sysdrv/source/kernel/drivers/gpu/drm/rockchip/rockchip_vop_reg.c.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
panel_dpi_probe leaves desc->bus_format = 0, which means
panel_simple_get_modes never calls
drm_display_info_set_bus_formats() and the connector ends up with
no bus_format. The encoder then defaults its parallel-RGB output to
whatever the hardware happens to produce (often RGB888 / 24-bit),
which mismatches actual 18-bit panels and shows up as colored
diagonal stripes and tearing on the LCD.

The DT binding for panel-dpi doesn't formally describe bus-format,
but many in-tree DTSes already carry it on the panel node. Read it
opportunistically so existing bindings work without forcing every
board to add a wrapper around drm_panel-bridge or use a custom
compatible.

No-op for panels that don't supply bus-format -- desc->bus_format
stays 0 and behavior is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The RV1106 routes the VOP's parallel-RGB output through two GRF
bypass gates (VENC_GRF_VOP_IO_WRAPPER bit[1:0] @ 0x1000c and
VOGRF_VOP_PIPE_BYPASS bit[1:0] @ 0x60034) that reset to the
bypass-enabled state. The vendor 5.10 rockchip_rgb driver clears
them on enable; mainline's rockchip_rgb is a thin library that never
touches the GRF, so on a fresh boot the parallel-RGB data path stays
in bypass and the panel shows corrupted/striped output with the red
channel dropped.

Clear both gates (HIWORD write, bits[1:0]=0) when rockchip_rgb_init
binds an RGB output, guarded on the GRF being rockchip,rv1106-grf so
it is a no-op on every other SoC that uses this library.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
vop_crtc_atomic_enable enables the 24->18-bit dither-down stage only
when dither_bpc (output_bpc ? : 10) equals 6. output_bpc was set only
on the eDP path, so a parallel-RGB panel ran with out_mode=P666 but the
dither block disabled, truncating instead of reducing the output. Set
output_bpc from the connector bus format so the dither stage matches
the panel depth.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@rgrizzell rgrizzell marked this pull request as ready for review May 29, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants