Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp214364lqj; Sat, 1 Jun 2024 15:49:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzXKYRMYuA0ZXOH3apmmj+v5nR848T5zili2WW5ptVbSriWxrQNgXwCI7mnIoIRmKGNHV8dKXSc851SrsaBUtrvpUuzJORsSTUikvDVw== X-Google-Smtp-Source: AGHT+IH1S3g/s+R4PJs+y81mNKYUp5tcgMXuXx1REQVXHSULc9wz22DYGzhpk6FZIpXV/gO+SKxR X-Received: by 2002:a05:6358:7e01:b0:199:433d:aa3c with SMTP id e5c5f4694b2df-19b490d642bmr736038755d.32.1717282187322; Sat, 01 Jun 2024 15:49:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717282187; cv=pass; d=google.com; s=arc-20160816; b=Ph4fO8cCbQ2zsBWdl2aYmLdEDwqn662qvoAj+oKk+r0XtPxGWXuyeN6sEZWu2W4sQt mC8j0gV9be0s2o+ZJxB8RbNKGCfqZMoCGEfxQN9vVwuAYPG1v6bkkBHdm+V2En6CerU2 FT6WYnOgnkdY2kv5TUskxMwQyNozaIaqMJhSNYKEBuNWH6m6lb2we5afQzPDzWDCNl/y N7AS6cg6oYk6RkgdnkKOUpU6H4KQA9tHMNrzg26lu379gOK0qKy5TA02o7966+ZpN967 Th2ZLGhWVV4nqkKrv5o1QJ3cny8UWhKH6roSznd69y6Kpd/R8LS1L8+822gS5JUG/qwW yHrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=/k1PnOZIBQq7/TC/41KnYN6gtYkoZOfq1Q0coM4QxJ4=; fh=zutjDpDljH+3EyVFLN/hZIMcZRL4qFB2BdA0ITy+IVI=; b=QwnIQ74pNgJg7nmBYp0+l7b70/i9RqB5okBOjcb1U7/W99jsobeEpChZBpXb8+Ho1Q ZlaQ+VZh3iB4KaKzNnAjvLvlI9YhPZeqyo9EFCtksDEABYLwQ2N5U1iWSJgfvx06z3ra 9TArl4WkkMV9aOQVuGlkTq0WyI4KnxRlpNr1C2pbKqmkP7dYHRfd1OkVDV99hZ9dQjzs eSZ8fk9UQU4ge0oktweIrubqh7NUauUsbY64rNCd6NUmzt8G4JHu8aNGvGzPfMzm6eRn YX8pZNgBh1DrVJB+ImAZjAPjiXkqc/J4k1fX7eo0fSoCmI2i1koT5n7zQNFrOb80abhe dAGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=IAoiJYPj; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-198026-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35af4547bsi3901966a12.435.2024.06.01.15.49.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 15:49:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198026-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=IAoiJYPj; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-198026-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198026-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BF65C281DDE for ; Sat, 1 Jun 2024 22:49:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8290B2E419; Sat, 1 Jun 2024 22:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="IAoiJYPj" Received: from smtp.forwardemail.net (smtp.forwardemail.net [167.172.40.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82628224CC for ; Sat, 1 Jun 2024 22:49:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.172.40.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717282181; cv=none; b=YbCSzXutJ849g9UYwzj2SZ0chsjHCQ5pSlRavGd0SOAtk1u+VWsfOEUZhvSeejxnUb12wnz3aBz+9DSLpQ9SGRQ6xssHfYKbWFOXpZsJwudOWM7OFMuU03cm/A7WL5F0AG7byPxqFBuB2Jn105Ac+T9oXWSwm8CvKGH0doj65Ds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717282181; c=relaxed/simple; bh=Jkb8Hqv95DRnRm/NxgOPNaIghiPJOHpb1eOciF3qDFY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=epzv7nRyMdAlcvgxJu7z7vFVodREnlri6m6fQ0Jdxq6Pk7NTsrNsSF3hZPuPj5nPDjm126W4x9rYOtlXEwNWpwVKpdcdMnvaE7e2Woqs050aQTwoqeINwCodBc2SJlriXV5Htl0YeQ9k0e81QIrS9YaMpc7izeRbVQRdXCywp/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=IAoiJYPj; arc=none smtp.client-ip=167.172.40.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: From: References: Cc: To: Subject: MIME-Version: Date: Message-ID; q=dns/txt; s=fe-e1b5cab7be; t=1717282140; bh=/k1PnOZIBQq7/TC/41KnYN6gtYkoZOfq1Q0coM4QxJ4=; b=IAoiJYPjI70b9FQJs5+yPAOaADoe2lOr7mk54a47iJK6LaeVzR2nJkjDq6UjqUQQBh16oLSWp OmRJwWHT34EDXPILh1QGR5YjCTwOMH01HciscOIbH3tC6FLs/j5k9D7n3pLWGwoFcbUJQaq5oN7 VpL5ScVekby+AqKHPUXblKBpcs29IyoO7bkofK8WRfKZt+bUarmEqrnIRSwLEwL6o51DdjatHKw 9ngdlaRlPFkozI4PqSd2Qy0ugLtd9NlQaHrFsDcOglTKQRqwcJqUYb8/AYRtV+FGGT3hxn3Bu+X rm3KRfIibp1Lrn9kcPqcE1genx0e0W02xye8Dlsl8BnQ== Message-ID: Date: Sat, 1 Jun 2024 01:32:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH] arm64: dts: rockchip: Make preparations for per-RK3588-variant OPPs To: Alexey Charkov Cc: Dragan Simic , linux-rockchip@lists.infradead.org, heiko@sntech.de, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-kernel@vger.kernel.org, quentin.schulz@cherry.de, wens@kernel.org, daniel.lezcano@linaro.org, didi.debian@cknow.org, krzysztof.kozlowski+dt@linaro.org, viresh.kumar@linaro.org References: <673dcf47596e7bc8ba065034e339bb1bbf9cdcb0.1716948159.git.dsimic@manjaro.org> <8f8623e29a479c4108141302e708dc3b@manjaro.org> <166cc4e46f31644a50306625b2ab18a6@manjaro.org> <82db817a908b761d8c3d73ea04714314@manjaro.org> <607f4da8-99b2-4379-9567-4bfd2744eab3@kwiboo.se> Content-Language: en-US From: Jonas Karlman In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 167.172.40.54 X-ForwardEmail-ID: 665a5e1290b1ee9784da9536 Hi Alexey, On 2024-05-31 13:44, Alexey Charkov wrote: > Hi Jonas, > > On Fri, May 31, 2024 at 3:27 PM Jonas Karlman wrote: >> >> Hi Alexey and Dragan, >> >> On 2024-05-30 21:31, Dragan Simic wrote: >>> Hello Alexey, >>> >> >> [snip] >> >>>>>>> That way we'll have no roadblocks if, at some point, we end up with >>>>>>> having >>>>>>> different OPPs defined for the RK3588 and the RK3588S variants. Or >>>>>>> maybe >>>>>>> even for the RK3582, which we don't know much about yet. >>>>>> >>>>>> Guess we'll deal with that one once we stumble upon an actual RK3582 >>>>>> board out in the wild and heading to the mainline kernel tree :) >>>>> >>>>> Of course, that was just an example for the future use. >>>> >>>> In fact, I've just discovered that Radxa has recently released Rock 5C >>>> Lite which is based on RK3582, and starts at just $29 for the 1GB >>>> version, making it interesting for tinkering. Especially given that >>>> its GPU, one of the big-core clusters and one of the VPU cores seem to >>>> be disabled in software (u-boot) rather than in hardware, which means >>>> there is some chance that a particular SoC specimen would actually >>>> have them in a working condition and possible to re-enable at no cost. >>>> Ordered myself one to investigate :) >>> >>> Yes, I also saw the RK3582-based ROCK 5C Lite a couple of days ago. :) >>> It seems that the disabled IP blocks are detected as defective during >>> the manufacturing, which means that they might work correctly, or might >>> actually misbehave. It seems similar to the way old three-core AMD >>> Phenom II CPUs could sometimes be made quad-core. >>> >> >> I can confirm that the RK3582 include ip-state in OTP indicating >> unusable cores, any unusable cpu core cannot be taken online and stalls >> Linux kernel a few extra seconds during boot. >> >> Started working on a patch for U-Boot to remove any broken cpu core >> and/or cluster nodes, similar to what vendor U-Boot does, adopted to >> work with a mainline DT for RK3588. > > Superb - it's great to have a patch for it already, thank you for working on it! > >> On one of my ROCK 5C Lite board one of the cpu cores is unusable, U-Boot >> removes the related cpu cluster nodes. On another ROCK 5C Lite board one >> rkvdec core is only marked unusable and all cpu cores can be taken >> online, U-Boot does nothing in this case. Guessing we should apply >> similar policy as vendor U-Boot and disable cores anyway. > > Is there any misbehavior / instability if you just keep all the > unmarked cores online? I will run some tests during the weekend and get back with results later. > > I think from an end-user perspective it would be better to just enable > everything that works, as the reason to unconditionally disable some > IP blocks even when they are "good" is quite likely not a technical > one but rather a marketing one. It's hard to justify selling chips > with different sets of working IP blocks under the same label and the > same price, making it easier to just trim them all to a lowest common > denominator. On the other hand, once a person has already bought a > device where some IP blocks work even if they are not supposed to, why > not make use of them? It costs nothing, hurts noone... I agree, it is probably more related to marketing, licensing and/or what is tested. Vendor U-Boot apply following logic/policy for rk3582 (and rk3583). RK3582 policy: - always remove gpu - always remove both rkvdec cores - remove bad rkvenc core, if both are normal, remove rkvenc1 anyway RK3583 policy: - always keep gpu - remove bad rkvdec core, if both are normal, remove rkvdec1 anyway - remove bad rkvenc core, if both are normal, remove rkvenc1 anyway CPU core policy: - remove both cores within a cluster having a bad core - if core4~7 are all normal, remove core6 and core7 anyway Regards, Jonas > > Best regards, > Alexey