Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp225749lqo; Wed, 27 Mar 2024 11:11:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCqR0sin5gbkfv+ZXZs56qP4KefGXlo/e5jGz5RCPIevRJIfRemSa08PeSy7x65rZJes1FfzoUxaVfJlxXppnlmiNBTyJZ+nsEqkfb5w== X-Google-Smtp-Source: AGHT+IG/M0jQNKRhtly+mbLiiGK6VuSkA5c7ZqAxf0Tl/lkVT/4aPhuCCbqHbue2AuHnv6Rjj1Fh X-Received: by 2002:a05:6214:4109:b0:696:aec0:af2e with SMTP id kc9-20020a056214410900b00696aec0af2emr348316qvb.30.1711563091568; Wed, 27 Mar 2024 11:11:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711563091; cv=pass; d=google.com; s=arc-20160816; b=hc6Dg029E0r3FB3RrbuoKKXx5r+DOCxq2HclM9cUvWDTpNAZ2nRjE7uZv2J7dFySQJ WauX4xg7Gug1k6C8uWU3poIuQruuxEmpTS3D6a7IRetMliiC33vyE0StTZtJS9a+f3qJ a8fQu5T9pcnTOyNFCNEhZrxurpfpZO8mMP4OdKckFU9aouiVT6C3/gOSJNp2asmVZwY6 7MX4Ri0Owdpk2Ly2VwMc1jesoFekOTygNJrFwOO9LxMYBLX1+EQ2yPvAH6FIv8ZZi+eU Yo29hrAeiDUD43WsWeC6DiD8jBkA6qoVJDgbxmjz1mRWGk5ht2DTCiWWH+fgmL6/sRDg UuNw== 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=+RKGFKd/nh2wuvJYyEzPyLuatA0djI0PTARmRoGHA9E=; fh=m3GAio2jghUvsYM2gL7q7QfVM1p+zLSu0qEZa+AWYCo=; b=rtwxyQN+aibjuz3pVDxFAuSiaeWbDgumFWjmfIFx+NWXi8eDpMG4btWpCVQUHuvK8t 7ymlLs2gwLd9VB1+fVTgkBoszRNCSOA5jxBt0KSrKtrQ65Mg+TqJ1AIltBWlKd3Ggomx gLqz+DQPPLtYvS5KQ7iFWr5GyqBbyjnefNA/A9U9WUhuXcxS3NU6EMdaMbkj5l5rr8yl UUY4Srhj1YmQaEU45DrNCIrKLoWy0sSsXvmPiIUjkHTl7w9dT/nvgsKJQLUVsFYePMM+ eUnKJh0mwmPjACtGCD3tg4w2zKpGT51zYThbBNucQKlw3ipT+JDKjJnXGICdix6YJun5 2/0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W+BBciU/"; 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-121794-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q11-20020a05621419eb00b00696b1f7cb35si1044500qvc.320.2024.03.27.11.11.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:11:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121794-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W+BBciU/"; 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-121794-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121794-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3F3F51C32D24 for ; Wed, 27 Mar 2024 18:11:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B27A152DE9; Wed, 27 Mar 2024 18:09:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W+BBciU/" Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 45C2C152525 for ; Wed, 27 Mar 2024 18:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711562944; cv=none; b=XyAkwT2qYsksUoV8Ij4CsfgTVvUdPHmaoI6ZQyv0/+xTLaroaE2VS6BsAaaqetu+EZfy1j5rRRpQwOEh5ZvVJch1DC/mQk63UoKrFO4j4uQ0L/90yMhAr0OSc72/jAOMoa3uwegoJmQWUlVWViil5uRCwoKEwPu7HT0dJAroetA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711562944; c=relaxed/simple; bh=9GQzIJs6byPQfUBP/1zw0u8rZrLZ3CXA+a/XNH00r2M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mcFTNwXl4rctpNRYPP0uFVTi6RqqNdBhchSVQbRvuk6VUP38Ng8KK5At1QQEgJQhtspQvps60vLfgYNjysH0Qyec5nK3cB70WWrcYSIaqjDdVzk4mw482UEp0Xo7sD/UumxSufrsxGaduwB6qkcxEiQDbSkzMp8bpSz3tvESomY= 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=W+BBciU/; arc=none smtp.client-ip=209.85.208.45 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-f45.google.com with SMTP id 4fb4d7f45d1cf-565c6cf4819so1998783a12.1 for ; Wed, 27 Mar 2024 11:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711562940; x=1712167740; 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=+RKGFKd/nh2wuvJYyEzPyLuatA0djI0PTARmRoGHA9E=; b=W+BBciU/ulYc9YXgbtc5+pURAjbXRRFaXRrWb7ux5os5AkjlW6Aim4YvEGtRuKzDU9 uy3IMhiAzEv7LMXMAFHddDZ0fk6tS3TVk+p++TqSFPymboj1Y8q3O3/rwCThI4zCuUK4 p815Q0wHYjunXgg+9lQirn4XpE5j1LcRjg26mewAA7hqD/X7rLl5VXxkpr1tthP3QBQp LONR2B4rxYR4EWEA0gFhX8U28wV0/nHbAAF4HBjGoeeMUTvoogw3Ia4/Uq/sS4Qc7xJF diXOPFhUuy2iuIG0xpmFVM48lXGb8FBD+RkWXYfVwY7e4Udv1fUwepS5+4G9tPN2rWib LPWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711562940; x=1712167740; 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=+RKGFKd/nh2wuvJYyEzPyLuatA0djI0PTARmRoGHA9E=; b=wlzjUICZpN5b+mzdjO0QqT1r4V2ok7smQXgFuTRxAjOK5ykdwF5qE3o0xG1YbEp9bl NroR9cx33tJVwbVltnwkavBiaE39eYSRtdhmS+xhjGLpvVxvPaWZfR1GxxvUACmWZgMT Jz0z/EfyV2MpmPqXMlCWzxvtvjJyHbrPC/qmOPaSMXTd45tBasi0AZVjn3ZNh+PmD4rh HXzcvcCswdyOQ+BG3nulevEkPA3AuMcdAJkRifxf1Ll3SEP8MALRV2iSGia70u/yvVnn PYxLVedjcmrc6Zxh+/P1+mnb2QSlC9h7S2Q/C7qVZ5bMOTEkiLl6PTjSeL+XshzAWMDV xG3A== X-Forwarded-Encrypted: i=1; AJvYcCVI992VUNMr6vLGOd4Fvf3RhQlixjdmPAVgAxLYIDrUBzqKE4riNyzcXaTBKxOxz2ma8xs5j3dDCBLfoQzVMTUUk8rImTdwD9dJ8oLC X-Gm-Message-State: AOJu0Yxl/CgJwWNUVAK14Bmczse+MpImhiAz5BweySworB2qTxi9fbez ZVvRInw8iEbN6OaraRnZ7fkO0I4EWzzB855q/FxHKtmGYchgZR5Abh+k+Aro9W8= X-Received: by 2002:a17:907:7dab:b0:a46:87bc:6f95 with SMTP id oz43-20020a1709077dab00b00a4687bc6f95mr41973ejc.20.1711562940775; Wed, 27 Mar 2024 11:09:00 -0700 (PDT) Received: from [192.168.92.47] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id z2-20020a1709060be200b00a45f2dc6795sm5702733ejg.137.2024.03.27.11.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:09:00 -0700 (PDT) From: Konrad Dybcio Date: Wed, 27 Mar 2024 19:08:46 +0100 Subject: [PATCH v3 08/19] media: venus: core: Get rid of vcodec_num Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230911-topic-mars-v3-8-79f23b81c261@linaro.org> References: <20230911-topic-mars-v3-0-79f23b81c261@linaro.org> In-Reply-To: <20230911-topic-mars-v3-0-79f23b81c261@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=1711562924; l=3452; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=9GQzIJs6byPQfUBP/1zw0u8rZrLZ3CXA+a/XNH00r2M=; b=2wczzaBnZhVoe2Wd/KIeFXeXGdfSdJYsCfKZM4wWQADLgdzHlap80f/liwqeNFPnLggf6EWeG 2Cg51BSWGKfAm1heyYTNL5FvruHn+hijThaXHCtmLys3DHA0erj00XY X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= That field was only introduced to differentiate between the legacy and non-legacy SDM845 binding. Get rid of it. Reviewed-by: Bryan O'Donoghue Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/core.c | 5 ----- drivers/media/platform/qcom/venus/core.h | 1 - drivers/media/platform/qcom/venus/pm_helpers.c | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 5e7cb54e6088..26a0c264685a 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -651,7 +651,6 @@ static const struct venus_resources sdm660_res = { .vcodec0_clks = { "vcodec0_core" }, .vcodec1_clks = { "vcodec0_core" }, .vcodec_clks_num = 1, - .vcodec_num = 1, .max_load = 1036800, .hfi_version = HFI_VERSION_3XX, .vmem_id = VIDC_RESOURCE_NONE, @@ -725,7 +724,6 @@ static const struct venus_resources sdm845_res_v2 = { .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0", "vcodec1" }, .vcodec_pmdomains_num = 3, .opp_pmdomain = pd_names_cx, - .vcodec_num = 2, .max_load = 3110400, /* 4096x2160@90 */ .hfi_version = HFI_VERSION_4XX, .vpu_version = VPU_VERSION_AR50, @@ -774,7 +772,6 @@ static const struct venus_resources sc7180_res = { .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" }, .vcodec_pmdomains_num = 2, .opp_pmdomain = pd_names_cx, - .vcodec_num = 1, .hfi_version = HFI_VERSION_4XX, .vpu_version = VPU_VERSION_AR50, .vmem_id = VIDC_RESOURCE_NONE, @@ -831,7 +828,6 @@ static const struct venus_resources sm8250_res = { .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" }, .vcodec_pmdomains_num = 2, .opp_pmdomain = pd_names_mx, - .vcodec_num = 1, .max_load = 7833600, .hfi_version = HFI_VERSION_6XX, .vpu_version = VPU_VERSION_IRIS2, @@ -890,7 +886,6 @@ static const struct venus_resources sc7280_res = { .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" }, .vcodec_pmdomains_num = 2, .opp_pmdomain = pd_names_cx, - .vcodec_num = 1, .hfi_version = HFI_VERSION_6XX, .vpu_version = VPU_VERSION_IRIS2_1, .num_vpp_pipes = 1, diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 6a77de374454..376de1161114 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -74,7 +74,6 @@ struct venus_resources { const char **vcodec_pmdomains; unsigned int vcodec_pmdomains_num; const char **opp_pmdomain; - unsigned int vcodec_num; const char * const resets[VIDC_RESETS_NUM_MAX]; unsigned int resets_num; enum hfi_version hfi_version; diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 5b2a40a2f524..ba63e6427eb9 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -622,7 +622,7 @@ min_loaded_core(struct venus_inst *inst, u32 *min_coreid, u32 *min_load, bool lo VIDC_CORE_ID_1 : VIDC_CORE_ID_2; *min_load = min(core1_load, core2_load); - if (cores_max < VIDC_CORE_ID_2 || core->res->vcodec_num < 2) { + if (cores_max < VIDC_CORE_ID_2 || legacy_binding) { *min_coreid = VIDC_CORE_ID_1; *min_load = core1_load; } -- 2.44.0