[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8259618.JRmrKFJ9eK@diego>
Date: Tue, 10 Dec 2024 16:03:06 +0100
From: Heiko Stübner <heiko@...ech.de>
To: Andy Yan <andyshrk@....com>
Cc: hjc@...k-chips.com, krzk+dt@...nel.org, s.hauer@...gutronix.de,
devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org, derek.foreman@...labora.com,
detlev.casanova@...labora.com, Andy Yan <andy.yan@...k-chips.com>,
Michael Riesch <michael.riesch@...fvision.net>
Subject:
Re: [PATCH v5 13/18] drm/rockchip: vop2: Introduce vop hardware version
Am Montag, 9. Dezember 2024, 13:33:29 CET schrieb Andy Yan:
> From: Andy Yan <andy.yan@...k-chips.com>
>
> There is a version number hardcoded in the VOP VERSION_INFO
> register, and the version number increments sequentially based
> on the production order of the SOC.
>
> So using this version number to distinguish different VOP features
> will simplify the code.
>
> Signed-off-by: Andy Yan <andy.yan@...k-chips.com>
> Tested-by: Michael Riesch <michael.riesch@...fvision.net> # on RK3568
> Tested-by: Detlev Casanova <detlev.casanova@...labora.com>
> @@ -798,6 +798,7 @@ static void rk3588_vop2_power_domain_enable_all(struct vop2 *vop2)
> static void vop2_enable(struct vop2 *vop2)
> {
> int ret;
> + u32 version;
>
> ret = pm_runtime_resume_and_get(vop2->dev);
> if (ret < 0) {
> @@ -817,10 +818,19 @@ static void vop2_enable(struct vop2 *vop2)
> return;
> }
>
> + version = vop2_readl(vop2, RK3568_VERSION_INFO);
> + if (version != vop2->version) {
> + drm_err(vop2->drm, "Hardware version(0x%08x) mismatch\n", version);
> + return;
> + }
style-nit: please add a blank line here.
> + /*
> + * rk3566 share the same vop version with rk3568, so
> + * wen need to use soc_id for identification here.
> + */
> if (vop2->data->soc_id == 3566)
> vop2_writel(vop2, RK3568_OTP_WIN_EN, 1);
>
otherwise, looks good.
Thanks
Heiko
Powered by blists - more mailing lists