From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A154C0018A for ; Fri, 3 Nov 2023 10:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376786AbjKCKoc (ORCPT ); Fri, 3 Nov 2023 06:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377832AbjKCKo1 (ORCPT ); Fri, 3 Nov 2023 06:44:27 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A73D57 for ; Fri, 3 Nov 2023 03:44:19 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5094cb3a036so1908681e87.2 for ; Fri, 03 Nov 2023 03:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699008257; x=1699613057; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=c5nLolPwuJpq0W0yvjQJguc5sT9X9KBoVJr/KRt6GGU=; b=uqChyuT+DOS51LiRh9a/iv3r0te8urzMp7RKtCJhnVyGS5tbXaeisW1dFJss0KqNNj gus+iv2Y5VRO36R6caxwLwT+r4xolyunvj298sRcTylpyd9AM8AJ3MZdv6a2O65oee8X 7ivWEAihTmKkMWiFpkwcwcBJPsQ1/ez01z+USF8PgjLr2mIQeFgmF0RGs+vDhOpD2Y9c Dy4oIJpR9UTkt25cyQEpq0jJ2iSe+Q/MV2IGp5D/DRov5Sie2+9GowUMj+VqoQfGnwm+ 6bUpIEPDxX7k0VqUpJrhMkmyZfygjRUwX5sSIMshZx6b6f7oSyCGaRwmO/QiWKH86e+B 5scw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699008257; x=1699613057; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c5nLolPwuJpq0W0yvjQJguc5sT9X9KBoVJr/KRt6GGU=; b=duSwljPWl0g0UY/mdFLjJBLDbFRba8a1Vgjr+JIkh/VgawO++SXGHqW+Z5r5iOOKj3 nckTJ8y1sNr7913Kgs/Fnmq3IqlDejKS8Ua1NiFbBjl3U3wUETGCD50WUlWLLLuRBo2O iDfF8lYZgsuDpmvm6Mij23SjxMqXMcDhAelRBEGZGLt8BiN2+roj4xI8ClGyIoVV0n/Y DcbyqI0pj7uw6LGtUuXDgfqpxX3oaTS6IdsJDB3uHVVbGvRp4+QtHZwTMIeIE4+ur9EV 4gN5FfuIW2A0KIOSDiWaUSsgQA4fbF9epAH2dK7XYlvnIpiu4+zPSMlnxxs4GGlXsELn 8ffA== X-Gm-Message-State: AOJu0YyKn7J+uQ8X9Am4J/X/DsE6fHNoDgbwl2sUqyr6jq36v2iuK1P4 bTTjCQMvtHbtBD8ru3vCRfHnBg== X-Google-Smtp-Source: AGHT+IGWyRsXFk6LHw2H/ZIpZhZ8RL6RZVkgocUX8w24VSIFhdIXzdR+tNgUainvl9TtQl7/CIm11Q== X-Received: by 2002:a19:2d0a:0:b0:507:c7cc:12d7 with SMTP id k10-20020a192d0a000000b00507c7cc12d7mr14426147lfj.4.1699008257167; Fri, 03 Nov 2023 03:44:17 -0700 (PDT) Received: from [192.168.100.102] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id f6-20020a5d5686000000b0032f7eaa6e43sm1526650wrv.79.2023.11.03.03.44.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Nov 2023 03:44:16 -0700 (PDT) Message-ID: Date: Fri, 3 Nov 2023 10:44:14 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RESEND v3 5/5] venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode Content-Language: en-US To: Abel Vesa , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown , Greg Kroah-Hartman , Bjorn Andersson , Andy Gross , Konrad Dybcio , Michael Turquette , Stephen Boyd , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab Cc: Taniya Das , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-media@vger.kernel.org, Jagadeesh Kona References: <20231101-gdsc-hwctrl-v3-0-0740ae6b2b04@linaro.org> <20231101-gdsc-hwctrl-v3-5-0740ae6b2b04@linaro.org> From: Bryan O'Donoghue In-Reply-To: <20231101-gdsc-hwctrl-v3-5-0740ae6b2b04@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/11/2023 09:04, Abel Vesa wrote: > From: Jagadeesh Kona > > This change demonstrates the use of dev_pm_genpd_set_hwmode API from > video driver to switch the video mvs0 gdsc to SW/HW modes at runtime > based on requirement. > > This change adds a new boolean array member vcodec_pmdomains_hwctrl in > venus_resources structure to indicate if GDSC's have HW control support > or not. This data is used in vcodec_control_v4() to check if GDSC has > support to switch to HW control mode and then call dev_pm_genpd_set_hwmode > to switch the GDSC mode. > > Before the GDSC HWCTL was available to the consumer, the venus driver > needed to somehow keep the power from collapsing while under the driver > control. The only way to do that was to clear the CORE_PWR_DISABLE bit > (in wrapper POWER_CONTROL register) and, respectively, set it back after > the driver control was completed. > > Now, that there is a way to switch the GDSC HW/SW control back and > forth, the CORE_PWR_DISABLE toggling can be dropped. > > Signed-off-by: Jagadeesh Kona > Signed-off-by: Abel Vesa So I plan to give this a test on rb5 and db410c My q here though is - has anybody on the submission list tested this through suspend/resume and vdd min ? --- bod