From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02400C433F5 for ; Fri, 1 Apr 2022 12:04:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C59310E111; Fri, 1 Apr 2022 12:04:34 +0000 (UTC) Received: from mail-m176237.qiye.163.com (mail-m176237.qiye.163.com [59.111.176.237]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3BF5510E111 for ; Fri, 1 Apr 2022 12:04:33 +0000 (UTC) Received: from [172.16.12.141] (unknown [58.22.7.114]) by mail-m176237.qiye.163.com (Hmail) with ESMTPA id B4436C40498; Fri, 1 Apr 2022 20:04:30 +0800 (CST) Content-Type: multipart/alternative; boundary="------------O5aaJrIyhY4HfQnryRXFxtI1" Message-ID: <041d7795-fdec-8e7d-a9ee-aa79c0faa6f3@rock-chips.com> Date: Fri, 1 Apr 2022 20:04:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v9 00/23] drm/rockchip: RK356x VOP2 support Content-Language: en-US From: Andy Yan To: Piotr Oniszczuk References: <20220328151116.2034635-1-s.hauer@pengutronix.de> <20220330072822.GX12181@pengutronix.de> <0D8F5951-5375-46B5-BFF0-7ED410371EB7@gmail.com> <20220330094556.GZ12181@pengutronix.de> <20220330102046.GA12181@pengutronix.de> <60601619-EF07-457B-91F2-64FEB598FEBE@gmail.com> <20220330192054.GA4012@pengutronix.de> <622c8786-2c3f-13ff-66b7-ad9c8cb9425e@rock-chips.com> In-Reply-To: <622c8786-2c3f-13ff-66b7-ad9c8cb9425e@rock-chips.com> X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUlKS0tKN1dZLVlBSVdZDwkaFQgSH1lBWUIeQhlWGENMQklKHk IeTUhCVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktDSUNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NAg6ESo6Az5RQgMpSwINEwoM HiIKFDFVSlVKTU9DQ0pPTUxKT0hCVTMWGhIXVRoVHwJVAhoVOwkUGBBWGBMSCwhVGBQWRVlXWRIL WUFZTkNVSUlVTFVKSk9ZV1kIAVlBSkpIT0s3Bg++ X-HM-Tid: 0a7fe5034550d9afkuwsb4436c40498 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "devicetree@vger.kernel.org" , Benjamin Gaignard , Sascha Hauer , Sandy Huang , dri-devel@lists.freedesktop.org, "open list:ARM/Rockchip SoC..." , Michael Riesch , Peter Geis , kernel@pengutronix.de, "linux-arm-kernel@lists.infradead.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is a multi-part message in MIME format. --------------O5aaJrIyhY4HfQnryRXFxtI1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Piotr: On 4/1/22 09:52, Andy Yan wrote: > > Hi Piotr: > > On 3/31/22 22:53, Piotr Oniszczuk wrote: >>> Wiadomość napisana przez Andy Yan w dniu 31.03.2022, o godz. 14:13: >>> >>> >>> Piotr: >>> >>> What soc is on you board? rk3566 or rk3568? >> it is rk3566 in x96-x6 tvbox > > > RK3566?  Maybe that is the problem. > > > plane[43]: Esmart1-win0 > crtc=(null) > fb=0 > crtc-pos=0x0+0+0 > src-pos=0.000000x0.000000+0.000000+0.000000 > rotation=1 > normalized-zpos=1 > color-encoding=ITU-R BT.601 YCbCr > color-range=YCbCr limited range > > From your dri/state dump, Plane 43 is Esmart1. > > Cluster1, Esmart1, Smart1 are special on rk3566, they are > > mirror window of Cluster0, Esmart0, Esmart0. That means > > the software can't program  a independent framebuffer for > > these three windows. They can only share the fb address set > > in Cluster0, Esmart0, Smart0. > > For rk3566, we only use it for two VP display same content: > > assign Cluster0,Esmart0,Smart0 to VP1 for primary display(MIPI), > > assign Cluster1,Esmart1, Smart1 to VP0 for extend display(HDMI) > > we handle this logic in Android hwc: > > When a hdmi is connected, hwc will commit Esmart1 with Esmart0 with the > > same fb and src buffer size, the dst can be different(by window scale) > > > I have code comment in my downstream kernel and explained this detail > when Sascha start submit this serials. > >>> I have a scripts[0] use io[1] command to dump the VOP2 register you can use it dump the register configuration when you meet a display failure, >>> >>> then send the dump to me, maybe I can figure out something. >>> >>> [0]https://github.com/andyshrk/buildroot/blob/2022/board/andyshrk/rootfs_overlay/usr/bin/vop2_dump.sh >>> >>> [1]https://github.com/andyshrk/io >> Andy >> >> Pls seehttps://pastebin.com/CHmu9s22 > > > The dump is a little strange, I will check it in the later night. > Pls update the new vop2_dump.sh scripts from github. The previous scripts I gave you has some bug. sorry. >> I put dumps for following scenarios: >> >> 1. >> -boot >> -modetest -s 69@67:1920x1080 -> ok >> -modetest -P 43@67:1920x1080@NV12 -> green screen >> >> >> 2. >> -boot >> -modetest -s 69@67:1920x1080 -> ok >> -modetest -P 49@67:1920x1080@NV12 -> ok (but shifted horizontally by about 5% of screen width) >> (setting palne#49 fixes plane #43. Here i set plane #49 but not yet setting #43) >> >> >> 3. >> -boot >> -modetest -s 69@67:1920x1080 -> ok >> -modetest -P 49@67:1920x1080@NV12 -> ok (but shifted horizontally by about 5% of screen width) >> -modetest -P 43@67:1920x1080@NV12 -> now ok (but shifted horizontally by about 5% of screen width) >> --------------O5aaJrIyhY4HfQnryRXFxtI1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Piotr:

On 4/1/22 09:52, Andy Yan wrote:

Hi Piotr:

On 3/31/22 22:53, Piotr Oniszczuk wrote:
Wiadomość napisana przez Andy Yan <andy.yan@rock-chips.com> w dniu 31.03.2022, o godz. 14:13:


Piotr:

What soc is on you board? rk3566 or rk3568?
it is rk3566 in x96-x6 tvbox


RK3566?  Maybe that is the problem.


plane[43]: Esmart1-win0
crtc=(null)
fb=0
crtc-pos=0x0+0+0
src-pos=0.000000x0.000000+0.000000+0.000000
rotation=1
normalized-zpos=1
color-encoding=ITU-R BT.601 YCbCr
color-range=YCbCr limited range

From your dri/state dump, Plane 43 is Esmart1.

Cluster1, Esmart1, Smart1 are special on rk3566, they are

mirror window of Cluster0, Esmart0, Esmart0. That means

the software can't program  a independent framebuffer for

these three windows. They can only share the fb address set

in Cluster0, Esmart0, Smart0.

For rk3566, we only use it for two VP display same content:

assign Cluster0,Esmart0,Smart0 to VP1 for primary display(MIPI),

assign Cluster1,Esmart1, Smart1 to VP0 for extend display(HDMI)

we handle this logic in Android hwc:

When a hdmi is connected, hwc will commit Esmart1 with Esmart0 with the

same fb and src buffer size, the dst can be different(by window scale)


I have code comment in my downstream kernel and explained this detail when Sascha start submit this serials.

I have a scripts[0]  use io[1] command to dump the VOP2 register you can use it dump the register configuration when you meet a display failure,

then send the dump to me, maybe I can figure out something.

[0]https://github.com/andyshrk/buildroot/blob/2022/board/andyshrk/rootfs_overlay/usr/bin/vop2_dump.sh

[1] https://github.com/andyshrk/io
Andy

Pls see https://pastebin.com/CHmu9s22


The dump is a little strange, I will check it in the later night.


Pls update the new vop2_dump.sh scripts from github. The

previous scripts I gave you has some bug. sorry.

I put dumps for following scenarios:

1.
-boot
-modetest -s 69@67:1920x1080 -> ok
-modetest -P 43@67:1920x1080@NV12 -> green screen


2.
-boot
-modetest -s 69@67:1920x1080 -> ok
-modetest -P 49@67:1920x1080@NV12 -> ok (but shifted horizontally by about 5% of screen width)
(setting palne#49 fixes plane #43. Here i set plane #49 but not yet setting #43)


3.
-boot
-modetest -s 69@67:1920x1080 -> ok
-modetest -P 49@67:1920x1080@NV12 -> ok (but shifted horizontally by about 5% of screen width)
-modetest -P 43@67:1920x1080@NV12 -> now ok (but shifted horizontally by about 5% of screen width)

--------------O5aaJrIyhY4HfQnryRXFxtI1--