From patchwork Fri Feb 9 21:09:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 199088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1132362dyd; Fri, 9 Feb 2024 13:10:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVFKpNtx2I8XPp0soVPaFA/lEue5ke7p4sbJTSeZBwxz9iDz/H9X2+jRlQt7ECo7eTdzy5DbTbCrG9pOFalnEtsZVg5zg== X-Google-Smtp-Source: AGHT+IEQCuDUGBqmGFQ9rKFnBiDtw1/avenauDfFkNFmtzeTOA5EimqDUBSwVdUtSQhTOo8OSc6B X-Received: by 2002:a17:906:358f:b0:a38:9ff:571c with SMTP id o15-20020a170906358f00b00a3809ff571cmr173417ejb.9.1707513025473; Fri, 09 Feb 2024 13:10:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707513025; cv=pass; d=google.com; s=arc-20160816; b=nIUBHxiK6OVywTzeEgfII2mMvx6gJ9x0WE4mhKZ5fQ+pl9Skfdl8suBHNwC9SXSaeE FHh9BPApeNNjwnHi4WDKVJeaLpXn+PYFRwDc9DB/xmjXwzBzRxaYDYGYIzQjXv1JlqIO 198X4NWXfP0ulaDgcwf7NpHaAyeoazkLPmxz7DXXVQGI4Ulw5WJklYcsgrRFJoPh73xE hmvxTxAYGKfGzrD8JWgHmMsaIy4UFalTYXHLsn8ccaC+FstC+YmQYWdkA2YktGOEFin4 0K8XKxQ+yAysjNJF8MmcNpMw8clPkaxyP48ZNgvYjQapaC6uf5lXG6x1UOFbjr+I6Evg a3Cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=YqgwRixA6ApDI8sPrNg91MKVrvVSPJRcKUUS08MgCmY=; fh=xPBPjsucjNoXFZn0GLGDpiMyCAzuJsLKQy8e387fhtY=; b=ZNFGo5zqDhxTsEm01n84dGiJ3eFab6baNJb1VT+KZAcaIlo20V6VT9HADow2D3JM9b 4dYv2wbUFYu0wNoUfrAGrxbhRmRGtTeetbU0ku7JbGdLFYTDrze6+0ZWrX3E1plV0wJW ACYmo1C4yw1m17WRqXwk2f1M9xbE3TpE/9h2ZLAgW9iYLsgXcJ8S6cIO+TS/U0EmJYQ3 7Iy6SiWZbalD3kvUez19DKSzRpWZzM7kEqvuuKuM2jHGS48reV55IKT5/G7g9gLBOSmS SbY0JOiaJBhxUU6v2+79eDLiXMaewSCyNjLHckIztw7ONCrYsluwA3XPI5VX9+rcehjK w6XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=diz0RxLJ; 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-59985-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59985-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCXGkNB5OI0P8ylHh/3pHZg8Xh3L8XjRwdg8f0xyym19sPf1LO27kaJin4HHwkV8L9yNR1E8+d7AvD+HPg76folp8i3EhA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v11-20020a170906564b00b00a378d971639si1115455ejr.541.2024.02.09.13.10.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59985-ouuuleilei=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=diz0RxLJ; 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-59985-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59985-ouuuleilei=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 E3CF31F23438 for ; Fri, 9 Feb 2024 21:10:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0A39335D8; Fri, 9 Feb 2024 21:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="diz0RxLJ" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 B6FA3168C2 for ; Fri, 9 Feb 2024 21:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512978; cv=none; b=EAtG9l7FpknUokEQku8lvWn+GfUNwQ2tV5WOWOapU8zxmUNTJn+Urj7OAX0TY26qiMimF9fIs+qbQ6gPucuCaqrHYwe8N82wtvzpbQGnbsvF6yoi8RUTolo7BftOVhtuiAjDQCtd3/aUv36KexC3CMRzvy67AwEDCe9MwARPCUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512978; c=relaxed/simple; bh=lb27xhI4gdBF4UHcwKFr8ScxLgxp1+CafppHA2L6fhU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BflPaacAootXP3KAvr2XLDp77/pyGIR8aLnJ9RbLEjzb5pH2mmkQlSMCZHRu1FGEZvXwFOB4PYpi1flz+5kP00Bg2uSX2RaBtFtnNJNwd/azw5xXz4EN6H1IZ4ndqJvf9k/dZqrJF8M3MI/Gf0sMp4wBZK2k7Cl1cxDJB/q62FA= 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=diz0RxLJ; arc=none smtp.client-ip=209.85.218.42 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-ej1-f42.google.com with SMTP id a640c23a62f3a-a26ed1e05c7so186222966b.2 for ; Fri, 09 Feb 2024 13:09:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707512975; x=1708117775; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YqgwRixA6ApDI8sPrNg91MKVrvVSPJRcKUUS08MgCmY=; b=diz0RxLJzazmqTqNIGo7qY4VFqslspNbVO+20rQCIPYd2VKpI7pGD4ukE735U8NLzu QAAEojlQx7AAChqHczIA35fL+zQbDCMOsOpDjkpT4HNBwsRSp7Kckzk/3IzKjjJwD50O JzWvsQYN/fsvixg3gITcV8DzlzyMAtOXt3swy3rRVM7mJsLkkRuofjGI06XuNIHF74yi JeoFEEnnKJYsroYDzIGuWkhgILSi/3c+1AVOtN9lL6weMdxDk3fMuzoW9z8LWQs9STJM zYxSkrPRbPGAKG1wFyoexAN136xFVlBt2iuKeCehvwtbJqDT32/q4j221Jlpwzz/6EJ/ K+UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707512975; x=1708117775; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YqgwRixA6ApDI8sPrNg91MKVrvVSPJRcKUUS08MgCmY=; b=BnqVV1xzsuW6wN+zFeBp7Gy8+E0YGNThHJTTj0rVXh+l+buPrZ3/p9rHXPmGDKyUlL N2sH4Dr3rkoJUIjalwvcwkG0M/MVf2cgDxwvrlWpLPYHYzElr/IuqbRW4zIaAoKrrEug L6QG+E3OJ8d9NSI0sWD5fAjZM2jLZxW6F0AgadeKV9zRnr/AlTuwhrEYmJE7/eLWS7mG Yi3MWK9b2SORV79Uls0cxbOo1H29TbT/qcRf5/RbamDoZ7xxhtGIBPJY7EUhGUAsJjIv pZ3dhaV85BCuuJM+VEGLSFYkrTjIrXqPFBOCXVZv1cMSyvgF1mXqLy+jMau+KNtsLnpw 1HtQ== X-Forwarded-Encrypted: i=1; AJvYcCUcIk65HaXLgFX96XqKXXywM2vdLi8VxhXNKegR+LSOn0obnM997FKWDPglQ/8eKM2CDNJbqhlz2p+XLKVbsoVAUxERRP++PuUCjm9B X-Gm-Message-State: AOJu0YwQpSKkkKlPedIqZGrCY2bSqmtfJExkzn9BoHhBdreFaDjCnrZm Mj+9yOKbU196eNJE8KCGmjj2MQk7s5tUatFlyrP3+dJl50MLvv0XHD1pXGW1zCE= X-Received: by 2002:a17:906:718e:b0:a38:66ef:14d3 with SMTP id h14-20020a170906718e00b00a3866ef14d3mr185447ejk.13.1707512975165; Fri, 09 Feb 2024 13:09:35 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWTpvx9yM7mnErFtcDnUGDjP2VK//6k7DMnglmnFSfOgK97aAHSUofzQz3YO5rJnGrWRPsvAJoH3/eSqzs70LjH+cuGqtUvaOqZnd8UU+4KJITo0L/N96XfZxBVXqg2Ep+fXVg+6+SBfMihCI/DwhrCvo/VBwoC7MzfVnhMvV+2XgVlEDr+b6w8/+4gTU6ELNLADSa8UQy8p2weJx0s8oRI9IFkrXbloI7xVaB4df+m+eeMz/BOOjY/8hmjOpg6sruukekjDAPzjttEzFzzI/gyKtDekl/QJFPZISI0x8kyT5n4bWyzXWymyPw+UaCu+5OHxgC8WGItMzkxRbhTvPeb9Q8RhrMV48hDEFV2mxL1wsAi/juBFlF6YRPswUcvqw8c7kqlew71t9xrJXGuIV/HyXKzYOWI4vEIZuAR6qAkzUox/9bRK80vZz2FiJOAzBD8aKA0rI+f6MeU51PsXKyW0HqjOy1n2tZKv6LwNssgwB6dgReiHSHfFYjtjgDEx64rjA== Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id cw3-20020a170907160300b00a381ca0e589sm1108516ejd.22.2024.02.09.13.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:09:34 -0800 (PST) From: Konrad Dybcio Date: Fri, 09 Feb 2024 22:09:22 +0100 Subject: [PATCH v2 01/20] media: venus: pm_helpers: Only set rate of the core clock in core_clks_enable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230911-topic-mars-v2-1-fa090d7f1b91@linaro.org> References: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> In-Reply-To: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707512970; l=1871; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=lb27xhI4gdBF4UHcwKFr8ScxLgxp1+CafppHA2L6fhU=; b=BYvxPbfQJO7lZPWc2Cb1EyRuJYBoAGwkeSywbuVSkwUn87PLDSMt/XU4H0pRNhwd6qD+yw/lD VK47K5Ow3XpDISNmeEH1vufGckVWwM9QPOQHOXKTn0E10ZcSJM+i/bf X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790457177851097629 X-GMAIL-MSGID: 1790457177851097629 Commit c22b1a29497c ("media: venus: core,pm: Vote for min clk freq during venus boot") intended to up the rate of the Venus core clock from the XO minimum to something more reasonable, based on the per- SoC frequency table. Unfortunately, it ended up calling set_rate with that same argument on all clocks in res->clks. Fix that using the OPP API. Fixes: c22b1a29497c ("media: venus: core,pm: Vote for min clk freq during venus boot") Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/pm_helpers.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 502822059498..8bd0ce4ce69d 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -41,24 +41,23 @@ static int core_clks_get(struct venus_core *core) static int core_clks_enable(struct venus_core *core) { const struct venus_resources *res = core->res; - const struct freq_tbl *freq_tbl = core->res->freq_tbl; - unsigned int freq_tbl_size = core->res->freq_tbl_size; - unsigned long freq; + struct dev_pm_opp *opp; + unsigned long freq = 0; unsigned int i; int ret; - if (!freq_tbl) - return -EINVAL; + if (core->has_opp_table) { + opp = dev_pm_opp_find_freq_ceil(core->dev, &freq); + if (IS_ERR(opp)) + return PTR_ERR(opp); + dev_pm_opp_put(opp); - freq = freq_tbl[freq_tbl_size - 1].freq; + ret = dev_pm_opp_set_rate(core->dev, freq); + if (ret) + return ret; + } for (i = 0; i < res->clks_num; i++) { - if (IS_V6(core)) { - ret = clk_set_rate(core->clks[i], freq); - if (ret) - goto err; - } - ret = clk_prepare_enable(core->clks[i]); if (ret) goto err; From patchwork Fri Feb 9 21:09:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 199090 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1132725dyd; Fri, 9 Feb 2024 13:11:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLw0TiaNMvbLDd9PXOYOVwmKa3pXqG4jOrZu4LUvMN/EfKRtE6Mrps7hdlor4fYdcjXgqX X-Received: by 2002:a05:6808:6391:b0:3bf:f01a:4822 with SMTP id ec17-20020a056808639100b003bff01a4822mr200261oib.28.1707513068119; Fri, 09 Feb 2024 13:11:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707513068; cv=pass; d=google.com; s=arc-20160816; b=gffS1Qinj+rLdKUJwYxSqaq+U6DlktS1NmHd4wySXFZrKDLXF0VTPSG2o6UKnFpHIu Efa2Bjw3aR+yQufxoGy9FaWgQ4ns80Hg5IwK/snVUkKrlDJVbXpIcL8i/ePgYWkhyQmQ An0/qHIbCqg97qVZ7inROX75NzfDEL/JjbzbcCbn411nedkc/GOqUjhPxwpbkCzl9Ag3 5WWEXM6GimU0HnO0xv44i4eJGcRSq4BTq2Vikp3M8hAwrc5hoa9071AtYARiVAtzPrBw hw/A3jC7pFlUI4/KFvI4Njv/LUth9JpUEZn+foPYVeT81Is7yvNwP0bfJ0N42/bzhXex 988A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=clU3y8fBgJIxt4Cy2lqLbmum74KaZZM8VM+LPgiv+vQ=; fh=PNqyaSyfGi8dQ0er/afbbvNFPRjsKPYcA028OnrJU5Q=; b=iashh38jbLnrbS6Ngqoc1JKC3G4wdUjzdqSQ4JuMvukYpFXFFSWNpK4m/fIgDbS++R 2sMH4ChihdvdWwvL43QbYUffKtPF9Il1jqNilorj2df7Rilpxaa40TcayGjgH+ZZivPR vr9Yj3PMLnSBNK5EnJdbociTonhWBZqdIE2r3I5PS0kiT0DNFfY7i5VRAh0xWpnA5nOo l+l0r/giGkHQXUUa6UNLJnHgVWdIk4pCjcDCjK2eeoznrvN7Pl2YziN6/KaT9Z8J4HRe H9+nt0xHBRo6JbpiiVOevpEgcgAJgq6okEuK2wbhlCSeXEdWtA2VOKGuhLHwo5YZiK1A Q6CQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o5t7eATv; 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-59986-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59986-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCXTVUDHVCHrs9dmVg9CszodWmtoRI4JrMyLHUhVGQj8LBAdUVdtQrjMIJMPADFEr3V8MygLYXu+BvDHJ11ecb2PmiMEEA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c21-20020ae9e215000000b007857fc561ddsi291084qkc.287.2024.02.09.13.11.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:11:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59986-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o5t7eATv; 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-59986-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59986-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 53C1F1C24756 for ; Fri, 9 Feb 2024 21:10:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68FC5374F1; Fri, 9 Feb 2024 21:09:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="o5t7eATv" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 7C82118053 for ; Fri, 9 Feb 2024 21:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512980; cv=none; b=jRmAEQgCfbsij3PaNy4JfJRP1YLNaQ3/VKW+C+3+HKHCyij3itSavkWcCndl9e0+mOC/mBw6nDBu2lSdsAizTXnwr4cysL4XltZzOg396dIcPBWDfg8kKY6i9JxcjN8WzySIbJEOrnN9ZE6wA470oouezbxPgzGgruSRiUsJtS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512980; c=relaxed/simple; bh=4x/me5yeOEh7Kc0NCGCe3k/ewNhk7l+PTAXEKLbJtdg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EzuOEN7nk/yd4mN/465hHAEwU6Xt34HO1JPGs0nYvQAgR++jg8uykcDiJGVqsjej9A8XzsuspdFRBzTQ5C/4NJiN8rYFcHICSTD7EUUc+GJiozD8bxsAkL1h3/33DoqJSMOHWzdEj8WE7mAQBC7JlJq2nazBoUxAQUUuFEW1fJQ= 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=o5t7eATv; arc=none smtp.client-ip=209.85.208.48 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-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-55a5e7fa471so1834362a12.1 for ; Fri, 09 Feb 2024 13:09:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707512977; x=1708117777; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=clU3y8fBgJIxt4Cy2lqLbmum74KaZZM8VM+LPgiv+vQ=; b=o5t7eATvxhaZ/XquO4eAgkoflYx7zKCyysY2K4KKlDhoDBxv5BkuMmVN0Nq/OP4iko t8vHpJa/uryZ879JOxl7p9O29lG+fvMSB32am8vrEJB5c1br0PfGvM2UUHiRl3XmMYR1 IJ0JCWkNLtf6AfMRDMhL8gR5lW0tRorZgE9IGEez4+0qnWjhIHLd+NI6dqSUJdGMLmvs wedzs0Ph5A/UO1pkYaTiElwv4sdR/nnTuWj1z1bKidcUerhhUMFoRagr5W9Pd7/JMz1m T3eEJkID6ssLHTV03uS3/RAVpquWD79IHiJia3ZRBZDGmAT19PbzzhlkxgO+o+RjYctt JUrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707512977; x=1708117777; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=clU3y8fBgJIxt4Cy2lqLbmum74KaZZM8VM+LPgiv+vQ=; b=HaFr8y7PPMcnry7MUbvLHhc2CAUnf8JKNDb7zh5Bk33FBei4PRB4rKbTwBkqxT3a5C Iruqk7sBrwZ7QR1CyyMWO0gKApIwFvZgDOssgUO1HW4rslsC6QYTScuqlE3oUTlg6+l2 YXLd4TSMy5EATpiXzBQ2Qe7Bt51BwLPziduZYm0om80dT29D45//YBjsCReftvK1N6nU 86Fv7Grfg8i7ii23cHLzpuM8NuWHihlT4Lmmuu3cMn7xkRLw447q2rdD/VqL/x3147sG i51peBIxDyDAswulT6jOB4cSiEPsTl59VKhXeTRZVBGXoB1hcyC4647OIugWJLKidiKe y9qw== X-Gm-Message-State: AOJu0YwZhQrqXXuuLr97ZVnDfPnt8Ry0Qi6XOyGXeo/ONC+1IMO+yrbj ZbkR5YDfm8BKgXTIPEL4XyTMLyBAXp01FBqbla1weqcdTxbBnIwVbyZcyybyBkg= X-Received: by 2002:a17:906:cf8b:b0:a30:8c7e:5f7e with SMTP id um11-20020a170906cf8b00b00a308c7e5f7emr180181ejb.28.1707512976771; Fri, 09 Feb 2024 13:09:36 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVwpQeaR0xOayGoUqOVl+6TXXrcArmTCNHHL34seMfomq81hBB0gbHB4UJ3DhbgmsHaCxbRpxYb9EiEQ94DeQXlgchLwv5IM0tzG2BNvpJwFHuZe19yFJfOGOA9fxuoDoh0+YJYomq99DAwc1hiplbcKYhvOcZw/8n/rpSRwZFOLF1Qj4VNL6tgvp5OX0CPqF6QYczqvoCocJfuk0OtOSbNkO1wqVQ62t3gB1eyDudxWqX3FDsKflAc5Iq1AU99q//UNQcHPJoRa1KLEtKY79aZ8zNVznmDoR0/D9J/VKUYxfna5N7xwvXVlnHHc61rNlYe25bG2VMc6jjbyAZQOyyE+sXXAavlKoxSJf5vAsSrdVDyIFTOaoE3Jod7OY78Lrhurg1xNHehtxEeOf4PS/iN+RgU4YJnQMakzhazxd4pPKe0YHlLC8Od8bHj3F9SfF3R2MJ8MpN8zhZo/wn/rAnXEx7fowRggbFLWdd0skbSiOzSmwrGz/xzbccj3+8LMD/7gw== Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id cw3-20020a170907160300b00a381ca0e589sm1108516ejd.22.2024.02.09.13.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:09:36 -0800 (PST) From: Konrad Dybcio Date: Fri, 09 Feb 2024 22:09:23 +0100 Subject: [PATCH v2 02/20] media: venus: pm_helpers: Rename core_clks_get to venus_clks_get Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230911-topic-mars-v2-2-fa090d7f1b91@linaro.org> References: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> In-Reply-To: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707512970; l=1211; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=4x/me5yeOEh7Kc0NCGCe3k/ewNhk7l+PTAXEKLbJtdg=; b=ojT8QqLG5zLEf1+mc3VVpVe+vhkE85IzgZfrLRyhsivN4LN1enTJW5ID6qrPtpAPMrWFc94yi 9tWKxMksMSJDcaEVmxPgDTMQOf+vw8phD5WN5zD3vaFz0N49gR0QlZL X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790457222956099034 X-GMAIL-MSGID: 1790457222956099034 "core" is used in multiple contexts when talking about Venus, rename the function to save on confusion. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/pm_helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 8bd0ce4ce69d..ac7c83404c6e 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -23,7 +23,7 @@ static bool legacy_binding; -static int core_clks_get(struct venus_core *core) +static int venus_clks_get(struct venus_core *core) { const struct venus_resources *res = core->res; struct device *dev = core->dev; @@ -294,7 +294,7 @@ static int core_get_v1(struct venus_core *core) { int ret; - ret = core_clks_get(core); + ret = venus_clks_get(core); if (ret) return ret; @@ -961,7 +961,7 @@ static int core_get_v4(struct venus_core *core) const struct venus_resources *res = core->res; int ret; - ret = core_clks_get(core); + ret = venus_clks_get(core); if (ret) return ret; From patchwork Fri Feb 9 21:09:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 199089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1132703dyd; Fri, 9 Feb 2024 13:11:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXy2YG53r0RbsH8ccpJc6tEZoU9LLGOVlU2L0uMmFt2AJO65zNEc6yJR7afVkC98A0XB85ElvtBdh9XzypyNNkWw7Wv1A== X-Google-Smtp-Source: AGHT+IE2qJof+7LDbeZ05YqmDjoIt2N5CVrBnjpHRFiqOgoYjKZdZjp+vtiw+lsI9Tmmo8VxnEIk X-Received: by 2002:a17:906:7f8a:b0:a38:4879:72f9 with SMTP id f10-20020a1709067f8a00b00a38487972f9mr216473ejr.24.1707513066522; Fri, 09 Feb 2024 13:11:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707513066; cv=pass; d=google.com; s=arc-20160816; b=AqxWsTL9QPKUTd2x160dMsjt+SRIQGFr3One/SnvuIqdg46czeMPJcqR/qsfOK+El8 xaLyUsnWvcT0Emqj9ArJGvo5px/ZuzRgpDPLJGBv7agnGpuUzh04OESQsTSNDdydNvjW NJUBGafphyXe/UZyZMXPEbz6TsdiE26ujxb+kxp6d/2NdoL1hkBwTNRqN294Wj6lXYPc +W6aLCijwSpEor9xOSDRN3Qx4cItWCUwNcsc8AcmH174O1W9sDIwvqa30RUhnq4IBNPz U8j/73gEtGdzFUFLO4ThpL+7Wd9wSP64pmwhHsZ3OKDPH3TOYuH/11UvWDsZX0SFge1h PfzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=3P4+a9/cIAslmQuzQjL8EtOxDSeXqHOG2MyxLu4mmL8=; fh=LdZGdRzPveMGChk7t0x6VU7cvywwuuBDAcjNmmGLuck=; b=SvJ+n5KchQHxiQh0ZPs3jnWx8cPkzkAbRRLNxHss/Vmz+FdMLSrTFFua+uH5JGiy/s PlfmWxIZcgn/w732T0QnpYG4LHK4It07OaLYaokuxv1+qWvUpfM/e5kGzonoSm3eBTe0 9VjgRVRHiO4vu5hYVV5N40GAveOew2x1/Jor6ndh+Bx2oUosZ2SLmEIepJkHsCFIjfkV y3hfApuu1o+2R/Ia/aliwoaNtSMxk+MIxn14u9AgYvgreJvmZsosTkye65rqpP5W7RNQ 38VWXkvvWpD48q3h+dgj/iBDzapANSj7r3X+RbTb7Xfg83VHmeE4TTkR7KGfATiQe4ws typA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qck5GOuR; 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-59987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59987-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCUWYY0mpaQ3bVtIL0AJmy0GINp5ySevWFC1Sdj/ldHc2CAR0PifRqDIqZydjEm41LVJ7Oi/1H78EkVhfovs1CXg71B/ng== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id by22-20020a170906a2d600b00a3549e68608si1153843ejb.664.2024.02.09.13.11.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:11:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59987-ouuuleilei=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=qck5GOuR; 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-59987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59987-ouuuleilei=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 F1E191F231B5 for ; Fri, 9 Feb 2024 21:11:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3237538DC9; Fri, 9 Feb 2024 21:09:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qck5GOuR" Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 17FF0210FB for ; Fri, 9 Feb 2024 21:09:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512981; cv=none; b=S+98Q83U2RLvB8UTcRr6n3XAfBvJbw4xcPav5eLKzbUUordm8i1+Y2n+PVOzV4mAQsHh83kji6fT6tGZJdkidO1muL9CACxFWeWAW8jXVvjU7a/lwH6RxwKvqcMQf4PYO9Xoe5jaMvMeqIQecA1dFX21/+WnPrYhjKPs5Evzqz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512981; c=relaxed/simple; bh=qRFNx2a0sPyBufJHjBf1XzrjeKK7bQ1fasBPqhqnRAw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZtZNO0XnbmeEUkVP0mNJ9eV/lGf+h2WUJMoD/7pEwTrkPCgTJi2sY1UAIStkv/rK5JzyJ7EA3cs/xuDQGWI8jGcxtqLJvrsbqmhsdYrAbOSgQrgNugRJ2vl2/liZ5fVESOgLN6MdZn1zympcYnQcYWc60SGupv701OLl/WoqyvI= 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=qck5GOuR; arc=none smtp.client-ip=209.85.208.51 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-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-55790581457so2230022a12.3 for ; Fri, 09 Feb 2024 13:09:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707512978; x=1708117778; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3P4+a9/cIAslmQuzQjL8EtOxDSeXqHOG2MyxLu4mmL8=; b=qck5GOuR3v7ACRXwSkYFZmK0ooW94HNt19ZXEcbR9rpLxxIsU6openJ5OAZmwKmUy7 EicuUxMbLFCrpxukRK1MzQ/Xe73ActwdGTjb4tfvq+WHndyLOzE/PtgxWYYsLNiEu+Mz +xrnCgajQqf3otVi/hQc9KFzGY2u00mmE3gCU8dxAx2ZwlrJH3sTn+9u+mUANwGcdm1t 6k8sFAxzk6yvNJpE01YlkLRKesVrt7CkzLDdCrwqgdQzoMfTG/Ki86PxD26yCjrRGgCO Me28FHibNM/dtNAWEdnO67vPrYVvkdbejaIHTyI2aFvud74uCK3mDNgqIYjEMIjc9/ps 9dBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707512978; x=1708117778; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3P4+a9/cIAslmQuzQjL8EtOxDSeXqHOG2MyxLu4mmL8=; b=HO291gcr3SY4ZxaLc+jpbpo7dM+A6+y0/VOPmU4taAFY7D5IY/iivhjEzyFcJKLFmd ypFLPmyTzCkm0IglwWjDGzfzdeWNfFbW2eaG7s+LjkCbuLREKsYrV+EKDRU7OVsmjiZE AYPfrfiw6FtfqwcSothGLuzKQ1yJJoCwJD/SVjCSiDWCLNsPTCFieHGyUF5CqhNL+8k1 EMbbHGEBT/EmAhtigCDid7tf9WONS7e/IHDl3X8DncUD/aeBSPuPAruT5yBUXc6FmpjK uOxA1XCPdXlUYKwzy9xj+nsODZ0j57lNnAnWjZ7WDfEgILnYsyJcEt+QupmFXQT0lkwl ZQng== X-Forwarded-Encrypted: i=1; AJvYcCX0CZpJxMrRSgBndfC3kb3JVyeXX3WMI5dHq9yMwf81UDh8TtXWx0r/VmCj3I52n4cx5XGaHk4oIfnyTjjsIYdwUGxTQi+Kf8qS/7a7 X-Gm-Message-State: AOJu0YwVF3FcEBeloSYz0mZehsniM0+uZRqVywVxUHAzPb0wvVEN/BE7 MhdYfKpd4zzTbXOtgwrxz782mBXn33WPgimXhKCsV3F2hl3KTZ/b5ta8wW2l664= X-Received: by 2002:a17:906:6d58:b0:a38:625d:8427 with SMTP id a24-20020a1709066d5800b00a38625d8427mr194776ejt.48.1707512978318; Fri, 09 Feb 2024 13:09:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWJzBiZ/TTNm2w+OuWjm83uhJhHA8Ipd+Wffmn6LnhvoVFE5HgaYuovGQ7mgVPPQR6P1xwM2+1PD59mUIS3eQvlefBk9G49se6W4Q3UAolQolIOI6nmOUiNfa1kw8dTh5xzKefk0zqR0kxlc+e5/KjUt/dKg0kqlWiFJ+CQG1xUMoJTKBTjzQZGjIAFNPDNvXSYAXHjo/azPZqHnZ8RJyzqNaKxAXuYPnubrhXx4Hv7Kr7FTNDaW34o1GniGbRPxkINOYeAW4wup9v2MO/PggIqaVTB69j5eAGECWj9NRPC9tSlPJEDODScssRtKDdzX4BBovewQvp3aNc0sGF54XeSyUe9wK2/TwNECPz+BSzSRnPaFlO5Fqwn7F2Eo0ihUszZ+m+9LQPJ9GQEYgD3bfbmJnIYxwxJ+fWPH6H1/JCzQCevpphR7dVb8rvNVNRvcMmWGixA91o3OTn/OwlZnnIERZw2fEQsTxTsUfkxPYisnOkKdHQgs8o3CxXzgVRVqN1PRQ== Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id cw3-20020a170907160300b00a381ca0e589sm1108516ejd.22.2024.02.09.13.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:09:37 -0800 (PST) From: Konrad Dybcio Date: Fri, 09 Feb 2024 22:09:24 +0100 Subject: [PATCH v2 03/20] media: venus: pm_helpers: Add kerneldoc to venus_clks_get() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230911-topic-mars-v2-3-fa090d7f1b91@linaro.org> References: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> In-Reply-To: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707512970; l=2105; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=qRFNx2a0sPyBufJHjBf1XzrjeKK7bQ1fasBPqhqnRAw=; b=ORx9bBusFVmbADK2rWtJUBcEaMKTPSaBtKJ/kovOv2DR5ZDBMzKXGN3q535RixmDVP9TEYxBo QkrgBcRH+GvD4lqAuzRy1vs/VU0i6gr+kYkXU9uaWRAASqggGyt6wIR X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790457221646667803 X-GMAIL-MSGID: 1790457221646667803 To make it easier to understand the various clock requirements within this driver, add kerneldoc to venus_clk_get() explaining the fluff. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/pm_helpers.c | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index ac7c83404c6e..ea0a7d4601e2 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -23,6 +23,34 @@ static bool legacy_binding; +/** + * venus_clks_get() - Get Venus clocks that are not bound to a vcodec + * @core: A pointer to the venus core resource + * + * The Venus block (depending on the generation) can be split into a couple + * of clock domains: one for "main logic" and one for each video core (0-2pcs). + * + * MSM8916 (and possibly other HFIv1 users) only feature the "main logic" + * domain, so this function is the only kind if clk_get necessary there. + * + * MSM8996 (and other HFIv3 users) feature two video cores, with core0 being + * statically proclaimed a decoder and core1 an encoder, with both having + * their own clock domains. + * + * SDM845 features two video cores, each one of which may or may not be + * subdivided into 2 enc/dec threads. + * + * Other SoCs either feature a single video core (with its own clock domain) + * or 1 video core and 1 CVP (Computer Vision Processor) core. In both cases + * we treat it the same (CVP only happens to live near-by Venus on the SoC). + * + * Due to unfortunate developments in the past, we have to support bindings + * (MSM8996, SDM660, SDM845) that require specifying the clocks and + * power-domains associated with a video core domain in a bogus subnode, + * which means that additional fluff is necessary.. + * + * Return: 0 on success, negative errno on failure. + */ static int venus_clks_get(struct venus_core *core) { const struct venus_resources *res = core->res; From patchwork Fri Feb 9 21:09:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 199091 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1133276dyd; Fri, 9 Feb 2024 13:12:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXF5wmc2Ikz21AOKF/zsiQv0lp9dd59rjTip/suEG4rp+fV5LbkfnhvX6pcL2TUMi62Bq790M/ZV8zaGEKu4px3O+KTVg== X-Google-Smtp-Source: AGHT+IGWoimZr3YFJmLDDHmtvRGM/AhSlkBS9vLuATwhbtO6x8b42xE4B+VzY0Af1hM/XB4LxzHv X-Received: by 2002:a05:6a21:9102:b0:19c:a7e5:37cc with SMTP id tn2-20020a056a21910200b0019ca7e537ccmr402848pzb.41.1707513132842; Fri, 09 Feb 2024 13:12:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707513132; cv=pass; d=google.com; s=arc-20160816; b=IGFTzPvut+cngxspRo1fTHVN3BDJwn4N0vTpMh+f6q3GygwA6npE+Kb1AzaGKziHhV s0lmyRqXJp54Hl1QKTbLuRYalzGn+lEedkPDiEPHtlbEBjvplnwOu6RxgGEPg1k0Y4DP xuz+bV5z0FbhjgwOxMdP2kOMslJGE9NXAeGxG3vmPAON6FzyNjIYpRQhsaad1aXBbHxa ELfKz0HO5yzvjsWk6voYDN0P0Nlkv3EbDsH7maBx+WpsteryX4O5Q0yEOUNFAxUr/G2w eZ3ob2Bb7vWaQqi3q/gsgUvOIfpmjiRP9Gi4lYkGWhjCkGb70aVCCjSpxWLzt6u0hwMj MUhg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=zHqRSPmMg9wEwP3rMANc1kfU5BrHC67r5uXE7Pbrcfw=; fh=eaGEapdwiobD6CtwUoxg2WWtMW/XeJwWBnOeUwmquF8=; b=URSWmuJNO86T/KjR1FdWeoRlWF8+AnnPc2QCA4X7JErdQXx2Eq1iKK0WF1K+tfUf5X k8FM6+7bZtmq6pqV81vduZuHZbOKD5E7J9MBeRtyoudlVow4DB84dIoXPnfOFneSl9P+ dFB2JcLmEbp0MyTzdGcoVFRbEHQgemDZ7IBbO/VyqdACS6GH5icIm5JYQkQBqWTjckWV j73wf8RYbB3ELCQXStft70HKcc8BhT1fFC2MOFPjVLm5AO0XnycGaFCiTD/8nlZ1MR1U bnKhssv4nBnebXT3gb3MzbTsgVteNT9jMY/KZ2daxCdjdHaZPDi4yed1u1+yhrcCkPO+ 1JSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FjuCx022; 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-59988-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59988-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCUU0F9ZNApo4WyFxKrRhPTKWZVZrzrJL8mFnCtr/fFlb/D5gC/u4UwDkzWhFIF/z8WdtV7EkCB4NQ2pvLUEbuhry26QjA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id du17-20020a056a002b5100b006de1e26adb5si874721pfb.275.2024.02.09.13.12.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:12:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59988-ouuuleilei=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=@linaro.org header.s=google header.b=FjuCx022; 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-59988-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59988-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A88B28C334 for ; Fri, 9 Feb 2024 21:11:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEF9C38F9B; Fri, 9 Feb 2024 21:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FjuCx022" Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 A78F62E63C for ; Fri, 9 Feb 2024 21:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512983; cv=none; b=kvFULBJQqPk/+OmBO11hoZbwVtmtATZ9PaGxT63sO3qijXpkwmMpr/o3QgQWaaaAfJS4KnBIn4b+Lyl74kFFhjyl9p68nn3q/0rEzYNN1DegVaWFS+q3YIdpwDc5VfXtxzH2JhmFB/47z7BsCZv+rGbrLeI7Uv3qqF9xv4UoJ3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512983; c=relaxed/simple; bh=y2JWZvHJdVFdS2JPzFc6K4lM3ffIwu7LSCAQM8cYwps=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YQCjuoR+VhchyAY8OkQG4ntOaJww1dSPkpYpmQeO0lfITpX0YMpInNQeZtlSa/45j3di126/0+SyXaXjC8oHGzIT1iiyrYdXkqcxa1MI0PG56snR4BlzonUWBniOrha27dj+tDdp5wUxwe5eVyZ0Lwuk5ujAisbphK/vpWEkH5Y= 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=FjuCx022; arc=none smtp.client-ip=209.85.167.47 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-lf1-f47.google.com with SMTP id 2adb3069b0e04-5116b540163so2025903e87.1 for ; Fri, 09 Feb 2024 13:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707512980; x=1708117780; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zHqRSPmMg9wEwP3rMANc1kfU5BrHC67r5uXE7Pbrcfw=; b=FjuCx0222QC2Z6NQf1NFj3A4yr/d/F6bPDQlORaxbthOvgxkjBwPxjNJAcLPrzic7m rCHVGiGyhRpnaaibWofHYhwbvIgZEkdxZ/VhdjVY+3zxGV0wdgYk6Qaw/G79/RbNCMGw LNwX0zfXOYjhfiz5hC354fbjR+7ooG1SQxLF2c2rgIvid3JGhv1WJKYlVcQbQzMlMazI APfAnHCtAf3r9Dq51tcEltbogOi3hnN9u81pgs3al3GLqSoA1k8fPrMXQRlx3cusbNLJ yl28ekJnCic1PXyuT563wR6MZUKHXPBdjvj7qENTFcwMAcM3Vier1PbTOMGFUH4npW/z YrRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707512980; x=1708117780; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zHqRSPmMg9wEwP3rMANc1kfU5BrHC67r5uXE7Pbrcfw=; b=v9o+p2UWwUrCLCkFuOk+fmwxBNhdcOeqtRD/F51sbL96DYq6pnyqU2jWt+LVNmBxRX 1ZwhwFrCCvBfRV6ARZmt0fhYZFg3alxbZrLd/SZrgFzBgUG+/rAKRREY7ly1w+1QO81A OsZV3XXNAFKrX4Kc426GVeZaCL5ALs+UxTpMc4Xup9gguOEoxAB4tGdvrBQHGJwXp3LM wLfLv29SPi0MsnMEJhNw62rC1oJHMttLOfyZanKehSLz8RydRdsKcp19rtO0R3pf4aYX SXFwF5IFgVkbp7hOWGd/ixp1VGHEazSqG1ES1kn3YujlxW/jLw8QTA6jnJGYY3vmpMNu 4fCA== X-Forwarded-Encrypted: i=1; AJvYcCUT75Tm818QttBAWqTxgSz1igkkOFTliVVlHCz++jyQXRVOiHhmdzJAChI3d8ek7slbzq+cPb16n0OdL6N/aBJ+VrMA9sRlk1jvcs/f X-Gm-Message-State: AOJu0YyJOstzSeiEIRpcvuIZiOZEM0MKu0k/97ySZZwQX20/Xo8QatVY hkUQsWDfJgowV+sS928Jeaq/SzvdSYOLvHG43QGXHtFeb0ApMTlpv/qTvgZAalo= X-Received: by 2002:a05:6512:308e:b0:510:a0b:52e3 with SMTP id z14-20020a056512308e00b005100a0b52e3mr108452lfd.68.1707512979829; Fri, 09 Feb 2024 13:09:39 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVaRJINx/8wiN+GpFD3aVObJUom5I8zUiQqvAZ4XJQpGDoIz6sch5lV5joqsjlqVv83S5JlLbOAxLQCxaFkw2ZxAFRVF8SB3ysXQtTrLJorjZ+PPC0Ch2pevqTg/7mgq6H+YSEjJyMdJwc5PzCz1BG7eWwsGjZqKa0IB2V2hV1b26TeZpnen3vjkMvrUioBQgSGYMnuOznmVY7tgZLCkGM5hQihH+HoHgPx2jGZPnlrgO0BNsoyI5JOOrhfRvC/E6As1K6inCIsRm+yWvlVg9jUJLxcFoTCHPueZDZutrj5aR3EY9jg0ynLjYkr73QKVhrm7jkA4sBto1i2KP+7F59wWc6Jbi7OqdKQG1rnCXWwLfDNHlUemKxT15AmgEHTkijGEwIhni19Es/8qLXrGNRjbDP0Gy8n4oJCAJYRDXqGOlUy61CkNMX6Um188tMvY7WWSzhp9HSIQYPaHZhYnBikQzl8gE/cTqMXzwKkS5+g8m8ryKvzCRGsfu/+MiWmEkTGww== Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id cw3-20020a170907160300b00a381ca0e589sm1108516ejd.22.2024.02.09.13.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:09:39 -0800 (PST) From: Konrad Dybcio Date: Fri, 09 Feb 2024 22:09:25 +0100 Subject: [PATCH v2 04/20] media: venus: core: Set OPP clkname in a common code path Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230911-topic-mars-v2-4-fa090d7f1b91@linaro.org> References: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> In-Reply-To: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707512970; l=2649; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=y2JWZvHJdVFdS2JPzFc6K4lM3ffIwu7LSCAQM8cYwps=; b=vqxjZLB2wKoZeA1sqxtFieFX/lmXor7OSCMGzaJ/ZLT8fJHwP+eUBcMnhStwX1NiWW8JecbfT V8HD/gEQuZKBNG5ojniHgOZ7IHd4sYDc3uhnMC5Um+DOPnB1f68hOqQ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790457290998194855 X-GMAIL-MSGID: 1790457290998194855 Calling devm_pm_opp_set_clkname() is repeated for all HFI versions in pm_ops->core_power. Move it to the common codepath. This also lets us get rid of core_get_v1. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 5 +++++ drivers/media/platform/qcom/venus/pm_helpers.c | 23 ++--------------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index ce206b709754..5ab3c414ec0f 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -319,6 +320,10 @@ static int venus_probe(struct platform_device *pdev) if (!core->pm_ops) return -ENODEV; + ret = devm_pm_opp_set_clkname(dev, "core"); + if (ret) + return ret; + if (core->pm_ops->core_get) { ret = core->pm_ops->core_get(core); if (ret) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index ea0a7d4601e2..1ba65345a5e2 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -318,21 +318,6 @@ static int load_scale_v1(struct venus_inst *inst) return ret; } -static int core_get_v1(struct venus_core *core) -{ - int ret; - - ret = venus_clks_get(core); - if (ret) - return ret; - - ret = devm_pm_opp_set_clkname(core->dev, "core"); - if (ret) - return ret; - - return 0; -} - static void core_put_v1(struct venus_core *core) { } @@ -350,7 +335,7 @@ static int core_power_v1(struct venus_core *core, int on) } static const struct venus_pm_ops pm_ops_v1 = { - .core_get = core_get_v1, + .core_get = venus_clks_get, .core_put = core_put_v1, .core_power = core_power_v1, .load_scale = load_scale_v1, @@ -423,7 +408,7 @@ static int venc_power_v3(struct device *dev, int on) } static const struct venus_pm_ops pm_ops_v3 = { - .core_get = core_get_v1, + .core_get = venus_clks_get, .core_put = core_put_v1, .core_power = core_power_v1, .vdec_get = vdec_get_v3, @@ -1013,10 +998,6 @@ static int core_get_v4(struct venus_core *core) if (legacy_binding) return 0; - ret = devm_pm_opp_set_clkname(dev, "core"); - if (ret) - return ret; - ret = vcodec_domains_get(core); if (ret) return ret; From patchwork Fri Feb 9 21:09:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 199092 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1133323dyd; Fri, 9 Feb 2024 13:12:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX5bTJ4a9k7zJpVLOOgRpwcudXEgO9QuX1CNifS+opEWcan3ksMB5MBnWe68l0tcBZ8IQgB5wUWbdZHj741SxCQ5Hf0mg== X-Google-Smtp-Source: AGHT+IFZ9h8IoL0HPhHLYoS8uPZkQIXm8/JIAIH8oMIC3B5JajEd+TqA9QkU5IW1wUttX0kWVmri X-Received: by 2002:a05:6a21:3401:b0:19e:a9c2:e0cb with SMTP id yn1-20020a056a21340100b0019ea9c2e0cbmr324063pzb.25.1707513137759; Fri, 09 Feb 2024 13:12:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV3sReSjF3lF8jmxbcJsyvTvZO1Ye0hVpwLs8vNaXWmmUvJN3ROUl8SHdWHIH0yFDzAqvyMrQpKl/VshKyLJtuTzkfcKg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lo17-20020a056a003d1100b006e054a1fda5si930678pfb.98.2024.02.09.13.12.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:12:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59989-ouuuleilei=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=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jeQTS7zH; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-59989-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59989-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6894A28C453 for ; Fri, 9 Feb 2024 21:11:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4E2F38FB9; Fri, 9 Feb 2024 21:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jeQTS7zH" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 243E53715E for ; Fri, 9 Feb 2024 21:09:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512984; cv=none; b=PghDS0gS7goCJgWfjbak2m976nF8FuAhrgIAeomRBRaVBeA9phYA8/7d0+jxfCTXrlCzKaO77QgP9+9eUavKPltDjFGQuwmll6rdT7ddYCx5uSvpUwrEm5Gko0n9Av0KKLDZ1GqQGZKQlZyE6wgQGFDaAtm6WF1zVnHvL8C0hGI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512984; c=relaxed/simple; bh=3dtrntbOogwjknLFZqca+wBqcS9QWbQOd9iEEJQfOvA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=K4xie+nhftRiqFkOn8CCWBLOgOxvYeNdKPGBKmxSn+edW2iCQJutvlTLk7FwTrk89Mbjc87vjGpFZlKm2X+9SX+M0jxwJ+LuEC1F0MnBXgVu4I12cF+ICgh7wBkNxg1sdjQIG6vNhoOZuQuGpc//xLFQn56HwlxCcyCOa0bvSCA= 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=jeQTS7zH; arc=none smtp.client-ip=209.85.218.47 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-ej1-f47.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso203924166b.2 for ; Fri, 09 Feb 2024 13:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707512981; x=1708117781; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AK+SsOpDJXwjdmEkPZAy2mx09ivoS/IARlVKsNVFoYA=; b=jeQTS7zHWPv38FopjG+9xEU7NXUJTRnWiMmMtBlWShKAwVVWJo/v+f5OG+u6zr0PNv AKI0SiJnfQEDHSizuZNKZmgVUnUPKObzI1Lj+n04LfAtQVLL85H/d4jNIJxNM+M7gWsj nOpN/5kbUpnUGG2/ZBJmC7g+ecKXbXHp0jbQ5mkPR6/QzJl/cOeCl2CS/cz1XVoien/M nuihrMoR3wUQt+MHZaBys3hZR+83Z8DS1zc9pZm9AdA4/PCQsaYzhPm6tQwouYnEyeUX fVL7xU9gbGft5RsqZaYKzPjRRZFqrKtxuiHkPbw/1x+VCAJIi3RVpxWrLgjnzwe7UdQM GYrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707512981; x=1708117781; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AK+SsOpDJXwjdmEkPZAy2mx09ivoS/IARlVKsNVFoYA=; b=H0RpnEHZbqyrksD/ajeIce/xwKGorpi0sIWidjpJvm8BLkomI4XW7ZRUi4bERjFSZY VEy8/vXb/W7VApo82sErozGeFA1gsdCEbVFLNySwBFYIZLtAbShnHczENqIaxapQEZYw jllh788+r4swIV/PER12X2prNaddgMdZ6Fd8ssKyAAEyxEPLkO4894g5xukyRYx7/F6T 781aEr2w4a1dQKRmlThl679d98OBInMi9KHLyDrPlUT9LkmlYmJ50i9CReFETTZLij6U uANTJz7weZBHz9dT55gwUSyeiifQoGQkq2bCr2NQmpZzA1dK4pAoIcykPIbG98sBo1bz mSFg== X-Forwarded-Encrypted: i=1; AJvYcCW5Q2EQHafIkHjAvg1GWkq+OhWC36uQvnSMI2Wz2cUXVfvO7VM7K1MUpRd9Rp64tsFivI8ulU68MVGsRLMT6kkLAvQXI5PAkzO57z9R X-Gm-Message-State: AOJu0Ywm+WGN3ff80I529POjWOu6pbIRwxTmfm6Ot14ZnNUGI3n+r2jC poItrBjkGsdYsjiFt0FYZYESpAeHYh5n1Em4vQJM4O2mFhpiU/CM5bPNazKGWLU= X-Received: by 2002:a17:906:f857:b0:a38:9623:7d42 with SMTP id ks23-20020a170906f85700b00a3896237d42mr241809ejb.14.1707512981437; Fri, 09 Feb 2024 13:09:41 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXeIK/Uo211/Ztmg10f505GpkvgNc6F3KNIEaUOa0+sXCI7QQmSxzjhJFx9UQGPCy1O0Xktwt4Fyzk/RtnrcP9r23Pm6NR3QFVAqEeTtIOfYRaGUbJdLRJbGKSbBLNhdMJDeP2iOR8k8Vx4ivqHcil67j79CS18mt9hv9aYP71EK9dviZd67QkyUzdbrXVRxWXf/YkMmUdAHAogG8rk9LwfpbaIaBudwp/taafrz11AIRiI2tw2w/yhCUg58t9PjW5q+CFyIsmtj3y3j9mdh1O5SGhRMcCS74uhg26sxf+agKV4PoRx2Hwoz55ovDAJtxmLcFjySYdy9PpPVsddz255uoWvCu2YFqtLqgraCKx2Y3s2UB0zhGOVU4s9MhXIYXuq820KUvVeR1qe26P4/TCtoHOxeeIbOl6+i6wf83iD9YZgBtyMKvuNkMDlP+sF8+tQ42kag397A9OlLkT0p2dlOr0YMIsbDbsJTlTfLqOJPx8vdo3NIwTVMxvUlYLtOnwPSA== Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id cw3-20020a170907160300b00a381ca0e589sm1108516ejd.22.2024.02.09.13.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:09:41 -0800 (PST) From: Konrad Dybcio Date: Fri, 09 Feb 2024 22:09:26 +0100 Subject: [PATCH v2 05/20] media: venus: pm_helpers: Kill dead code Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20230911-topic-mars-v2-5-fa090d7f1b91@linaro.org> References: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> In-Reply-To: <20230911-topic-mars-v2-0-fa090d7f1b91@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707512970; l=1555; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=3dtrntbOogwjknLFZqca+wBqcS9QWbQOd9iEEJQfOvA=; b=MvZNyCayLpQ1eIqz3XUVZ9mwJU8luMw6v0iR3z8H9iZIfFa4j1t1dj3qCHyw62OM9lh70rmwU PItjvQKkgcIAaCHrnrwcrpNj9Syd5Oj0llgBrrzy7OK6uSJYxEJ2d/k X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790457296130853992 X-GMAIL-MSGID: 1790457296130853992 A situation like: if (!foo) goto bar; for (i = 0; i < foo; i++) ...1... bar: ...2... is totally identical to: for (i = 0; i < 0; i++) // === if (0) ...1... ..2... Get rid of such boilerplate. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/pm_helpers.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 1ba65345a5e2..7193075e8c04 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -878,14 +878,10 @@ static int vcodec_domains_get(struct venus_core *core) .pd_flags = PD_FLAG_NO_DEV_LINK, }; - if (!res->vcodec_pmdomains_num) - goto skip_pmdomains; - ret = dev_pm_domain_attach_list(dev, &vcodec_data, &core->pmdomains); if (ret < 0) return ret; -skip_pmdomains: if (!core->res->opp_pmdomain) return 0; @@ -928,9 +924,6 @@ static int core_resets_reset(struct venus_core *core) unsigned int i; int ret; - if (!res->resets_num) - return 0; - for (i = 0; i < res->resets_num; i++) { ret = reset_control_assert(core->resets[i]); if (ret) @@ -953,9 +946,6 @@ static int core_resets_get(struct venus_core *core) unsigned int i; int ret; - if (!res->resets_num) - return 0; - for (i = 0; i < res->resets_num; i++) { core->resets[i] = devm_reset_control_get_exclusive(dev, res->resets[i]);