Message ID | 20230118122003.132905-1-wsa+renesas@sang-engineering.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2327770wrn; Wed, 18 Jan 2023 05:10:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXurh3uwF8Pl3pqCI4W4PKy+k10qj38cDn4G68Tuiax4Eeqo6YGLguxlk6kAeiUAz6Hw7b+e X-Received: by 2002:a17:906:3a4d:b0:873:393f:1bda with SMTP id a13-20020a1709063a4d00b00873393f1bdamr4943906ejf.47.1674047425887; Wed, 18 Jan 2023 05:10:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674047425; cv=none; d=google.com; s=arc-20160816; b=bIJDHY6La/cUxFk11hns3da0FgzJyWr0X63ak7YAiuSGMvxyHX8dPzOdyEs32YSUgM PfyxaoNGx8hMz1Mcye0nSuxGBKFocIp5zrnA70tt30VrcE8l/+u+8+VM2g0rIjW5IQ06 hPL1ua6OFSUJ3r8JCimni/CR+cIC5eWNoJCqLj8LV1UmXsuy6E1fyDas5ZuRzSsBjJvQ GSbQJBNoyWyDAt8UmF3AvcoLV6cOKTein5s5mljNtwSdfUxv97ph8if1g8+EgyJ7pqka +hTPCHo2nW4FmgaMQx9fX7YJ0B7v2Xz+8Q5YkdU+Z+2Aerx41KR5H0EzUs97XBT/fHdW 4/sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GtTrKVXZ6PqKt7SKdFPo/iN7QwyZ+U6fvkH4JZrH0hw=; b=W3c9lv0cQFJRlnGSjHBZP7qxQegIrw1baHfHMQ29Jf1rmab3lg8jt4MmIscyyr9yBK eGjXMByaxe6XIIh7lBL2pCd+UzWTFDM92tbUIVirEpe3XK80dC2AY0fSYLEN6O5ozGfU 4eK+rsjyeeGbeTnu6PKMlFkXPvltB6ov7C47U9HGidtmVsxnruYKiT940cjxwYE80c0x xQ613eJJJYcgoy+obv9eJmC39ICewv0JcbybteNP94BNTMj80e7exKw9N/3EoU7ZyPd6 6wK8UYJLrVgpPL24x51ZBl8nlSytYe8iJiJPV3qfTOgGYccgWcfbrizFJrqsM8vv0nIS P6kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=lAiDFfBt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056402351400b00469bd46b090si42379348edd.261.2023.01.18.05.10.01; Wed, 18 Jan 2023 05:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=lAiDFfBt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbjARNAp (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Wed, 18 Jan 2023 08:00:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231178AbjARM7b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Jan 2023 07:59:31 -0500 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7E96BFF43 for <linux-kernel@vger.kernel.org>; Wed, 18 Jan 2023 04:20:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=HF2LUWjt1tQUCfUGxY1HeVRm5cQ oQ1lR1zfKcrUUkSk=; b=lAiDFfBtvV6QYmabVMIvqJpBVYdVUggicxhMHtHKLKH lvBVTtginAr3dX639r/8napYfrabhpZjpVjMgPgs/ArkFFlhQ+6CE+TMKhkw0dzS CkzNmKXfxm3v9od3HXAV1NKHBX5/8pj2CnHjzRGZS/jhEt8jaSXOewoG/zJyzYuI = Received: (qmail 3892154 invoked from network); 18 Jan 2023 13:20:06 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Jan 2023 13:20:06 +0100 X-UD-Smtp-Session: l3s3148p1@0l8z1ojy3ulehhrZ From: Wolfram Sang <wsa+renesas@sang-engineering.com> To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: renesas: vsp1: blacklist r8a7795 ES1.* Date: Wed, 18 Jan 2023 13:20:02 +0100 Message-Id: <20230118122003.132905-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755365953310129036?= X-GMAIL-MSGID: =?utf-8?q?1755365953310129036?= |
Series |
media: renesas: vsp1: blacklist r8a7795 ES1.*
|
|
Commit Message
Wolfram Sang
Jan. 18, 2023, 12:20 p.m. UTC
The earliest revision of these SoC may hang when underrunning. Later
revisions have that fixed. Bail out when we detect a problematic
version.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
The BSP tries to work around the issue, yet this is neither upstreamable
nor are we sure the solution is complete. Because the early SoC revision
is hardly in use, we simply "document" the problem upstream.
drivers/media/platform/renesas/vsp1/vsp1_drv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Comments
Hi Wolfram, Thank you for the patch. On Wed, Jan 18, 2023 at 01:20:02PM +0100, Wolfram Sang wrote: > The earliest revision of these SoC may hang when underrunning. Later > revisions have that fixed. Bail out when we detect a problematic > version. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- > > The BSP tries to work around the issue, yet this is neither upstreamable > nor are we sure the solution is complete. Because the early SoC revision > is hardly in use, we simply "document" the problem upstream. The workaround isn't upstreamable as-is, but I think it could be upstreamed after being cleaned up. Overall, how much support do we still have upstream for H3 ES1.x, and do we need to keep it ? H3 ES.1x is relatively old, does someone still rely on it ? > drivers/media/platform/renesas/vsp1/vsp1_drv.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c > index c260d318d298..b395e8eb0af9 100644 > --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c > +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c > @@ -17,6 +17,7 @@ > #include <linux/platform_device.h> > #include <linux/pm_runtime.h> > #include <linux/reset.h> > +#include <linux/sys_soc.h> > #include <linux/videodev2.h> > > #include <media/rcar-fcp.h> > @@ -875,13 +876,24 @@ static const struct vsp1_device_info *vsp1_lookup_info(struct vsp1_device *vsp1) > return NULL; > } > > +static const struct soc_device_attribute vsp1_blacklist[] = { > + /* H3 ES1.* has underrun hang issues */ > + { .soc_id = "r8a7795", .revision = "ES1.*" }, > + { /* Sentinel */ } > +}; > + > static int vsp1_probe(struct platform_device *pdev) > { > + const struct soc_device_attribute *attr; > struct vsp1_device *vsp1; > struct device_node *fcp_node; > int ret; > int irq; > > + attr = soc_device_match(vsp1_blacklist); > + if (attr) > + return -ENOTSUPP; > + > vsp1 = devm_kzalloc(&pdev->dev, sizeof(*vsp1), GFP_KERNEL); > if (vsp1 == NULL) > return -ENOMEM;
> Overall, how much support do we still have upstream for H3 ES1.x, and do > we need to keep it ? H3 ES.1x is relatively old, does someone still rely > on it ? SDHI also had numerous problems with H3 ES1. The agreement was: If it is "easily" upstreamable, then we want to support ES1 as much as possible. If it is complex and a maintenance burden, then we don't upstream it. This is why ES1 has no HS400 support for eMMC. It would have involved activating the SDHI sequencer which we don't use otherwise. I copied this behaviour and think it makes sense (for upstream).
Hi Laurent, On Wed, Jan 18, 2023 at 2:21 PM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > On Wed, Jan 18, 2023 at 01:20:02PM +0100, Wolfram Sang wrote: > > The earliest revision of these SoC may hang when underrunning. Later > > revisions have that fixed. Bail out when we detect a problematic > > version. > > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > --- > > > > The BSP tries to work around the issue, yet this is neither upstreamable > > nor are we sure the solution is complete. Because the early SoC revision > > is hardly in use, we simply "document" the problem upstream. > > The workaround isn't upstreamable as-is, but I think it could be > upstreamed after being cleaned up. > > Overall, how much support do we still have upstream for H3 ES1.x, and do > we need to keep it ? H3 ES.1x is relatively old, does someone still rely > on it ? I think the upstream support level for R-Car H3 ES1.x is about the same as for H3 ES2.0. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, Wolfram, On Wed, Jan 18, 2023 at 02:30:51PM +0100, Geert Uytterhoeven wrote: > On Wed, Jan 18, 2023 at 2:21 PM Laurent Pinchart wrote: > > On Wed, Jan 18, 2023 at 01:20:02PM +0100, Wolfram Sang wrote: > > > The earliest revision of these SoC may hang when underrunning. Later > > > revisions have that fixed. Bail out when we detect a problematic > > > version. > > > > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > > --- > > > > > > The BSP tries to work around the issue, yet this is neither upstreamable > > > nor are we sure the solution is complete. Because the early SoC revision > > > is hardly in use, we simply "document" the problem upstream. > > > > The workaround isn't upstreamable as-is, but I think it could be > > upstreamed after being cleaned up. > > > > Overall, how much support do we still have upstream for H3 ES1.x, and do > > we need to keep it ? H3 ES.1x is relatively old, does someone still rely > > on it ? > > I think the upstream support level for R-Car H3 ES1.x is about the same > as for H3 ES2.0. Question is, do we need to keep it ? :-) And if we do, instead of black-listing devices in the VSP driver, how about dropping them from r8a77950.dtsi ? We already delete quite a lot of devices there. Note that without VSP support, you will get no display either, so the DU device (and the LVDS encoder) so also be deleted.
Hi Laurent, On Wed, Jan 18, 2023 at 2:39 PM Laurent Pinchart <laurent.pinchart@ideasonboard.com> wrote: > On Wed, Jan 18, 2023 at 02:30:51PM +0100, Geert Uytterhoeven wrote: > > On Wed, Jan 18, 2023 at 2:21 PM Laurent Pinchart wrote: > > > On Wed, Jan 18, 2023 at 01:20:02PM +0100, Wolfram Sang wrote: > > > > The earliest revision of these SoC may hang when underrunning. Later > > > > revisions have that fixed. Bail out when we detect a problematic > > > > version. > > > > > > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > > > --- > > > > > > > > The BSP tries to work around the issue, yet this is neither upstreamable > > > > nor are we sure the solution is complete. Because the early SoC revision > > > > is hardly in use, we simply "document" the problem upstream. > > > > > > The workaround isn't upstreamable as-is, but I think it could be > > > upstreamed after being cleaned up. > > > > > > Overall, how much support do we still have upstream for H3 ES1.x, and do > > > we need to keep it ? H3 ES.1x is relatively old, does someone still rely > > > on it ? > > > > I think the upstream support level for R-Car H3 ES1.x is about the same > > as for H3 ES2.0. > > Question is, do we need to keep it ? :-) And if we do, instead of > black-listing devices in the VSP driver, how about dropping them from > r8a77950.dtsi ? I prefer blacklisting in the driver, as dropping them from r8a77950.dtsi wouldn't disable them when used with an older or out-of-tree DTB. > We already delete quite a lot of devices there. ... because they don't exist on H3 ES1.x. > Note that without VSP support, you will get no display either, so the > DU device (and the LVDS encoder) so also be deleted. True... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, On Wed, Jan 18, 2023 at 03:02:53PM +0100, Geert Uytterhoeven wrote: > On Wed, Jan 18, 2023 at 2:39 PM Laurent Pinchart wrote: > > On Wed, Jan 18, 2023 at 02:30:51PM +0100, Geert Uytterhoeven wrote: > > > On Wed, Jan 18, 2023 at 2:21 PM Laurent Pinchart wrote: > > > > On Wed, Jan 18, 2023 at 01:20:02PM +0100, Wolfram Sang wrote: > > > > > The earliest revision of these SoC may hang when underrunning. Later > > > > > revisions have that fixed. Bail out when we detect a problematic > > > > > version. > > > > > > > > > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > > > > --- > > > > > > > > > > The BSP tries to work around the issue, yet this is neither upstreamable > > > > > nor are we sure the solution is complete. Because the early SoC revision > > > > > is hardly in use, we simply "document" the problem upstream. > > > > > > > > The workaround isn't upstreamable as-is, but I think it could be > > > > upstreamed after being cleaned up. > > > > > > > > Overall, how much support do we still have upstream for H3 ES1.x, and do > > > > we need to keep it ? H3 ES.1x is relatively old, does someone still rely > > > > on it ? > > > > > > I think the upstream support level for R-Car H3 ES1.x is about the same > > > as for H3 ES2.0. > > > > Question is, do we need to keep it ? :-) And if we do, instead of > > black-listing devices in the VSP driver, how about dropping them from > > r8a77950.dtsi ? > > I prefer blacklisting in the driver, as dropping them from r8a77950.dtsi > wouldn't disable them when used with an older or out-of-tree DTB. Is that really a use case we need to care about ? Who will run a recent kernel with an old DTB on a H3 ES1.x, without an easy way to update to a mainline device tree ? It's not like those devices went into production. > > We already delete quite a lot of devices there. > > ... because they don't exist on H3 ES1.x. > > > Note that without VSP support, you will get no display either, so the > > DU device (and the LVDS encoder) so also be deleted. > > True...
Hi! > > I prefer blacklisting in the driver, as dropping them from r8a77950.dtsi > > wouldn't disable them when used with an older or out-of-tree DTB. > > Is that really a use case we need to care about ? Who will run a recent > kernel with an old DTB on a H3 ES1.x, without an easy way to update to a > mainline device tree ? It's not like those devices went into production. There's some agreement that DTBs are an ABI, and that they should work with old and new kernels. Disabling it in the driver seems like right solution. Best regards, Pavel
Hi Pavel, > There's some agreement that DTBs are an ABI, and that they should work > with old and new kernels. Disabling it in the driver seems like right > solution. We agreed to remove support for this specific SoC entirely from the kernel. With this merge window, it won't boot anymore. It was for internal development only anyhow. So, instead of adding new quirks for it, I will remove all existing ones once rc1 is released. So, this patch can be dropped. Thank you for your review, Wolfram
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_drv.c b/drivers/media/platform/renesas/vsp1/vsp1_drv.c index c260d318d298..b395e8eb0af9 100644 --- a/drivers/media/platform/renesas/vsp1/vsp1_drv.c +++ b/drivers/media/platform/renesas/vsp1/vsp1_drv.c @@ -17,6 +17,7 @@ #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/reset.h> +#include <linux/sys_soc.h> #include <linux/videodev2.h> #include <media/rcar-fcp.h> @@ -875,13 +876,24 @@ static const struct vsp1_device_info *vsp1_lookup_info(struct vsp1_device *vsp1) return NULL; } +static const struct soc_device_attribute vsp1_blacklist[] = { + /* H3 ES1.* has underrun hang issues */ + { .soc_id = "r8a7795", .revision = "ES1.*" }, + { /* Sentinel */ } +}; + static int vsp1_probe(struct platform_device *pdev) { + const struct soc_device_attribute *attr; struct vsp1_device *vsp1; struct device_node *fcp_node; int ret; int irq; + attr = soc_device_match(vsp1_blacklist); + if (attr) + return -ENOTSUPP; + vsp1 = devm_kzalloc(&pdev->dev, sizeof(*vsp1), GFP_KERNEL); if (vsp1 == NULL) return -ENOMEM;