All of lore.kernel.org
 help / color / mirror / Atom feed
From: Detlev Casanova <detlev.casanova@collabora.com>
To: Andy Yan <andyshrk@163.com>
Cc: heiko@sntech.de, hjc@rock-chips.com, krzk+dt@kernel.org,
	s.hauer@pengutronix.de, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	derek.foreman@collabora.com, Andy Yan <andy.yan@rock-chips.com>,
	kernel@collabora.com
Subject: Re: [PATCH v5 05/18] drm/rockchip: vop2: Set AXI id for rk3588
Date: Fri, 13 Dec 2024 13:34:03 -0500	[thread overview]
Message-ID: <13660005.uLZWGnKmhe@bootstrap> (raw)
In-Reply-To: <3f1eace4.75cf.193b9daf585.Coremail.andyshrk@163.com>

On Thursday, 12 December 2024 02:52:34 EST Andy Yan wrote:
> Hi Detlev,
> 
> At 2024-12-11 23:45:01, "Detlev Casanova" <detlev.casanova@collabora.com> 
wrote:
> >On Wednesday, 11 December 2024 01:34:34 EST Andy Yan wrote:
> >> Hi Detlev,
> >> 
> >> At 2024-12-11 02:40:14, "Detlev Casanova" <detlev.casanova@collabora.com>
> >
> >wrote:
> >> >Hi Andy,
> >> >
> >> >On Monday, 9 December 2024 07:29:18 EST Andy Yan wrote:
> >> >> From: Andy Yan <andy.yan@rock-chips.com>
> >> >> 
> >> >> There are two AXI bus in vop2, windows attached on the same bus must
> >> >> have a unique channel YUV and RGB channel ID.
> >> >> 
> >> >> The default IDs will conflict with each other on the rk3588, so they
> >> >> need to be reassigned.
> >> >> 
> >> >> Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588")
> >> >> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> >> >> Tested-by: Derek Foreman <derek.foreman@collabora.com>
> >> >> 
> >> >> ---
> >> >> 
> >> >> Changes in v5:
> >> >> - Added in V5
> >> >> 
> >> >>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 14 +++++++++++
> >> >>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.h |  9 +++++++
> >> >>  drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 26
> >> >>  +++++++++++++++++++-
> >> >>  3 files changed, 48 insertions(+), 1 deletion(-)
> >> >> 
> >> >> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> >> >> b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index
> >> >> dc4edd65bc9e..8b9ca046eeeb 100644
> >> >> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> >> >> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> >> >> @@ -1426,6 +1426,12 @@ static void vop2_plane_atomic_update(struct
> >> >> drm_plane *plane, &fb->format->format,
> >> >> 
> >> >>  		afbc_en ? "AFBC" : "", &yrgb_mst);
> >> >> 
> >> >> +	if (vop2->data->soc_id > 3568) {
> >> >
> >> >Shouldn't this be done only for rk3588, as specified in the comments
> >> >below
> >> >? The test we did before showed that it is failing on rk3576 and 3576 is
> >> >>
> >> >3588.
> >> 
> >> I think this is because you tested before with the patch I gave Derek
> >> without axi id assigned for rk3576.
> >> I assigned axi id for rk3576 in this version 18/18(The new ID assignment
> >> can adapt to more application scenarios.), can you test it with the
> >> whole V5 version again?
> >
> >Yes, I will do that. But patch 18 mentions:
> >+       /* Read only bit on rk3576*/
> >+       [VOP2_WIN_AXI_BUS_ID] = REG_FIELD(RK3568_CLUSTER_CTRL, 13, 13),
> >
> >And the bit is being written here. If it is indeed writable, then I would
> >drop that comment.
> 
> The AXI_BUS_ID for two Cluster windows on RK3576 are fixed by hardware, that
> means whether we write it or not, it won't change anything.
> But the AXI_BUS_ID for Esmart windows on rk3576 and  AXI_YRGB/UV_R_ID for
> all cluster/esmart windows on rk3576 are writeable.
> I think we directly write it here as the current code can make things easy.

I see, saying it is read only may be a bit confusing then, but it makes sense. 
You could be more specific adding that writing has no effect.

Anyway, I tested this and it works as expected:

Tested-by: Detlev Casanova <detlev.casanova@collabora.com>

Regards,
Detlev.

> >> >I suggest
> >> >
> >> >	if (vop2->data->soc_id == 3588) {
> >> >
> >> >Regards,
> >> >Detlev
> >> >
> >> >> +		vop2_win_write(win, VOP2_WIN_AXI_BUS_ID, win->data-
> >> >>
> >> >>axi_bus_id);
> >> >>
> >> >> +		vop2_win_write(win, VOP2_WIN_AXI_YRGB_R_ID, win->data-
> >> >>
> >> >>axi_yrgb_r_id);
> >> >>
> >> >> +		vop2_win_write(win, VOP2_WIN_AXI_UV_R_ID, win->data-
> >> >>
> >> >>axi_uv_r_id);
> >> >>
> >> >> +	}
> >> >> +
> >> >> 
> >> >>  	if (vop2_cluster_window(win))
> >> >>  	
> >> >>  		vop2_win_write(win, VOP2_WIN_AFBC_HALF_BLOCK_EN,
> >> >
> >> >half_block_en);
> >
> >Detlev.
> >
> >
> >
> >_______________________________________________
> >Linux-rockchip mailing list
> >Linux-rockchip@lists.infradead.org
> >http://lists.infradead.org/mailman/listinfo/linux-rockchip






WARNING: multiple messages have this Message-ID (diff)
From: Detlev Casanova <detlev.casanova@collabora.com>
To: Andy Yan <andyshrk@163.com>
Cc: heiko@sntech.de, hjc@rock-chips.com, krzk+dt@kernel.org,
	s.hauer@pengutronix.de, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	derek.foreman@collabora.com, Andy Yan <andy.yan@rock-chips.com>,
	kernel@collabora.com
Subject: Re: [PATCH v5 05/18] drm/rockchip: vop2: Set AXI id for rk3588
Date: Fri, 13 Dec 2024 13:34:03 -0500	[thread overview]
Message-ID: <13660005.uLZWGnKmhe@bootstrap> (raw)
In-Reply-To: <3f1eace4.75cf.193b9daf585.Coremail.andyshrk@163.com>

On Thursday, 12 December 2024 02:52:34 EST Andy Yan wrote:
> Hi Detlev,
> 
> At 2024-12-11 23:45:01, "Detlev Casanova" <detlev.casanova@collabora.com> 
wrote:
> >On Wednesday, 11 December 2024 01:34:34 EST Andy Yan wrote:
> >> Hi Detlev,
> >> 
> >> At 2024-12-11 02:40:14, "Detlev Casanova" <detlev.casanova@collabora.com>
> >
> >wrote:
> >> >Hi Andy,
> >> >
> >> >On Monday, 9 December 2024 07:29:18 EST Andy Yan wrote:
> >> >> From: Andy Yan <andy.yan@rock-chips.com>
> >> >> 
> >> >> There are two AXI bus in vop2, windows attached on the same bus must
> >> >> have a unique channel YUV and RGB channel ID.
> >> >> 
> >> >> The default IDs will conflict with each other on the rk3588, so they
> >> >> need to be reassigned.
> >> >> 
> >> >> Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588")
> >> >> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> >> >> Tested-by: Derek Foreman <derek.foreman@collabora.com>
> >> >> 
> >> >> ---
> >> >> 
> >> >> Changes in v5:
> >> >> - Added in V5
> >> >> 
> >> >>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 14 +++++++++++
> >> >>  drivers/gpu/drm/rockchip/rockchip_drm_vop2.h |  9 +++++++
> >> >>  drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 26
> >> >>  +++++++++++++++++++-
> >> >>  3 files changed, 48 insertions(+), 1 deletion(-)
> >> >> 
> >> >> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> >> >> b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index
> >> >> dc4edd65bc9e..8b9ca046eeeb 100644
> >> >> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> >> >> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
> >> >> @@ -1426,6 +1426,12 @@ static void vop2_plane_atomic_update(struct
> >> >> drm_plane *plane, &fb->format->format,
> >> >> 
> >> >>  		afbc_en ? "AFBC" : "", &yrgb_mst);
> >> >> 
> >> >> +	if (vop2->data->soc_id > 3568) {
> >> >
> >> >Shouldn't this be done only for rk3588, as specified in the comments
> >> >below
> >> >? The test we did before showed that it is failing on rk3576 and 3576 is
> >> >>
> >> >3588.
> >> 
> >> I think this is because you tested before with the patch I gave Derek
> >> without axi id assigned for rk3576.
> >> I assigned axi id for rk3576 in this version 18/18(The new ID assignment
> >> can adapt to more application scenarios.), can you test it with the
> >> whole V5 version again?
> >
> >Yes, I will do that. But patch 18 mentions:
> >+       /* Read only bit on rk3576*/
> >+       [VOP2_WIN_AXI_BUS_ID] = REG_FIELD(RK3568_CLUSTER_CTRL, 13, 13),
> >
> >And the bit is being written here. If it is indeed writable, then I would
> >drop that comment.
> 
> The AXI_BUS_ID for two Cluster windows on RK3576 are fixed by hardware, that
> means whether we write it or not, it won't change anything.
> But the AXI_BUS_ID for Esmart windows on rk3576 and  AXI_YRGB/UV_R_ID for
> all cluster/esmart windows on rk3576 are writeable.
> I think we directly write it here as the current code can make things easy.

I see, saying it is read only may be a bit confusing then, but it makes sense. 
You could be more specific adding that writing has no effect.

Anyway, I tested this and it works as expected:

Tested-by: Detlev Casanova <detlev.casanova@collabora.com>

Regards,
Detlev.

> >> >I suggest
> >> >
> >> >	if (vop2->data->soc_id == 3588) {
> >> >
> >> >Regards,
> >> >Detlev
> >> >
> >> >> +		vop2_win_write(win, VOP2_WIN_AXI_BUS_ID, win->data-
> >> >>
> >> >>axi_bus_id);
> >> >>
> >> >> +		vop2_win_write(win, VOP2_WIN_AXI_YRGB_R_ID, win->data-
> >> >>
> >> >>axi_yrgb_r_id);
> >> >>
> >> >> +		vop2_win_write(win, VOP2_WIN_AXI_UV_R_ID, win->data-
> >> >>
> >> >>axi_uv_r_id);
> >> >>
> >> >> +	}
> >> >> +
> >> >> 
> >> >>  	if (vop2_cluster_window(win))
> >> >>  	
> >> >>  		vop2_win_write(win, VOP2_WIN_AFBC_HALF_BLOCK_EN,
> >> >
> >> >half_block_en);
> >
> >Detlev.
> >
> >
> >
> >_______________________________________________
> >Linux-rockchip mailing list
> >Linux-rockchip@lists.infradead.org
> >http://lists.infradead.org/mailman/listinfo/linux-rockchip





_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2024-12-13 18:35 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 12:29 [PATCH v5 00/18] VOP Support for rk3576 Andy Yan
2024-12-09 12:29 ` Andy Yan
2024-12-09 12:29 ` [PATCH] arm64: dts: rockchip: Add vop " Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:36   ` Andy Yan
2024-12-09 12:36     ` Andy Yan
2024-12-09 12:29 ` [PATCH] arm64: dts: rockchip: Enable HDMI display for rk3588 Cool Pi GenBook Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:37   ` Andy Yan
2024-12-09 12:37     ` Andy Yan
2024-12-09 12:29 ` [PATCH v5 01/18] drm/rockchip: vop2: Add debugfs support Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-10 11:57   ` Heiko Stübner
2024-12-10 11:57     ` Heiko Stübner
2024-12-11  7:07     ` Andy Yan
2024-12-11  7:07       ` Andy Yan
2024-12-11  8:52       ` Heiko Stübner
2024-12-11  8:52         ` Heiko Stübner
2024-12-09 12:29 ` [PATCH] drm/rockchip: vop2: Setup delay cycle for Esmart2/3 Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:37   ` Andy Yan
2024-12-09 12:37     ` Andy Yan
2024-12-09 12:29 ` [PATCH v5 02/18] drm/rockchip: vop2: Fix cluster windows alpha ctrl regsiters offset Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:29 ` [PATCH v5 03/18] drm/rockchip: vop2: Fix the mixer alpha setup for layer 0 Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:29 ` [PATCH v5 04/18] drm/rockchip: vop2: Fix the windows switch between different layers Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-10 23:09   ` Heiko Stuebner
2024-12-10 23:09     ` Heiko Stuebner
2024-12-09 12:29 ` [PATCH v5 05/18] drm/rockchip: vop2: Set AXI id for rk3588 Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-10 18:40   ` Detlev Casanova
2024-12-10 18:40     ` Detlev Casanova
2024-12-11  6:34     ` Andy Yan
2024-12-11  6:34       ` Andy Yan
2024-12-11 15:45       ` Detlev Casanova
2024-12-11 15:45         ` Detlev Casanova
2024-12-12  7:52         ` Andy Yan
2024-12-12  7:52           ` Andy Yan
2024-12-13 18:34           ` Detlev Casanova [this message]
2024-12-13 18:34             ` Detlev Casanova
2024-12-14  8:01             ` Andy Yan
2024-12-14  8:01               ` Andy Yan
2024-12-09 12:29 ` [PATCH v5 06/18] drm/rockchip: vop2: Setup delay cycle for Esmart2/3 Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:29 ` [PATCH v5 07/18] drm/rockchip: vop2: Check linear format for Cluster windows on rk3566/8 Andy Yan
2024-12-09 12:29   ` Andy Yan
2024-12-09 12:32 ` [PATCH v5 08/18] drm/rockchip: vop2: Add check for 32 bpp format Andy Yan
2024-12-09 12:32   ` Andy Yan
2024-12-09 17:06   ` Daniel Stone
2024-12-09 17:06     ` Daniel Stone
2024-12-10  7:01     ` Andy Yan
2024-12-10  7:01       ` Andy Yan
2024-12-09 12:32 ` [PATCH v5 09/18] drm/rockchip: vop2: include rockchip_drm_drv.h Andy Yan
2024-12-09 12:32   ` Andy Yan
2024-12-09 12:32 ` [PATCH v5 10/18] drm/rockchip: vop2: Support 32x8 superblock afbc Andy Yan
2024-12-09 12:32   ` Andy Yan
2024-12-09 12:33 ` [PATCH v5 11/18] drm/rockchip: vop2: Add platform specific callback Andy Yan
2024-12-09 12:33   ` Andy Yan
2024-12-09 12:33 ` [PATCH v5 12/18] drm/rockchip: vop2: Support for different layer select configuration between VPs Andy Yan
2024-12-09 12:33   ` Andy Yan
2024-12-09 12:33 ` [PATCH v5 13/18] drm/rockchip: vop2: Introduce vop hardware version Andy Yan
2024-12-09 12:33   ` Andy Yan
2024-12-10 15:03   ` Heiko Stübner
2024-12-10 15:03     ` Heiko Stübner
2024-12-09 12:33 ` [PATCH v5 14/18] drm/rockchip: vop2: Register the primary plane and overlay plane separately Andy Yan
2024-12-09 12:33   ` Andy Yan
2024-12-09 12:33 ` [PATCH v5 15/18] drm/rockchip: vop2: Set plane possible crtcs by possible vp mask Andy Yan
2024-12-09 12:33   ` Andy Yan
2024-12-09 12:34 ` [PATCH v5 16/18] drm/rockchip: vop2: Add uv swap for cluster window Andy Yan
2024-12-09 12:34   ` Andy Yan
2024-12-09 12:34 ` [PATCH v5 17/18] dt-bindings: display: vop2: Add rk3576 support Andy Yan
2024-12-09 12:34   ` Andy Yan
2024-12-09 12:34 ` [PATCH v5 18/18] drm/rockchip: vop2: Add support for rk3576 Andy Yan
2024-12-09 12:34   ` Andy Yan
2024-12-10 23:12 ` (subset) [PATCH v5 00/18] VOP Support " Heiko Stuebner
2024-12-10 23:12   ` Heiko Stuebner
2024-12-14  8:15 ` [PATCH v6 00/16] " Andy Yan
2024-12-14  8:15   ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 01/16] drm/rockchip: vop2: Add debugfs support Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 02/16] drm/rockchip: vop2: Fix the windows switch between different layers Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 03/16] drm/rockchip: vop2: Set AXI id for rk3588 Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 04/16] drm/rockchip: vop2: Setup delay cycle for Esmart2/3 Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 05/16] drm/rockchip: vop2: Check linear format for Cluster windows on rk3566/8 Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 06/16] drm/rockchip: vop2: Add check for 32 bpp format for rk3588 Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 07/16] drm/rockchip: vop2: include rockchip_drm_drv.h Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 08/16] drm/rockchip: vop2: Support 32x8 superblock afbc Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 09/16] drm/rockchip: vop2: Add platform specific callback Andy Yan
2024-12-14  8:15     ` Andy Yan
2024-12-14  8:15   ` [PATCH v6 10/16] drm/rockchip: vop2: Support for different layer select configuration between VPs Andy Yan
2024-12-14  8:15     ` Andy Yan

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=13660005.uLZWGnKmhe@bootstrap \
    --to=detlev.casanova@collabora.com \
    --cc=andy.yan@rock-chips.com \
    --cc=andyshrk@163.com \
    --cc=derek.foreman@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.