Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp913131lqp; Sun, 14 Apr 2024 05:40:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGZQ5660icwL5yxXR6Yy9n/IA4don0jQugdouRmNVZVj/VXuyKAxuHxY1zwy4wfMxFjMCNXjHiFOJhuLEjMxR56Oj+MGqmajiZ3029CQ== X-Google-Smtp-Source: AGHT+IGZxEj77p7TQ/bYeGDp60sU7xHqlCBVy8D20Px9J7JUzJGp+6d5UEnvXrmNrMZ3wr3VnuGY X-Received: by 2002:a05:6512:3f08:b0:518:bbb8:e7a5 with SMTP id y8-20020a0565123f0800b00518bbb8e7a5mr2244735lfa.42.1713098416945; Sun, 14 Apr 2024 05:40:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713098416; cv=pass; d=google.com; s=arc-20160816; b=PAWRDW7iOC/qMYLCG5SDe8usbEWK+/aI79jZXoOA4b62cQyauvfcdmksu+oBbOncUU 7dLgnCneqeqJM9wSzcPY62BG7n6m1Fq+TiZp9FplRnXmkwELtpar8ERHHOYjbs8udWjS FUO6vvV7hsGu9WtPXMUsiu/9P14xKKWzrVgZUKutUwbp9DX/ida4xi9LDoRyLSAabxqK CdHoaLo6yzP3x4P/547lauiLFgteoWp9zlngk5B+ELKwcSeh0jp+V7bEclMjMpT71xeh rj7eLxwtNsMuC90LvQS1lnlYup7JlP+vvKAHoIJSYR3FnmDxB2wDfy/HaQNO/thyAiq0 0C4g== 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=6caUmj4J65h/YjIX6IywsH74tzjrKOAOHEmC2FZcC/o=; fh=DLMlYLtQeCurRPHW85Hz7LGfLiUCOoLY7d0Isz0p94Q=; b=YcaIXkQns/bkcw4opaUdfonmLnd/mWCnG/hRm0LvX2ipNBfv4+V4GJcOI+Mam3HKtE DpiKstH7fYbpKUCfzxjz8LQ1ykHYwzwTApbW801SM+Yf4fbhJkNxzI49vfpxFrovsBa1 v39ABgXIj30oxSnfrUKOZnyFRA+/pxmRVZVevDEcF4Qq8d2O5oOB95Wi2v8AaL6ShT1W 8DLcHx9JoK002xBy5Twl2yVChvjvl7pqLBicslEDyM/GsZ6sDRygYlFUZ+qSruuQmFpS 5EySG92Hfbyc0Ed2f+W47YnboJz0MWJGqpwHf0MLk+L/2NeOnU6RiAi8Iu0kfoam5rkF aZ+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kbKnskrI; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-144139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144139-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qw41-20020a1709066a2900b00a522ef880d4si2971111ejc.559.2024.04.14.05.40.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 05:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kbKnskrI; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-144139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144139-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id A7C681F216DB for ; Sun, 14 Apr 2024 12:40:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4CD737145; Sun, 14 Apr 2024 12:40:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kbKnskrI" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 3FBE414292 for ; Sun, 14 Apr 2024 12:40:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713098404; cv=none; b=YyDaNGAKEfiQpr4z8JfXeC8Ui+wnVSjYc1cVDbt41KFIEpYsbtduYs2xxtiREFe6atI6F6h13WSLeR5DmmPtrZtHai013j7wXn3elyJGpE5j6X8p5CHYvjwWbPQXY5ZFD947g24MAFkIqePMgYEdBiHIIzAgzWd0vGo1D4iE4Uo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713098404; c=relaxed/simple; bh=BPchb6SuF3YffLRf+8/iXRceh/nK/f1NxS1WB7VSjUQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Uh6pH9/5g1YulzrwKFDzck3PIyV2yi7aLZWDWcxiysxGuTMHPyKrL8+O/MyC6r3wIcR0epPZmcB+aO9cCIhznUfbBnLs0WJJgCxHkWKnsKCLUR9XmkihG8d2nzhd3DdWL6kpfMBpTJofldpY2Tx4krSVqZQbN/1w6xnTUiXJ+MA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kbKnskrI; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4155819f710so15636055e9.2 for ; Sun, 14 Apr 2024 05:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713098401; x=1713703201; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6caUmj4J65h/YjIX6IywsH74tzjrKOAOHEmC2FZcC/o=; b=kbKnskrIfFSbWafD1c8jnSIXPlRFMr6brtEmO2LQ8WZAtfP8DzIFWMFkptyTpD9556 24zLebmBGdamcz6vaJTEgFaqpV94yfb+23GqtrMDdwpy+tR31Ydunwz57uVaFiP+86ew Kxb+7DWP2sW1slwuF0NXq162INu5R0axivxuLvUoVqm/hsg56YaUypc3REyWt2NX7h+9 pY7VOx7M9/88aB5oGbqLn5TRpJ65C/cTDAsA1g2tMLGHe0mov7Ah8J2RUTd7x15sQgT0 zc+8avD9wwCpD5yDm017fzPGd69b7h7R75iXqRtGt3q7IoNjwLowEt4QaUaQ3oXVKkH5 harA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713098401; x=1713703201; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6caUmj4J65h/YjIX6IywsH74tzjrKOAOHEmC2FZcC/o=; b=AVZiwLehttJTU6t9ZQ6Yb506fQUbZz00J24e5kUAaYvcMn8BN/ndfhfVXc2MykPg5R Hwo8caQbtmwwjw6uu02AGjd1vpZNTZSUsdjgK2ASamoBvJ5I+Xi2OjFVhbtr1i64g+41 2qn4tZeq0GlrB3u15szE7nwjqG/58c4atVrsflTY5o7izzeouxaohqR0EjwslqYyw1xi ZMlDaPduNUSRdT+xO/ziWGcLWnCEimydR9CBtyNW1CGG3svOqr/o5jeJT6aSbfO+O4Np gYF2FH82WLhWytZaCxnoGpzca+tdXZ09Co+uY7lURqK2UlfB5FdPD5g4kJKLqAxdX5gQ hmdA== X-Forwarded-Encrypted: i=1; AJvYcCUh1nW58+oO4nDHDwAxPBfyXKJs3+uX+3UsQrUCw4OgBnfkt5/iemUyjcLIAk2ysSS8AtCqIN+0bxwjarr6XH7/OjZ9wRenEwp0ehY6 X-Gm-Message-State: AOJu0YybMoNBH/RSeyVQBhnv3aQMpij/EWtOtLfNvJpqhdLT+rPjuQYl GisW/T+WxkKVxNWe2bNSviGNq6PTE9cY1cQi5Wn7n1jerQpB2RXe4TZZh2Y+PU8= X-Received: by 2002:a05:600c:1992:b0:418:273a:7688 with SMTP id t18-20020a05600c199200b00418273a7688mr2224806wmq.32.1713098401592; Sun, 14 Apr 2024 05:40:01 -0700 (PDT) Received: from [192.168.0.102] ([176.61.106.68]) by smtp.gmail.com with ESMTPSA id q12-20020a05600c46cc00b00417bab31bd2sm12159302wmo.26.2024.04.14.05.40.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Apr 2024 05:40:00 -0700 (PDT) Message-ID: <5c78ad52-524b-4ad7-b149-0e7252abc2ee@linaro.org> Date: Sun, 14 Apr 2024 13:39:59 +0100 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: [PATCH V5 RESEND 5/5] venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode on V6 To: Jagadeesh Kona , Bjorn Andersson , Michael Turquette , Stephen Boyd , Stanimir Varbanov , Vikash Garodia , Mauro Carvalho Chehab , Ulf Hansson , "Rafael J . Wysocki" , Kevin Hilman , Pavel Machek , Len Brown , Greg Kroah-Hartman , Konrad Dybcio , Andy Gross , Dmitry Baryshkov , Abel Vesa Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, Taniya Das , Satya Priya Kakitapalli , Imran Shaik , Ajit Pandey References: <20240413152013.22307-1-quic_jkona@quicinc.com> <20240413152013.22307-6-quic_jkona@quicinc.com> Content-Language: en-US From: Bryan O'Donoghue In-Reply-To: <20240413152013.22307-6-quic_jkona@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 13/04/2024 16:20, Jagadeesh Kona wrote: > The Venus driver requires vcodec GDSC to be ON in SW mode for clock > operations and move it back to HW mode to gain power benefits. Earlier, > as there is no interface to switch the GDSC mode from GenPD framework, > the GDSC is moved to HW control mode as part of GDSC enable callback and > venus driver is writing to its POWER_CONTROL register to keep the GDSC ON > from SW whereever required. But the POWER_CONTROL register addresses > are not constant and can vary across the variants. > > Also as per the HW recommendation, the GDSC mode switching needs to be > controlled from respective GDSC register and this is a uniform approach > across all the targets. Hence use dev_pm_genpd_set_hwmode() API which > controls GDSC mode switching using its respective GDSC register. > > In venus V6 variants, the vcodec gdsc gets enabled in SW mode by default > with new HW_CTRL_TRIGGER flag and there is no need to switch it to SW > mode again after enable, hence add check to avoid switching gdsc to SW mode > again after gdsc enable. Similarly add check to avoid switching GDSC to HW > mode before disabling the GDSC, so GDSC gets enabled in SW mode in the next > enable. > > Signed-off-by: Jagadeesh Kona > Signed-off-by: Abel Vesa > --- When I tested this out on sm8250 a few months ago it was broken. I don't quite see in your commit logs, how the breakage was addressed. Can you provide some details ? --- bod