[PATCH WIP 0/7] drm/exynos: Add autov9 DPU code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Disclaimer: This code is WIP, not even ready for review.
If you have no interest in Exynos DRM, don't waste your time to read
it.

1. why share this ugly code?

This patch is to share and discuss the necessary parts for recent
upstream of exynos dpu_dma, dpp[1]
Please don't look Patch 2-7, this is just proof that dpu_dma,
dpp works. (Also has build break!)
Also, since I don't have much experience in Linux kernel yet, I thought
it's better to share before going too wrong direction.
This patch is a code that successfully boots, modetest and drm from the
latest v6.12-rc1 base.

[1] https://lore.kernel.org/linux-samsung-soc/2e4d3d180f535e57d9cb98e7bac1d14b51ffc5d4.camel@xxxxxxxxx/

2. some want to help or discuss

-Naming problem
Q: What is best naming for files and Kconfig var?

As-is : exynos9_decon.c exynos_dpp.c exynos_dpu_dma.c

For DMA, there already exists an exynos_drm_dma.c, so I named it as
'dpu_dma' according to the IP manual.
But I'm considering make prefix 'exynosautov9_drm' for all or
'exynos_dpu'.

-DECON interface
Q: dpp_update(), dpu_dma_update() function are looks ok?

Origin vendor code split each channel to comaptible data(dma_fg0,
dma_g0, ...) using binding.
Problem is Exynos850 or each SOC has own dma,dpp wiring. (e.g. some
Exynos850 is not wiring with dma <-> dpp. they just dma <-> decon)

So I changed it to code level that decon call register setting
function.
Decon will control dpp, dma based on channel parameter using
dpp_update(), dpu_dma_update() function

-DP
I'm not familiar with almost all parts of DP. If someone is interested
in Exynos DP, any advice would be appreciated.

3. About exynosv9 arhitecture

In the case of the existing DRM 5 series, DECON played a role as CRTC
and sent data to the panel.
I don't know about the DRM 7 series, but the Exynos 8 and auto9 series have
DECON divided into three areas: DMA, DPP, and DECON, to started
supporting more channels and formats.

Exynos auto v9 has 

DPU_DMA - reads the image data from external memory, converts the image
into pixels, and transfers them to remaining display processing
pipeline
DPP (Display Pre-Processor) - frame data from image DMA and applies the
selected image processing function before transferring it to DECON
DECON (Display and Enhancement Controller) - same as previous decon
role.

and dma and dpp are wired with hardware (They can not mix with other
channel)

channel> sysMMU> DMA> DPP
=======================
ch0	MMU_0	GF0	GF0
ch1	MMU_0	G0	GF1
ch2	MMU_1	G1	GF2
ch3	MMU_1	GF1	GF3
ch4	MMU_2	VG0	VG0
ch5	MMU_2	G2	GF4
ch6	MMU_3	G3	GF5
ch7	MMU_3	VG1	VG1

note that exynos850 has 4 channel with different wiring.

4. Todos before RFC

- remove all vendor style code
- more features (resolution, format, plane)
- proper way register setting for dma, dpp channel
- make DP code to proper mainline code using helper functions

To: Inki Dae <inki.dae@xxxxxxxxxxx>
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
To: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>
To: David Virag <virag.david003@xxxxxxxxx>
To: Sam Protsenko <semen.protsenko@xxxxxxxxxx>
Cc: linux-samsung-soc@xxxxxxxxxxxxxxx

Signed-off-by: Kwanghoon Son <k.son@xxxxxxxxxxx>
---
Kwanghoon Son (7):
      drm/exynos: Initial Exynosautov9 drm
      drm/exynos: Add Exynosautov9 decon
      drm/exynos: Add drivers on drv.c
      drm/exynos: exynos DPTX hw
      clk: samsung: exynoautov9: Add dptx cmu
      phy: samsung,dp-video-phy: Add exynosautov9 dp phy
      arm64: dts: exynosautov9: Enable drm

 arch/arm64/boot/dts/exynos/exynosautov9-dpu.dtsi   |  110 +
 arch/arm64/boot/dts/exynos/exynosautov9.dtsi       |   30 +
 drivers/clk/samsung/clk-exynosautov9.c             |   35 +
 drivers/gpu/drm/exynos/Kconfig                     |   17 +
 drivers/gpu/drm/exynos/Makefile                    |    3 +
 drivers/gpu/drm/exynos/exynos9_decon.c             | 1765 +++++++
 drivers/gpu/drm/exynos/exynos_dpp.c                |   96 +
 drivers/gpu/drm/exynos/exynos_dpp.h                |  278 ++
 drivers/gpu/drm/exynos/exynos_dpu_dma.c            |  330 ++
 drivers/gpu/drm/exynos/exynos_dpu_dma.h            |   16 +
 drivers/gpu/drm/exynos/exynos_drm_dp.c             | 5038 ++++++++++++++++++++
 drivers/gpu/drm/exynos/exynos_drm_dp.h             |  964 ++++
 .../gpu/drm/exynos/exynos_drm_dp_link_training.c   |  586 +++
 drivers/gpu/drm/exynos/exynos_drm_drv.c            |   11 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.h            |    3 +
 drivers/gpu/drm/exynos/regs-decon9.h               | 1244 +++++
 drivers/phy/samsung/phy-exynos-dp-video.c          |    9 +-
 include/dt-bindings/clock/samsung,exynosautov9.h   |    4 +
 18 files changed, 10537 insertions(+), 2 deletions(-)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241002-auto9-961d6a19be50

Best regards,
-- 
Kwanghoon Son <k.son@xxxxxxxxxxx>





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux