[PATCH 0/3] RFT: PL111 DRM conversion of nspire
Linus Walleij
linus.walleij at linaro.org
Tue Jul 23 13:37:52 UTC 2019
So this is a cold-coded attempt to move the TI nspire over to
using DRM. It is more or less the last user of the old fbdev
driver so it is a noble cause and interesting usecase.
This can be applied on top of a vanilla Torvalds v5.3-rc1
kernel out since sunday.
I do not expect these patches to "just work", I expect them to
need some hacking, so someone who is actually working on the
hardware will need to step in and fix it up.
It does outline the overall idea of how to do this.
I found no defconfig for nspire in the kernel so I used
ARMv4t multi.
Configuring the driver for nspire:
- Disable CONFIG_FB_ARMCLCD
- Enable CONFIG_DRM_PL111, CONFIG_DRM_PANEL_SIMPLE
Hacker notes for nspire:
- I don't know which PrimeCell ID this hardware has, I hope
the amba_id mask in drivers/gpu/drm/pl111/pl111_drv.c for
PL111 and PL110 will match it. Please confirm that you get
a clean probe call, else report what ID this has.
- The 24bit RGB frame buffer may be a bit much for the PL111
in the TI nspire to handle. Try editing the .fb_bpp in
drivers/gpu/drm/pl111/pl111_drv.c down to 16 if this is
the PL111 variant. If it is the PL110 variant, we will get
16 buts framebuffer anyway.
- I have hard-coded the panels to 1MHz, based on the fact
that the AHB clock into the CLCD appears to be 48 MHz
and the hard-coded TIM2 value for the classic means
"divide by 48" and this seems to want the clock freq
divided down to 1MHz. Verify this by adding prints
inside drivers/gpu/drm/pl111/pl111_display.c in the
function pl111_clk_div_set_rate() to verify that the
divider gets set to 48 in TIM2_PCD_HI and
TIM2_PCD_LO. TIM2_PCD_LO bits 0..4 = 10000 and
TIM2_PCD_HI bits 27..31 = 00001 in that register.
Please test and fix, if you can.
Linus Walleij (3):
RFT: drm/pl111: Support grayscale
RTF: drm/panel: simple: Add TI nspire panels
RFT: ARM: nspire: Move CLCD set-up to device tree
arch/arm/boot/dts/nspire-classic.dtsi | 19 ++++-
arch/arm/boot/dts/nspire-cx.dts | 18 +++-
arch/arm/boot/dts/nspire.dtsi | 10 ++-
arch/arm/mach-nspire/Makefile | 1 -
arch/arm/mach-nspire/clcd.c | 114 --------------------------
arch/arm/mach-nspire/clcd.h | 10 ---
arch/arm/mach-nspire/nspire.c | 25 ------
drivers/gpu/drm/panel/panel-simple.c | 63 ++++++++++++++
drivers/gpu/drm/pl111/pl111_display.c | 28 ++++++-
include/linux/amba/clcd-regs.h | 1 +
10 files changed, 133 insertions(+), 156 deletions(-)
delete mode 100644 arch/arm/mach-nspire/clcd.c
delete mode 100644 arch/arm/mach-nspire/clcd.h
--
2.21.0
More information about the dri-devel
mailing list