mbox series

[v11,00/24] drm/rockchip: RK356x VOP2 support

Message ID 20220422072841.2206452-1-s.hauer@pengutronix.de (mailing list archive)
Headers show
Series drm/rockchip: RK356x VOP2 support | expand

Message

Sascha Hauer April 22, 2022, 7:28 a.m. UTC
It's v11 time. There's only one small change to v10. Discussion seems to
have settled now. Is there anything left that prevents the series from
being merged? I'd really like to have it in during the next merge
window.

This series still depends on:
drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
arm64: dts: rockchip: add basic dts for the radxa rock3 model a

Sascha

Changes since v10:
- relax mode_valid hook rather than dropping it in hdmi driver

Changes since v9:
- rebase on v5.18-rc1
- Do not register windows which don't have its own framebuffer on RK3566
- fix mixed up register writes in vop2_setup_dly_for_windows()
- move call to rockchip_drm_dma_attach_device() from vop2_bind() to vop2_enable()
- Fix zpos handling

Changes since v8:
- make hclk_vo a critical clock instead of enabling it in the hdmi driver
- Fix vop2_setup_layer_mixer(), reported by Andy Yan
- Limit planes possible_crtcs to actually existing crtcs
- simplify vop2_create_crtc() a bit

Changes since v7:
- rename hclk to niu

Changes since v6:
- Move of_graph parsing out of runtime code to initialization

Changes since v5:
- Add new patch to fix dw-hdmi of_graph binding
- Drop "drm/encoder: Add of_graph port to struct drm_encoder" and solve
  issue internally in the driver
- make checkpatch cleaner

Changes since v4:
- Reorder patches in a way that binding/dts/driver patches are closer together
- Drop clk patches already applied by Heiko

Changes since v3:
- added changelog to each patch
- Add 4k support to hdmi driver
- rebase on v5.17-rc1

Changes since v2:
- Add pin names to HDMI supply pin description
- Add hclk support to HDMI driver
- Dual license rockchip-vop2 binding, update binding
- Add HDMI connector to board dts files
- drop unnecessary gamma_lut registers from vop2
- Update dclk_vop[012] clock handling, no longer hacks needed
- Complete regmap conversion

Changes since v1:
- drop all unnecessary waiting for frames within atomic modeset and plane update
- Cluster subwin support removed
- gamma support removed
- unnecessary irq_lock removed
- interrupt handling simplified
- simplified zpos handling
- drop is_alpha_support(), use fb->format->has_alpha instead
- use devm_regulator_get() rather than devm_regulator_get_optional() for hdmi regulators
- Use fixed number of planes per video port
- Drop homegrown regmap code from vop2 driver (not complete yet)
- Add separate include file for vop2 driver to not pollute the vop include

Andy Yan (1):
  drm: rockchip: Add VOP2 driver

Benjamin Gaignard (1):
  dt-bindings: display: rockchip: dw-hdmi: Add compatible for rk3568
    HDMI

Douglas Anderson (2):
  drm/rockchip: dw_hdmi: Use auto-generated tables
  drm/rockchip: dw_hdmi: Set cur_ctr to 0 always

Michael Riesch (2):
  arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a
  arm64: dts: rockchip: enable vop2 and hdmi tx on rock-3a

Nickey Yang (1):
  drm/rockchip: dw_hdmi: add default 594Mhz clk for 4K@60hz

Sascha Hauer (17):
  clk: rk3568: Mark hclk_vo as critical
  drm/rockchip: Embed drm_encoder into rockchip_decoder
  drm/rockchip: Add crtc_endpoint_id to rockchip_encoder
  drm/rockchip: dw_hdmi: rename vpll clock to reference clock
  dt-bindings: display: rockchip: dw-hdmi: use "ref" as clock name
  arm64: dts: rockchip: rk3399: rename HDMI ref clock to 'ref'
  drm/rockchip: dw_hdmi: add rk3568 support
  drm/rockchip: dw_hdmi: add regulator support
  dt-bindings: display: rockchip: dw-hdmi: Add regulator support
  drm/rockchip: dw_hdmi: relax mode_valid hook
  dt-bindings: display: rockchip: dw-hdmi: Make unwedge pinctrl optional
  arm64: dts: rockchip: rk356x: Add VOP2 nodes
  arm64: dts: rockchip: rk356x: Add HDMI nodes
  arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi
  drm/rockchip: Make VOP driver optional
  dt-bindings: display: rockchip: Add binding for VOP2
  dt-bindings: display: rockchip: dw-hdmi: fix ports description

 .../display/rockchip/rockchip,dw-hdmi.yaml    |   46 +-
 .../display/rockchip/rockchip-vop2.yaml       |  140 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      |    2 +-
 .../boot/dts/rockchip/rk3566-quartz64-a.dts   |   47 +
 arch/arm64/boot/dts/rockchip/rk3566.dtsi      |    4 +
 .../boot/dts/rockchip/rk3568-evb1-v10.dts     |   47 +
 .../boot/dts/rockchip/rk3568-rock-3a.dts      |   47 +
 arch/arm64/boot/dts/rockchip/rk3568.dtsi      |    4 +
 arch/arm64/boot/dts/rockchip/rk356x.dtsi      |   83 +
 drivers/clk/rockchip/clk-rk3568.c             |    1 +
 drivers/gpu/drm/rockchip/Kconfig              |   14 +
 drivers/gpu/drm/rockchip/Makefile             |    4 +-
 .../gpu/drm/rockchip/analogix_dp-rockchip.c   |   32 +-
 drivers/gpu/drm/rockchip/cdn-dp-core.c        |   18 +-
 drivers/gpu/drm/rockchip/cdn-dp-core.h        |    2 +-
 .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   |   17 +-
 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c   |  257 +-
 drivers/gpu/drm/rockchip/inno_hdmi.c          |   32 +-
 drivers/gpu/drm/rockchip/rk3066_hdmi.c        |   34 +-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |   36 +-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.h   |   20 +-
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c    |    2 +
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h   |   15 +
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c  | 2706 +++++++++++++++++
 drivers/gpu/drm/rockchip/rockchip_drm_vop2.h  |  477 +++
 drivers/gpu/drm/rockchip/rockchip_lvds.c      |   26 +-
 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c  |  281 ++
 include/dt-bindings/soc/rockchip,vop2.h       |   14 +
 28 files changed, 4235 insertions(+), 173 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
 create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
 create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_vop2.h
 create mode 100644 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
 create mode 100644 include/dt-bindings/soc/rockchip,vop2.h

Comments

Michael Riesch April 25, 2022, 12:34 p.m. UTC | #1
Hello Sascha,

On 4/22/22 09:28, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.

Oh yes that'd be awesome :-)

On a RK3568 EVB1 and a Radxa Rock 3 Model A connected to a HP 27f 4K
monitor, using

$ modetest -M rockchip -s 69:{1920x1080,3840x2160}-{30,60}

as well as using weston and glmark2-es2-wayland:

Tested-by: Michael Riesch <michael.riesch@wolfvision.net>

Thanks and best regards,
Michael


> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> Sascha
> 
> Changes since v10:
> - relax mode_valid hook rather than dropping it in hdmi driver
> 
> Changes since v9:
> - rebase on v5.18-rc1
> - Do not register windows which don't have its own framebuffer on RK3566
> - fix mixed up register writes in vop2_setup_dly_for_windows()
> - move call to rockchip_drm_dma_attach_device() from vop2_bind() to vop2_enable()
> - Fix zpos handling
> 
> Changes since v8:
> - make hclk_vo a critical clock instead of enabling it in the hdmi driver
> - Fix vop2_setup_layer_mixer(), reported by Andy Yan
> - Limit planes possible_crtcs to actually existing crtcs
> - simplify vop2_create_crtc() a bit
> 
> Changes since v7:
> - rename hclk to niu
> 
> Changes since v6:
> - Move of_graph parsing out of runtime code to initialization
> 
> Changes since v5:
> - Add new patch to fix dw-hdmi of_graph binding
> - Drop "drm/encoder: Add of_graph port to struct drm_encoder" and solve
>   issue internally in the driver
> - make checkpatch cleaner
> 
> Changes since v4:
> - Reorder patches in a way that binding/dts/driver patches are closer together
> - Drop clk patches already applied by Heiko
> 
> Changes since v3:
> - added changelog to each patch
> - Add 4k support to hdmi driver
> - rebase on v5.17-rc1
> 
> Changes since v2:
> - Add pin names to HDMI supply pin description
> - Add hclk support to HDMI driver
> - Dual license rockchip-vop2 binding, update binding
> - Add HDMI connector to board dts files
> - drop unnecessary gamma_lut registers from vop2
> - Update dclk_vop[012] clock handling, no longer hacks needed
> - Complete regmap conversion
> 
> Changes since v1:
> - drop all unnecessary waiting for frames within atomic modeset and plane update
> - Cluster subwin support removed
> - gamma support removed
> - unnecessary irq_lock removed
> - interrupt handling simplified
> - simplified zpos handling
> - drop is_alpha_support(), use fb->format->has_alpha instead
> - use devm_regulator_get() rather than devm_regulator_get_optional() for hdmi regulators
> - Use fixed number of planes per video port
> - Drop homegrown regmap code from vop2 driver (not complete yet)
> - Add separate include file for vop2 driver to not pollute the vop include
> 
> Andy Yan (1):
>   drm: rockchip: Add VOP2 driver
> 
> Benjamin Gaignard (1):
>   dt-bindings: display: rockchip: dw-hdmi: Add compatible for rk3568
>     HDMI
> 
> Douglas Anderson (2):
>   drm/rockchip: dw_hdmi: Use auto-generated tables
>   drm/rockchip: dw_hdmi: Set cur_ctr to 0 always
> 
> Michael Riesch (2):
>   arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a
>   arm64: dts: rockchip: enable vop2 and hdmi tx on rock-3a
> 
> Nickey Yang (1):
>   drm/rockchip: dw_hdmi: add default 594Mhz clk for 4K@60hz
> 
> Sascha Hauer (17):
>   clk: rk3568: Mark hclk_vo as critical
>   drm/rockchip: Embed drm_encoder into rockchip_decoder
>   drm/rockchip: Add crtc_endpoint_id to rockchip_encoder
>   drm/rockchip: dw_hdmi: rename vpll clock to reference clock
>   dt-bindings: display: rockchip: dw-hdmi: use "ref" as clock name
>   arm64: dts: rockchip: rk3399: rename HDMI ref clock to 'ref'
>   drm/rockchip: dw_hdmi: add rk3568 support
>   drm/rockchip: dw_hdmi: add regulator support
>   dt-bindings: display: rockchip: dw-hdmi: Add regulator support
>   drm/rockchip: dw_hdmi: relax mode_valid hook
>   dt-bindings: display: rockchip: dw-hdmi: Make unwedge pinctrl optional
>   arm64: dts: rockchip: rk356x: Add VOP2 nodes
>   arm64: dts: rockchip: rk356x: Add HDMI nodes
>   arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi
>   drm/rockchip: Make VOP driver optional
>   dt-bindings: display: rockchip: Add binding for VOP2
>   dt-bindings: display: rockchip: dw-hdmi: fix ports description
> 
>  .../display/rockchip/rockchip,dw-hdmi.yaml    |   46 +-
>  .../display/rockchip/rockchip-vop2.yaml       |  140 +
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi      |    2 +-
>  .../boot/dts/rockchip/rk3566-quartz64-a.dts   |   47 +
>  arch/arm64/boot/dts/rockchip/rk3566.dtsi      |    4 +
>  .../boot/dts/rockchip/rk3568-evb1-v10.dts     |   47 +
>  .../boot/dts/rockchip/rk3568-rock-3a.dts      |   47 +
>  arch/arm64/boot/dts/rockchip/rk3568.dtsi      |    4 +
>  arch/arm64/boot/dts/rockchip/rk356x.dtsi      |   83 +
>  drivers/clk/rockchip/clk-rk3568.c             |    1 +
>  drivers/gpu/drm/rockchip/Kconfig              |   14 +
>  drivers/gpu/drm/rockchip/Makefile             |    4 +-
>  .../gpu/drm/rockchip/analogix_dp-rockchip.c   |   32 +-
>  drivers/gpu/drm/rockchip/cdn-dp-core.c        |   18 +-
>  drivers/gpu/drm/rockchip/cdn-dp-core.h        |    2 +-
>  .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   |   17 +-
>  drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c   |  257 +-
>  drivers/gpu/drm/rockchip/inno_hdmi.c          |   32 +-
>  drivers/gpu/drm/rockchip/rk3066_hdmi.c        |   34 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |   36 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_drv.h   |   20 +-
>  drivers/gpu/drm/rockchip/rockchip_drm_fb.c    |    2 +
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.h   |   15 +
>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c  | 2706 +++++++++++++++++
>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.h  |  477 +++
>  drivers/gpu/drm/rockchip/rockchip_lvds.c      |   26 +-
>  drivers/gpu/drm/rockchip/rockchip_vop2_reg.c  |  281 ++
>  include/dt-bindings/soc/rockchip,vop2.h       |   14 +
>  28 files changed, 4235 insertions(+), 173 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
>  create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
>  create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_vop2.h
>  create mode 100644 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
>  create mode 100644 include/dt-bindings/soc/rockchip,vop2.h
>
Daniel Stone April 25, 2022, 2:48 p.m. UTC | #2
On Fri, 22 Apr 2022 at 08:30, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.

I don't believe there's anything left, no; the core driver itself remains:
Acked-by: Daniel Stone <daniels@collabora.com>

At this point there's no reason to not push it into the tree, and any
remaining bugs can be shaken out and fixed there.

Cheers,
Daniel
Heiko Stuebner May 3, 2022, 9:12 a.m. UTC | #3
On Fri, 22 Apr 2022 09:28:17 +0200, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> [...]

Applied, thanks!

[01/24] clk: rk3568: Mark hclk_vo as critical
        commit: 602c602204dff45b8fb4dbe5ca5ba163991fb778

Best regards,
Heiko Stuebner May 3, 2022, 9:26 a.m. UTC | #4
On Fri, 22 Apr 2022 09:28:17 +0200, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> [...]

Applied, thanks!

[02/24] drm/rockchip: Embed drm_encoder into rockchip_decoder
        commit: 540b8f271e53362a308f6bf288d38b630cf3fbd2
[03/24] drm/rockchip: Add crtc_endpoint_id to rockchip_encoder
        commit: cf544c6a885c52d79e4d8bf139fb8cb63a878512
[04/24] drm/rockchip: dw_hdmi: rename vpll clock to reference clock
        commit: a9d37e684492ab5db1cce28b655e20c01191873f
[05/24] dt-bindings: display: rockchip: dw-hdmi: use "ref" as clock name
        commit: a5fc012e6ee75a899173398573e77207542f588a

Best regards,
Heiko Stuebner May 3, 2022, 9:29 a.m. UTC | #5
On Fri, 22 Apr 2022 09:28:17 +0200, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> [...]

Applied, thanks!

[06/24] arm64: dts: rockchip: rk3399: rename HDMI ref clock to 'ref'
        commit: bd820bc5e77087a71a42c36f2660b8a35d2c01a5

Best regards,
Heiko Stuebner May 3, 2022, 11:02 a.m. UTC | #6
On Fri, 22 Apr 2022 09:28:17 +0200, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> [...]

Applied, thanks!

[07/24] drm/rockchip: dw_hdmi: add rk3568 support
        commit: 28bbb5ffbe32741e65d798070986d212cc11e1bb
[08/24] dt-bindings: display: rockchip: dw-hdmi: Add compatible for rk3568 HDMI
        commit: 77b0693f875d4d916d0518ac0de68d4d0de3934f
[09/24] drm/rockchip: dw_hdmi: add regulator support
        commit: ca80c4eb4b01a7f1c2f333d0a329937ef9c7f03a
[10/24] dt-bindings: display: rockchip: dw-hdmi: Add regulator support
        commit: 80266ccb864b6443fd0bf54bb17444d2632fad21
[15/24] dt-bindings: display: rockchip: dw-hdmi: Make unwedge pinctrl optional
        commit: 6e944f52a225484b87bb343d0ba28165edf04b19

Best regards,
Heiko Stuebner May 4, 2022, 12:08 p.m. UTC | #7
On Fri, 22 Apr 2022 09:28:17 +0200, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> [...]

Applied, thanks!

[21/24] drm/rockchip: Make VOP driver optional
        commit: b382406a2cf4afaa7320a7ad4b298ed6e2675437
[22/24] drm: rockchip: Add VOP2 driver
        commit: 604be85547ce4d61b89292d2f9a78c721b778c16

 - Made checkpatch --strict happier
 - move vop2.h binding header over to here

[23/24] dt-bindings: display: rockchip: Add binding for VOP2
        commit: 74015e2650bad641a02100cdf0ac23a96c1a2553
[24/24] dt-bindings: display: rockchip: dw-hdmi: fix ports description
        commit: 4073e42028de0f6ebbd86a9b30aaa5501bcdff59

Best regards,
Heiko Stuebner May 17, 2022, 6:22 p.m. UTC | #8
On Fri, 22 Apr 2022 09:28:17 +0200, Sascha Hauer wrote:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> [...]

Applied for 5.20.

The vop2 dt-binding header is going through the drm tree and
the reg-names addition is going through drm-misc-next-fixes
into the 5.19-rc kernels and this is a big bunch of dt changes
so I'm leaving them for 5.20.

[16/24] arm64: dts: rockchip: rk356x: Add VOP2 nodes
        commit: 9b3c9f6e57ef26b8478da64e3d49d0438291a98a
[17/24] arm64: dts: rockchip: rk356x: Add HDMI nodes
        commit: db24799d31e7149bd8495a5f41c408434ca1a654
[18/24] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi
        commit: f2cdaaae9b947970842196ac93d71b0daad3e629
[19/24] arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a
        commit: 97d7309a70b03d01a154c4308f423b020f7d397e
[20/24] arm64: dts: rockchip: enable vop2 and hdmi tx on rock-3a
        commit: 281f94d9cbac31c1c112d09883bc42021435f1ad

Best regards,
Heiko Stuebner May 17, 2022, 6:27 p.m. UTC | #9
Am Freitag, 22. April 2022, 09:28:17 CEST schrieb Sascha Hauer:
> It's v11 time. There's only one small change to v10. Discussion seems to
> have settled now. Is there anything left that prevents the series from
> being merged? I'd really like to have it in during the next merge
> window.
> 
> This series still depends on:
> drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> 
> Sascha

I've now picked up everything except the hdmi-rate stuff in some way.
The driver changes will go into 5.19 and the DT-changes into 5.20.

I'll now move the series out of my focus and would expect further
hdmi rate voodoo to start a new series :-) .

Thanks to all involved for working on this.
Heiko
Maya Matuszczyk May 20, 2022, 10:02 a.m. UTC | #10
Hello,

wt., 17 maj 2022 o 20:28 Heiko Stuebner <heiko@sntech.de> napisał(a):
>
> Am Freitag, 22. April 2022, 09:28:17 CEST schrieb Sascha Hauer:
> > It's v11 time. There's only one small change to v10. Discussion seems to
> > have settled now. Is there anything left that prevents the series from
> > being merged? I'd really like to have it in during the next merge
> > window.
> >
> > This series still depends on:
> > drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> > arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> >
> > Sascha
>
> I've now picked up everything except the hdmi-rate stuff in some way.
> The driver changes will go into 5.19 and the DT-changes into 5.20.
>
> I'll now move the series out of my focus and would expect further
> hdmi rate voodoo to start a new series :-) .
>
> Thanks to all involved for working on this.
> Heiko

What do I need besides this patch series, mentioned before IOMMU refactor,
and DTS changes for MIPI-DSI support on RK356x?
I'm working on mainline kernel support for a a RK3566 board with
a DSI display.

Best Regards,
Maya Matuszczyk
Sascha Hauer May 20, 2022, 10:12 a.m. UTC | #11
Hi Maya,

On Fri, May 20, 2022 at 12:02:33PM +0200, Maya Matuszczyk wrote:
> Hello,
> 
> wt., 17 maj 2022 o 20:28 Heiko Stuebner <heiko@sntech.de> napisał(a):
> >
> > Am Freitag, 22. April 2022, 09:28:17 CEST schrieb Sascha Hauer:
> > > It's v11 time. There's only one small change to v10. Discussion seems to
> > > have settled now. Is there anything left that prevents the series from
> > > being merged? I'd really like to have it in during the next merge
> > > window.
> > >
> > > This series still depends on:
> > > drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> > > arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> > >
> > > Sascha
> >
> > I've now picked up everything except the hdmi-rate stuff in some way.
> > The driver changes will go into 5.19 and the DT-changes into 5.20.
> >
> > I'll now move the series out of my focus and would expect further
> > hdmi rate voodoo to start a new series :-) .
> >
> > Thanks to all involved for working on this.
> > Heiko
> 
> What do I need besides this patch series, mentioned before IOMMU refactor,
> and DTS changes for MIPI-DSI support on RK356x?
> I'm working on mainline kernel support for a a RK3566 board with
> a DSI display.

Apart from these patches you'll need updates for the DSI. I've pushed
these once to
https://git.pengutronix.de/cgit/sha/linux/log/?h=rockchip-vop2-mipi
Particularly I think you need:

383ff250345f0 drm: rockchip: dw-mipi-dsi: Call host attach from probe
e79a16ead833d dw-mipi-dsi-rockchip: increase bandwidth
ac400bdd8d0cb drm: rockchip: dw-mipi-dsi-rockchip: Add rk3568 support
b6b7fabbc9fe2 drm: panel-simple: Add init sequence support
3c13a030e92f3 arm64: dts: rockchip: rk3568-evb: Add Display support
3433935a31675 arm64: dts: rockchip: rk356x: Add dsi nodes

I'm not sure how well these fit onto the current state. I'll likely
update the branch when the VOP2 has hit mainline after the next merge
window. I have no plans currently to upstream the DSI bits though.

Regards,
 Sascha
Peter Geis May 20, 2022, 11:56 a.m. UTC | #12
On Fri, May 20, 2022 at 6:12 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> Hi Maya,
>
> On Fri, May 20, 2022 at 12:02:33PM +0200, Maya Matuszczyk wrote:
> > Hello,
> >
> > wt., 17 maj 2022 o 20:28 Heiko Stuebner <heiko@sntech.de> napisał(a):
> > >
> > > Am Freitag, 22. April 2022, 09:28:17 CEST schrieb Sascha Hauer:
> > > > It's v11 time. There's only one small change to v10. Discussion seems to
> > > > have settled now. Is there anything left that prevents the series from
> > > > being merged? I'd really like to have it in during the next merge
> > > > window.
> > > >
> > > > This series still depends on:
> > > > drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> > > > arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> > > >
> > > > Sascha
> > >
> > > I've now picked up everything except the hdmi-rate stuff in some way.
> > > The driver changes will go into 5.19 and the DT-changes into 5.20.
> > >
> > > I'll now move the series out of my focus and would expect further
> > > hdmi rate voodoo to start a new series :-) .
> > >
> > > Thanks to all involved for working on this.
> > > Heiko
> >
> > What do I need besides this patch series, mentioned before IOMMU refactor,
> > and DTS changes for MIPI-DSI support on RK356x?
> > I'm working on mainline kernel support for a a RK3566 board with
> > a DSI display.
>
> Apart from these patches you'll need updates for the DSI. I've pushed
> these once to
> https://git.pengutronix.de/cgit/sha/linux/log/?h=rockchip-vop2-mipi
> Particularly I think you need:
>
> 383ff250345f0 drm: rockchip: dw-mipi-dsi: Call host attach from probe
> e79a16ead833d dw-mipi-dsi-rockchip: increase bandwidth
> ac400bdd8d0cb drm: rockchip: dw-mipi-dsi-rockchip: Add rk3568 support
> b6b7fabbc9fe2 drm: panel-simple: Add init sequence support
> 3c13a030e92f3 arm64: dts: rockchip: rk3568-evb: Add Display support
> 3433935a31675 arm64: dts: rockchip: rk356x: Add dsi nodes
>
> I'm not sure how well these fit onto the current state. I'll likely
> update the branch when the VOP2 has hit mainline after the next merge
> window. I have no plans currently to upstream the DSI bits though.

Yeah DSI needs a bit of love with the merged version. Even updating
the series to the new version we get a null pointer exception:

[    2.304528] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000250
[    2.305311] Mem abort info:
[    2.305563]   ESR = 0x96000005
[    2.305839]   EC = 0x25: DABT (current EL), IL = 32 bits
[    2.306311]   SET = 0, FnV = 0
[    2.306586]   EA = 0, S1PTW = 0
[    2.306868]   FSC = 0x05: level 1 translation fault
[    2.307301] Data abort info:
[    2.307559]   ISV = 0, ISS = 0x00000005
[    2.307926]   CM = 0, WnR = 0
[    2.308197] [0000000000000250] user address but active_mm is swapper
[    2.308763] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    2.309260] Modules linked in:
[    2.309541] CPU: 0 PID: 51 Comm: kworker/u8:1 Not tainted
5.18.0-rc2-00072-g4d2476a40e3e-dirty #307
[    2.310343] Hardware name: Pine64 RK3566 Quartz64-A Board (DT)
[    2.310862] Workqueue: events_unbound deferred_probe_work_func
[    2.311391] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    2.312010] pc : __drm_crtc_init_with_planes+0x44/0x2d0
[    2.312482] lr : drm_crtc_init_with_planes+0x64/0x94
[    2.312929] sp : ffffffc00aaa3830
[    2.313226] x29: ffffffc00aaa3830 x28: 0000000000000001 x27: ffffffc00aaa38c0
[    2.313866] x26: ffffffc009950fb0 x25: ffffff8100f24080 x24: ffffffc009452748
[    2.314504] x23: ffffffc009950fb0 x22: 0000000000000000 x21: 0000000000000008
[    2.315142] x20: ffffff8100d1e800 x19: ffffff8100f244e8 x18: 00000000fffffffd
[    2.315781] x17: 08000000000000d1 x16: 0800000000000091 x15: 0000000000000020
[    2.316419] x14: 0000000000000000 x13: ffffff8100f24478 x12: ffffff8100f2445d
[    2.317057] x11: ffffffc00aaa3920 x10: ffffffc00aaa3920 x9 : ffffffc008843994
[    2.317694] x8 : ffffffc00aaa3910 x7 : ffffffc00aaa3910 x6 : ffffffc00aaa38c0
[    2.318333] x5 : ffffffc009950fb0 x4 : ffffffc0094522a0 x3 : 0000000000000000
[    2.318970] x2 : 0000000000000008 x1 : ffffff8100f244e8 x0 : ffffff8100d1e800
[    2.319609] Call trace:
[    2.319829]  __drm_crtc_init_with_planes+0x44/0x2d0
[    2.320268]  drm_crtc_init_with_planes+0x64/0x94
[    2.320684]  vop2_bind+0x61c/0x960
[    2.320996]  component_bind_all+0x10c/0x270
[    2.321374]  rockchip_drm_bind+0xc0/0x20c
[    2.321738]  try_to_bring_up_aggregate_device+0x16c/0x1e0
[    2.322221]  __component_add+0xac/0x17c
[    2.322568]  component_add+0x20/0x30
[    2.322890]  dw_mipi_dsi_rockchip_host_attach+0x60/0x11c
[    2.323365]  dw_mipi_dsi_host_attach+0x80/0xd4
[    2.323767]  mipi_dsi_attach+0x34/0x50
[    2.324107]  feiyang_dsi_probe+0x100/0x17c
[    2.324476]  mipi_dsi_drv_probe+0x2c/0x40
[    2.324838]  really_probe.part.0+0xa4/0x2a0
[    2.325215]  __driver_probe_device+0xa0/0x150
[    2.325607]  driver_probe_device+0x48/0x150
[    2.325983]  __device_attach_driver+0xc0/0x130
[    2.326381]  bus_for_each_drv+0x84/0xe0
[    2.326729]  __device_attach+0xe4/0x190
[    2.327075]  device_initial_probe+0x20/0x30
[    2.327451]  bus_probe_device+0xa4/0xb0
[    2.327798]  deferred_probe_work_func+0x94/0xcc
[    2.328204]  process_one_work+0x1dc/0x450
[    2.328569]  worker_thread+0x2d0/0x450
[    2.328909]  kthread+0x100/0x110
[    2.329204]  ret_from_fork+0x10/0x20
[    2.329534] Code: aa0503fa f9002bfb aa0603fb b40000c2 (b9424840)
[    2.330077] ---[ end trace 0000000000000000 ]---

Which equates to:
(gdb) l *__drm_crtc_init_with_planes+0x44
0xffffffc0088436ac is in __drm_crtc_init_with_planes
(drivers/gpu/drm/drm_crtc.c:254).
249                                            const char *name, va_list ap)
250     {
251             struct drm_mode_config *config = &dev->mode_config;
252             int ret;
253
254             WARN_ON(primary && primary->type != DRM_PLANE_TYPE_PRIMARY);
255             WARN_ON(cursor && cursor->type != DRM_PLANE_TYPE_CURSOR);
256
257             /* crtc index is used with 32bit bitmasks */
258             if (WARN_ON(config->num_crtc >= 32))

Of course it's entirely possible I missed something here in my port to
the latest version. But if this is configuration in the device tree it
strikes me as odd that a NPE could be triggered.


>
> Regards,
>  Sascha
>
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Maya Matuszczyk May 20, 2022, 12:15 p.m. UTC | #13
pt., 20 maj 2022 o 13:56 Peter Geis <pgwipeout@gmail.com> napisał(a):
>
> On Fri, May 20, 2022 at 6:12 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >
> > Hi Maya,
> >
> > On Fri, May 20, 2022 at 12:02:33PM +0200, Maya Matuszczyk wrote:
> > > Hello,
> > >
> > > wt., 17 maj 2022 o 20:28 Heiko Stuebner <heiko@sntech.de> napisał(a):
> > > >
> > > > Am Freitag, 22. April 2022, 09:28:17 CEST schrieb Sascha Hauer:
> > > > > It's v11 time. There's only one small change to v10. Discussion seems to
> > > > > have settled now. Is there anything left that prevents the series from
> > > > > being merged? I'd really like to have it in during the next merge
> > > > > window.
> > > > >
> > > > > This series still depends on:
> > > > > drm/rockchip: Refactor IOMMU initialisation (https://lists.freedesktop.org/archives/dri-devel/2022-April/349548.html)
> > > > > arm64: dts: rockchip: add basic dts for the radxa rock3 model a
> > > > >
> > > > > Sascha
> > > >
> > > > I've now picked up everything except the hdmi-rate stuff in some way.
> > > > The driver changes will go into 5.19 and the DT-changes into 5.20.
> > > >
> > > > I'll now move the series out of my focus and would expect further
> > > > hdmi rate voodoo to start a new series :-) .
> > > >
> > > > Thanks to all involved for working on this.
> > > > Heiko
> > >
> > > What do I need besides this patch series, mentioned before IOMMU refactor,
> > > and DTS changes for MIPI-DSI support on RK356x?
> > > I'm working on mainline kernel support for a a RK3566 board with
> > > a DSI display.
> >
> > Apart from these patches you'll need updates for the DSI. I've pushed
> > these once to
> > https://git.pengutronix.de/cgit/sha/linux/log/?h=rockchip-vop2-mipi
> > Particularly I think you need:
> >
> > 383ff250345f0 drm: rockchip: dw-mipi-dsi: Call host attach from probe
> > e79a16ead833d dw-mipi-dsi-rockchip: increase bandwidth
> > ac400bdd8d0cb drm: rockchip: dw-mipi-dsi-rockchip: Add rk3568 support
> > b6b7fabbc9fe2 drm: panel-simple: Add init sequence support
> > 3c13a030e92f3 arm64: dts: rockchip: rk3568-evb: Add Display support
> > 3433935a31675 arm64: dts: rockchip: rk356x: Add dsi nodes
> >
> > I'm not sure how well these fit onto the current state. I'll likely
> > update the branch when the VOP2 has hit mainline after the next merge
> > window. I have no plans currently to upstream the DSI bits though.
>
> Yeah DSI needs a bit of love with the merged version. Even updating
> the series to the new version we get a null pointer exception:
>
> [    2.304528] Unable to handle kernel NULL pointer dereference at
> virtual address 0000000000000250
> [    2.305311] Mem abort info:
> [    2.305563]   ESR = 0x96000005
> [    2.305839]   EC = 0x25: DABT (current EL), IL = 32 bits
> [    2.306311]   SET = 0, FnV = 0
> [    2.306586]   EA = 0, S1PTW = 0
> [    2.306868]   FSC = 0x05: level 1 translation fault
> [    2.307301] Data abort info:
> [    2.307559]   ISV = 0, ISS = 0x00000005
> [    2.307926]   CM = 0, WnR = 0
> [    2.308197] [0000000000000250] user address but active_mm is swapper
> [    2.308763] Internal error: Oops: 96000005 [#1] PREEMPT SMP
> [    2.309260] Modules linked in:
> [    2.309541] CPU: 0 PID: 51 Comm: kworker/u8:1 Not tainted
> 5.18.0-rc2-00072-g4d2476a40e3e-dirty #307
> [    2.310343] Hardware name: Pine64 RK3566 Quartz64-A Board (DT)
> [    2.310862] Workqueue: events_unbound deferred_probe_work_func
> [    2.311391] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [    2.312010] pc : __drm_crtc_init_with_planes+0x44/0x2d0
> [    2.312482] lr : drm_crtc_init_with_planes+0x64/0x94
> [    2.312929] sp : ffffffc00aaa3830
> [    2.313226] x29: ffffffc00aaa3830 x28: 0000000000000001 x27: ffffffc00aaa38c0
> [    2.313866] x26: ffffffc009950fb0 x25: ffffff8100f24080 x24: ffffffc009452748
> [    2.314504] x23: ffffffc009950fb0 x22: 0000000000000000 x21: 0000000000000008
> [    2.315142] x20: ffffff8100d1e800 x19: ffffff8100f244e8 x18: 00000000fffffffd
> [    2.315781] x17: 08000000000000d1 x16: 0800000000000091 x15: 0000000000000020
> [    2.316419] x14: 0000000000000000 x13: ffffff8100f24478 x12: ffffff8100f2445d
> [    2.317057] x11: ffffffc00aaa3920 x10: ffffffc00aaa3920 x9 : ffffffc008843994
> [    2.317694] x8 : ffffffc00aaa3910 x7 : ffffffc00aaa3910 x6 : ffffffc00aaa38c0
> [    2.318333] x5 : ffffffc009950fb0 x4 : ffffffc0094522a0 x3 : 0000000000000000
> [    2.318970] x2 : 0000000000000008 x1 : ffffff8100f244e8 x0 : ffffff8100d1e800
> [    2.319609] Call trace:
> [    2.319829]  __drm_crtc_init_with_planes+0x44/0x2d0
> [    2.320268]  drm_crtc_init_with_planes+0x64/0x94
> [    2.320684]  vop2_bind+0x61c/0x960
> [    2.320996]  component_bind_all+0x10c/0x270
> [    2.321374]  rockchip_drm_bind+0xc0/0x20c
> [    2.321738]  try_to_bring_up_aggregate_device+0x16c/0x1e0
> [    2.322221]  __component_add+0xac/0x17c
> [    2.322568]  component_add+0x20/0x30
> [    2.322890]  dw_mipi_dsi_rockchip_host_attach+0x60/0x11c
> [    2.323365]  dw_mipi_dsi_host_attach+0x80/0xd4
> [    2.323767]  mipi_dsi_attach+0x34/0x50
> [    2.324107]  feiyang_dsi_probe+0x100/0x17c
> [    2.324476]  mipi_dsi_drv_probe+0x2c/0x40
> [    2.324838]  really_probe.part.0+0xa4/0x2a0
> [    2.325215]  __driver_probe_device+0xa0/0x150
> [    2.325607]  driver_probe_device+0x48/0x150
> [    2.325983]  __device_attach_driver+0xc0/0x130
> [    2.326381]  bus_for_each_drv+0x84/0xe0
> [    2.326729]  __device_attach+0xe4/0x190
> [    2.327075]  device_initial_probe+0x20/0x30
> [    2.327451]  bus_probe_device+0xa4/0xb0
> [    2.327798]  deferred_probe_work_func+0x94/0xcc
> [    2.328204]  process_one_work+0x1dc/0x450
> [    2.328569]  worker_thread+0x2d0/0x450
> [    2.328909]  kthread+0x100/0x110
> [    2.329204]  ret_from_fork+0x10/0x20
> [    2.329534] Code: aa0503fa f9002bfb aa0603fb b40000c2 (b9424840)
> [    2.330077] ---[ end trace 0000000000000000 ]---
>
> Which equates to:
> (gdb) l *__drm_crtc_init_with_planes+0x44
> 0xffffffc0088436ac is in __drm_crtc_init_with_planes
> (drivers/gpu/drm/drm_crtc.c:254).
> 249                                            const char *name, va_list ap)
> 250     {
> 251             struct drm_mode_config *config = &dev->mode_config;
> 252             int ret;
> 253
> 254             WARN_ON(primary && primary->type != DRM_PLANE_TYPE_PRIMARY);
> 255             WARN_ON(cursor && cursor->type != DRM_PLANE_TYPE_CURSOR);
> 256
> 257             /* crtc index is used with 32bit bitmasks */
> 258             if (WARN_ON(config->num_crtc >= 32))
>
> Of course it's entirely possible I missed something here in my port to
> the latest version. But if this is configuration in the device tree it
> strikes me as odd that a NPE could be triggered.

I encounter this issue too,
Using only vp0 is a work around.
So:

- vp0 routed to dsi, vp1 routed to hdmi -> NPE
- vp1 routed to dsi, vp0 routed to hdmi -> NPE
- vp0 routed to dsi -> [1]
- vp0 routed to hdmi -> Working

I'm currently trying to figure out why [1] happens at all,
and was planning on reporting the NPE once i had dsi working,
as I wasn't sure if it was issue on my end.

[1]:
[    0.362056] rockchip-drm display-subsystem: bound fe040000.vop (ops
0xffff800008635a60)
[    0.363026] [drm:drm_bridge_attach] *ERROR* failed to attach bridge
/dsi@fe060000 to encoder DSI-50: -22
[    0.363899] dw-mipi-dsi-rockchip fe060000.dsi:
[drm:dw_mipi_dsi_rockchip_bind] *ERROR* Failed to bind: -22
[    0.364848] rockchip-drm display-subsystem: failed to bind
fe060000.dsi (ops 0xffff80000863ae48): -22
[    0.365868] rockchip-drm display-subsystem: adev bind failed: -22
[    0.366447] dw-mipi-dsi-rockchip fe060000.dsi:
[drm:dw_mipi_dsi_rockchip_probe] *ERROR* Failed to register component:
-22