devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Yan <andy.yan@rock-chips.com>
To: Daniel Stone <daniel@fooishbar.org>,
	Kever Yang <kever.yang@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
	"Peter Geis" <pgwipeout@gmail.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	linux-rockchip@lists.infradead.org,
	"Michael Riesch" <michael.riesch@wolfvision.net>,
	kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support
Date: Thu, 18 Nov 2021 21:14:25 +0800	[thread overview]
Message-ID: <e948ee33-d1ea-cd53-a792-2e044eed1529@rock-chips.com> (raw)
In-Reply-To: <CAPj87rO86Mom-076Z5QX9hd=0bQi=AQcofkc1fSR4-VV2Zo6aQ@mail.gmail.com>

Hi Daniel:

On 11/18/21 8:07 PM, Daniel Stone wrote:
> Hi Kever,
>
> On Thu, 18 Nov 2021 at 10:50, Kever Yang <kever.yang@rock-chips.com> wrote:
>> On 2021/11/18 下午5:53, Daniel Stone wrote:
>>> Exactly what Heiko said. If you would like to upstream the driver then
>>> that would be fantastic to see, but I'm afraid you do not get to
>>> prevent someone else from doing the work themselves.
>> First of all, we never stop any one to doing there work on upstream if
>> the source code is write totally by themselves.
>>
>> Second, there are also many modules are upstream by developers based on
>> Rockchip source code, please note that
>> all of them have basic respect to our work, they do communicate with us
>> first.
>>
>> But this committer do not take any respect to our engineers and their
>> hard working:
>> - He didn't contact with us;
>> - There isn't  any information about original author in the commit message;
>>       As I have known, if I use source code from another developer, I
>> need to at least add a "Signed-off-by" with original author;
>> - This commit and mail does not even have a 'CC' to original author.
>>
>> I NAK because I  think this is not part of the  open source spirit, and
>> this kind of  behavior should not be encouraged.
> OK, I see where you're coming from, and I agree that the attribution
> should have been handled more carefully.
>
> On the other hand, please consider this from the other perspective.
> Sascha has been free to take the downstream Rockchip BSP code and
> attempt to upstream it to the Linux kernel, which you are unhappy
> about. But then the Rockchip driver was developed totally downstream,
> with no attempt to ever communicate with the upstream Linux or DRM/KMS
> developers. Rockchip advertises that it is shipped as a Linux kernel
> with a KMS driver. But we were never informed, or CCed, or anything.
>
> If you would like the community to more actively work with you - then
> please yourself work more actively with the community. The first
> commit of the VOP2 driver was in July 2020, and that was of the full
> driver so presumably it started quite some time before then. So that
> is a minimum of 17 months that you have had to engage with upstream
> ...
>
> Technically, the driver cannot be upstreamed as-is. It looks as if it
> were a pre-atomic driver, that was half-converted to atomic, and then
> has been half-converted to atomic helpers as well. Things like
> reference counting and global state are not handled correctly at all.
> You can see this if you try to run Weston on top of the VOP2 driver:
> the framerate is decimated because the event handling massively
> over-synchronises, and the event timestamps which arrive are
> incorrect. This would be fixed by correctly using the event helpers
> that we have had in the tree for years (which would also eliminate the
> unnecessary framebuffer reference handling). It also does not work
> with the GPU drivers in the tree because it lacks the one-liner to
> correctly handle dma_resv synchronisation, which makes it both too
> fast as it displays content which is not ready, and too slow because
> it can't do it at full frame rate.


We have different team run Android , X11, Weston on rk356x, especially 
for android, we can run at 60 fps.

Our vop2 driver is developed on Linux 4.19, am not sure which version of 
kernel you put our drivers on.

>
> Similarly, on the RK3566 EVB, the DSI does not work unless HDMI is
> also active, but when HDMI is active at the same time as DSI, it just

I am very sure rk3566 evb DSI can work without HDMI.

But take care that the vop on rk3566 has a special limitation: there are 
three

windows(Cluster1/Esmart1/Smart1) that have a mirror lock, that means they

can't be programed framebuffer address independently , they can only

share framebuffer address with Cluster0/Esmart0/Smart0. We use these feature

on Android.

I have comment these limitation in our driver.

Compared to old vop, vop is strong but a bit complicated, we try very had to

make it work on as much display framework as possible.

We have upstream plane, but I am really in a rush this year. So sorry 
for the late of upstream, but we glad to work with community.

So Sascha, please feel free to go on with your work.

> shows a blank screen. I believe the root cause of this is that the
> VOP2 driver does not use any of the atomic state correctly, and
> instead stores its own state in driver-global structures, using a lot
> of unnecessary mutexes to try to synchronise this state. Not only does
> this synchronisation not actually work, but it causes a severe
> performance degradation due to mutex contention.
>
> I believe the best path forward to an upstream VOP2 driver is a patch
> series consisting of:
>    - start from a blank slate, using the atomic framework and helpers
> as they were intended to be, with basic support for the VOP2 and one
> or two connector types, doing linear XRGB only
>    - any cleanups which would enable this to share more code with
>    - add YUV support, including planar buffers
>    - add AFBC support, with the AFBC enable/disable correctly
> synchronised through atomic state (this is necessary since the AFBC
> decoder is not directly on the planes per se but shared)
>    - add more connector types
>    - add writeback support
>    - add other Rockchip-specific codepaths such as HDR10
>
> Cheers,
> Daniel
>
>
>



  reply	other threads:[~2021-11-18 13:22 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 14:33 [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support Sascha Hauer
2021-11-17 14:33 ` [PATCH 01/12] dt-bindings: display: rockchip: Add compatible for rk3568 HDMI Sascha Hauer
2021-11-27 15:07   ` Heiko Stuebner
2021-11-17 14:33 ` [PATCH 02/12] drm/rockchip: dw_hdmi: Do not leave clock enabled in error case Sascha Hauer
2021-11-17 14:33 ` [PATCH 03/12] drm/rockchip: dw_hdmi: add rk3568 support Sascha Hauer
2021-11-17 14:33 ` [PATCH 04/12] drm/rockchip: dw_hdmi: add regulator support Sascha Hauer
2021-11-29 22:46   ` Rob Herring
2021-12-07 17:01   ` Robin Murphy
2021-11-17 14:33 ` [PATCH 05/12] of: graph: Allow disabled endpoints Sascha Hauer
2021-11-17 14:33 ` [PATCH 06/12] dt-bindings: " Sascha Hauer
2021-11-17 14:33 ` [PATCH 07/12] dt-bindings: display: rockchip: Add binding for VOP2 Sascha Hauer
2021-11-17 16:10   ` Rob Herring
2021-11-17 14:33 ` [PATCH 08/12] arm64: dts: rockchip: rk356x: Add VOP2 nodes Sascha Hauer
2021-11-25 20:25   ` Johan Jonker
2021-11-26  7:40     ` Sascha Hauer
2021-11-26  8:15       ` Heiko Stübner
2021-11-17 14:33 ` [PATCH 09/12] arm64: dts: rockchip: rk356x: Add HDMI nodes Sascha Hauer
2021-11-17 15:13   ` Rob Herring
2021-12-01 16:04     ` Sascha Hauer
2021-11-17 14:33 ` [PATCH 10/12] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi Sascha Hauer
2021-11-17 15:19   ` Rob Herring
2021-12-02 15:34     ` Sascha Hauer
2021-12-02 15:41       ` Heiko Stübner
2021-12-02 16:09         ` Sascha Hauer
2021-11-17 15:20   ` Michael Riesch
2021-11-17 15:44   ` [PATCH] arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a Michael Riesch
2021-11-25 19:44     ` Johan Jonker
2021-11-17 14:33 ` [PATCH 11/12] drm/rockchip: Make VOP driver optional Sascha Hauer
2021-11-17 14:40   ` Heiko Stübner
2021-11-17 14:50     ` Sascha Hauer
2021-11-17 15:16       ` Heiko Stübner
2021-11-17 14:33 ` [PATCH 12/12] drm: rockchip: Add VOP2 driver Sascha Hauer
2021-11-17 18:05   ` Nicolas Frattaroli
2021-11-17 19:45     ` Sascha Hauer
2021-11-26  6:44   ` kernel test robot
2021-11-17 14:54 ` [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support Rob Herring
2021-11-17 15:41   ` Sascha Hauer
2021-11-18  1:27 ` Kever Yang
2021-11-18  9:26   ` Heiko Stübner
2021-11-18  9:53     ` Daniel Stone
2021-11-18 10:50       ` Kever Yang
2021-11-18 11:08         ` Michael Riesch
2021-11-18 12:07         ` Daniel Stone
2021-11-18 13:14           ` Andy Yan [this message]
2021-11-18 13:24             ` Daniel Stone
2021-11-18 10:03     ` Sascha Hauer
2021-11-21 23:18 ` Alex Bee
2021-11-22  8:10   ` Sascha Hauer
2021-11-22 17:47     ` Alex Bee
2021-11-22 19:21       ` Robin Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e948ee33-d1ea-cd53-a792-2e044eed1529@rock-chips.com \
    --to=andy.yan@rock-chips.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel@fooishbar.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=kernel@pengutronix.de \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).