From nobody Fri Dec 19 09:46:27 2025 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 DD3871EF391 for ; Thu, 10 Apr 2025 16:30:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744302619; cv=none; b=SLY7TxCugYOp6v90ToqfrXq54R31IP4S+j9zNMJMLwEPLNdV/geAjFK3nf/LJIFY2/lI0+4zRUYoxBOS1ZGU4P7b1czuSsX2KWlrkkhMUsoyJz4OA1qBoOt3QLrjYv2NiWThG7IxtJcjcYfVBjSRBQH6I8hBYerFYWh6MfXeNGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744302619; c=relaxed/simple; bh=QJzi9VtRTRt8770gEHryKmDm1SK4T3JVfWCNXr8L6tY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Jn+J8p+NbI7xahjMQFcTOQzCcSM/11MH3avhPWAN9U4knaC5YTRTekQFXaWgg7RfRRi3pKTmYpHBSjNTaiDg/+G552JQhwiX15CkIZYltWvlGI+4Bxc4RbJUywh6NVh2fogq99Ww4YPBMTYTDOqwOX0l8kf2NQm0j9ES3ied7qc= 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=HzyRoamU; arc=none smtp.client-ip=209.85.128.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HzyRoamU" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43cfe63c592so11698245e9.2 for ; Thu, 10 Apr 2025 09:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744302615; x=1744907415; 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=iMAsgauOE6xhOvqvD7g8R3kEtDo6zcGFGgxPvQiLvBQ=; b=HzyRoamUoF4pRnhQVX2OJw4vOnQsQ8ZQInDmLt49S2kw0hyuef0gunmsInYRtS5Pyy lQ32GaqAxKoCImWZGKQrMZBFCRcc3fgNZz+g6n+Z1+bddxAdGjHbjPbbWY0MRZ77DxKE CeWVdG3MB1SJqtMLwKEWNNTrknEPvorrHDuR6FdmtpY6nMl2VmtGWCVtQAMc37L2TBJV tqF5iNl6QwmBfDUHSnQQZJqK3VsBstb59yDJez1OhAs9G5Puy6UU5NqxXgQv7UrHXk8s NGVnLuMlPYnqhw9TMwyAtqhgVFrDnWOwbs2eaH2NAJyp0QS6HTpgV37Mn5Gb8HlgVwJb kH0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744302615; x=1744907415; 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=iMAsgauOE6xhOvqvD7g8R3kEtDo6zcGFGgxPvQiLvBQ=; b=aBNrrUcZx1kZtu3sXVXb45tQnALq0foKgkWILxmwA3gWCRORoUjGdEp4B5tr4aITs1 2jXDG9LdWbrQzzd0zDLKVCwywxoQOhofhFr6+Hb/SlGEFNxzIuj6KGJI3hcvzHHTg72O 3AcgvLgXTygf+9XGznopP5tVFuL3KBDn2xGhfzBWL+yOAS6Fm6iGV5GUKwhU9cNvX1qH 1DIHjTnp8sF2e5Jz5ItR7WcxppLvOo5TKnwD8dgO46b8jdQlRRsekde0UWcwKOCSPQny beaTTJa1miEcBL3Mux1Yb7GDrWGtLTyHlilv9dE6bEM+1PpBNG3H3ZZd7HHVxSbQBMkD 6Q4g== X-Gm-Message-State: AOJu0YzkSTOw3eczd9y82B0lWzWvzhnHgoko8+szm3/VESR1M5TTFr9n S6yNqFjatLHRDnWcDdVrerjUcMi5xtpJ55nmKaoFcCCajwB1JerbCYSN76Ux1Vw= X-Gm-Gg: ASbGnctpLK50Kc/elFJKkhWbU2elZHDE+6ZWIY6cXclvACVyHkmjpbbOqHCjjDmQfuZ QgdBlTLn4aJrLpAQxaCFnpKLI2PxpLoBLGrLM9Mjku9mRnyUAl1Xcw/yXSdwOrxSI4egr+Kzi+s r79w6VEg+m7iK6c6yRi7m8Cmksdzp8lPkD/kMBGEOMzoichr+GHyuHgbWGv7DpE/UVTlwxw2Htv IH/C51iIrYtn0DQM0IDgPQYNZRzcfAEQNyI+vuZdJRtK3SwGts6wS4IY+m1nSQHmp5WT20HCuB8 ZlZi83RwQcCOOfUzR/Z1xzhfJyfqOnKkbzB+M8tgQJZ+g9qKoiRI+YSa8zB+zQ== X-Google-Smtp-Source: AGHT+IEOAc3XyyMfCWLt/l+UcTTxDcLQmT60/usgfkMvXf7qiDFVvgWqGTSXyAsH0RuAo9AWx4pOKA== X-Received: by 2002:a05:600c:1c17:b0:43a:b0ac:b10c with SMTP id 5b1f17b1804b1-43f2ff9b959mr26179515e9.26.1744302615023; Thu, 10 Apr 2025 09:30:15 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:3d9:2080:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39d8936129dsm5350663f8f.18.2025.04.10.09.30.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Apr 2025 09:30:14 -0700 (PDT) From: Neil Armstrong Date: Thu, 10 Apr 2025 18:30:07 +0200 Subject: [PATCH RFC v5 8/8] media: platform: qcom/iris: add sm8650 support 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: quoted-printable Message-Id: <20250410-topic-sm8x50-upstream-iris-catalog-v5-8-44a431574c25@linaro.org> References: <20250410-topic-sm8x50-upstream-iris-catalog-v5-0-44a431574c25@linaro.org> In-Reply-To: <20250410-topic-sm8x50-upstream-iris-catalog-v5-0-44a431574c25@linaro.org> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong , Bryan O'Donoghue X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5378; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=QJzi9VtRTRt8770gEHryKmDm1SK4T3JVfWCNXr8L6tY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBn9/IQCBwEt2DAYfpoM+kcPEfnP3gxLTL4dpYuKiy4 4KpXm6+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZ/fyEAAKCRB33NvayMhJ0b+VD/ 91zBivzo1HMEBQtOxYgniHjXTpXknul8DWSBUKTyMcJ5MNPNFDEMH8xVRwgp86zO3ePvSNWe7S2m7s B3JhkMFwd8AVeGsF0u+yS3YgK/KHlQ9fw7/P2J8f8Y5eDurr4I7xhbfkbKzjQpAZXsZ1n4ePhes49y Ctn4MP2DubyXopVOrY21sptPx7RoElxvtxbKpvKzfnXJUdyRl3DUkHZqmNAjJKI1sC4BxosdmI4ZBe vuS1pGMUlCHdtfraSWeKm/JHMmZDm5cwcpMkR8fViRSFV/sG3QiOG+QLJ7mUHWZIR/4wKrIKqV90w8 QzeLgqh+ga7acT8w/c5PpaPQ/HGT1hd1XIYkfUHQ8Japkb3Og8A2rLtSNvnOcFYCsCPY4yAakg9qxn aasW4IEFWnhuhybQDr/meHwNg0GOTospiv3JjlTcPyrq4QAoRgjxloOTwJ02h3mR3vjYToCQHGYdev 27FMsqc3YvJNUr5Waw5kxbpEMcrxFRPOPcqi4bOQIn+SpkyjMb4FiJCBkZpn9sHdp1yEdpk3whHz5R WXvOBPA2/svLiKcuvQUyzMU5giUVAqX6cQyhfMLXDYaLYfUGVcgl6Ck7td4+xP/6Yn/64hpFpSVyvD 0jn1Fcoi3HfPvUU7srwTWOLvX13IUiuHZAcaf5X9MbXM6Xk/Ckhx8YXz0Gig== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Add support for the SM8650 platform by re-using the SM8550 definitions and using the vpu33 ops. The SM8650/vpu33 requires more reset lines, but the H.264 decoder capabilities are identical. Tested-by: Bryan O'Donoghue # x1e Dell Signed-off-by: Neil Armstrong Reviewed-by: Bryan O'Donoghue --- .../media/platform/qcom/iris/iris_catalog_gen2.c | 1 + .../media/platform/qcom/iris/iris_catalog_sm8650.h | 68 ++++++++++++++++++= ++++ .../platform/qcom/iris/iris_platform_common.h | 1 + drivers/media/platform/qcom/iris/iris_probe.c | 4 ++ 4 files changed, 74 insertions(+) diff --git a/drivers/media/platform/qcom/iris/iris_catalog_gen2.c b/drivers= /media/platform/qcom/iris/iris_catalog_gen2.c index c3f8ad004cb7f9317859b2594640c7138dbb6534..ad559351f1125d266dedac7eb6e= 91cda90bbae72 100644 --- a/drivers/media/platform/qcom/iris/iris_catalog_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_catalog_gen2.c @@ -186,3 +186,4 @@ static const u32 sm8550_dec_op_int_buf_tbl[] =3D { =20 /* platforms catalogs */ #include "iris_catalog_sm8550.h" +#include "iris_catalog_sm8650.h" diff --git a/drivers/media/platform/qcom/iris/iris_catalog_sm8650.h b/drive= rs/media/platform/qcom/iris/iris_catalog_sm8650.h new file mode 100644 index 0000000000000000000000000000000000000000..be8737dd4f3d9ec20a457d50076= be1b4d841787c --- /dev/null +++ b/drivers/media/platform/qcom/iris/iris_catalog_sm8650.h @@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights res= erved. + */ + +#ifndef _IRIS_CATALOG_SM8650_H +#define _IRIS_CATALOG_SM8650_H + +#define VIDEO_ARCH_LX 1 + +static const char * const sm8650_clk_reset_table[] =3D { "bus", "core" }; + +static const char * const sm8650_controller_reset_table[] =3D { "xo" }; + +struct iris_platform_data sm8650_data =3D { + .get_instance =3D iris_hfi_gen2_get_instance, + .init_hfi_command_ops =3D iris_hfi_gen2_command_ops_init, + .init_hfi_response_ops =3D iris_hfi_gen2_response_ops_init, + .vpu_ops =3D &iris_vpu33_ops, + .set_preset_registers =3D iris_set_sm8550_preset_registers, + .icc_tbl =3D sm8550_icc_table, + .icc_tbl_size =3D ARRAY_SIZE(sm8550_icc_table), + .clk_rst_tbl =3D sm8650_clk_reset_table, + .clk_rst_tbl_size =3D ARRAY_SIZE(sm8650_clk_reset_table), + .controller_rst_tbl =3D sm8650_controller_reset_table, + .controller_rst_tbl_size =3D ARRAY_SIZE(sm8650_controller_reset_table), + .bw_tbl_dec =3D sm8550_bw_table_dec, + .bw_tbl_dec_size =3D ARRAY_SIZE(sm8550_bw_table_dec), + .pmdomain_tbl =3D sm8550_pmdomain_table, + .pmdomain_tbl_size =3D ARRAY_SIZE(sm8550_pmdomain_table), + .opp_pd_tbl =3D sm8550_opp_pd_table, + .opp_pd_tbl_size =3D ARRAY_SIZE(sm8550_opp_pd_table), + .clk_tbl =3D sm8550_clk_table, + .clk_tbl_size =3D ARRAY_SIZE(sm8550_clk_table), + /* Upper bound of DMA address range */ + .dma_mask =3D 0xe0000000 - 1, + .fwname =3D "qcom/vpu/vpu33_p4.mbn", + .pas_id =3D IRIS_PAS_ID, + .inst_caps =3D &platform_inst_cap_sm8550, + .inst_fw_caps =3D inst_fw_cap_sm8550, + .inst_fw_caps_size =3D ARRAY_SIZE(inst_fw_cap_sm8550), + .tz_cp_config_data =3D &tz_cp_config_sm8550, + .core_arch =3D VIDEO_ARCH_LX, + .hw_response_timeout =3D HW_RESPONSE_TIMEOUT_VALUE, + .ubwc_config =3D &ubwc_config_sm8550, + .num_vpp_pipe =3D 4, + .max_session_count =3D 16, + .max_core_mbpf =3D ((8192 * 4352) / 256) * 2, + .input_config_params =3D + sm8550_vdec_input_config_params, + .input_config_params_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_params), + .output_config_params =3D + sm8550_vdec_output_config_params, + .output_config_params_size =3D + ARRAY_SIZE(sm8550_vdec_output_config_params), + .dec_input_prop =3D sm8550_vdec_subscribe_input_properties, + .dec_input_prop_size =3D ARRAY_SIZE(sm8550_vdec_subscribe_input_propertie= s), + .dec_output_prop =3D sm8550_vdec_subscribe_output_properties, + .dec_output_prop_size =3D ARRAY_SIZE(sm8550_vdec_subscribe_output_propert= ies), + + .dec_ip_int_buf_tbl =3D sm8550_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl =3D sm8550_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_dec_op_int_buf_tbl), +}; + +#endif diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index fdd40fd80178c4c66b37e392d07a0a62f492f108..6bc3a7975b04d612f6c89206eae= 95dac678695fc 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -35,6 +35,7 @@ enum pipe_type { =20 extern struct iris_platform_data sm8250_data; extern struct iris_platform_data sm8550_data; +extern struct iris_platform_data sm8650_data; =20 enum platform_clk_type { IRIS_AXI_CLK, diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 4f8bce6e2002bffee4c93dcaaf6e52bf4e40992e..7cd8650fbe9c09598670530103e= 3d5edf32953e7 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -345,6 +345,10 @@ static const struct of_device_id iris_dt_match[] =3D { .data =3D &sm8250_data, }, #endif + { + .compatible =3D "qcom,sm8650-iris", + .data =3D &sm8650_data, + }, { }, }; MODULE_DEVICE_TABLE(of, iris_dt_match); --=20 2.34.1