From nobody Tue Apr 7 14:19:00 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B96434C826 for ; Fri, 13 Mar 2026 03:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773372636; cv=none; b=cOAbDLLLRXzixCnNWZKg02yN4Q6Bd+2WU/dB1npWJ61k20b9qAEqdrRVgCA1x0xLv0koj5SD7Xs8D+a+AzI0zc6r/chVXKEgv7sxtGcZeegssa3nWL776N5JDXEtvUGZIzOFN7EtHY9wXy7aL3TnLRTmfVMxl1FPpxjAKBu3mmY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773372636; c=relaxed/simple; bh=dKd+e7VXpOLrs33EkmmfTfblgiU21vmALyxPTYH2etM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=J9+sm6ujMPsNj5FUDmkgjM+snYjlpOambpyGrhQuEZhyOhBSZMyFLNR5nH6OMVwl3IeZ/vPUuY6AWOWWNnYRHkP+NJlA1z3H4c0BVFmfbGqyPlL67e99umBntG9jdHP5UIwU2vbXWVji67XFxjWqLC9UT8L2O95n1IdjGuM/cBE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=RpfoPj9W; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Sxisp9Qg; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="RpfoPj9W"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Sxisp9Qg" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62CK0vbS4028372 for ; Fri, 13 Mar 2026 03:30:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= cDxcjhAqOb/kGi+fNZPYkRZoZ7JQxWwf0K5Qbx1wh5o=; b=RpfoPj9WGRA6h3IM yeC2lzFrhh0cVNTydnrj1Qi2/ii8PdkLF8w10EQSfTcbZCDaVuIVPh+EMD7uAfJ1 50R1z63gNwHs/lLlxYecQzHr/rzoLEYM+Abc8mIGCnK3Y4ITX+r5lBOfIiOvMsrZ Dygv0QV4+UZYERW+bVpUxjX0vTfGypRjiPUZplyREYG9gISQnlBhp6mZUpUnRj5P /u35ep5SESSu7rWkAeGoO7umQGxEpxNiXYr9IhZwDN20OWh5MLwG/2CqdRyDGNcd rPz8vLGuc2VR2xAqb+Y9PrsCMQJWB3wOq6e6Y0VbZ436ZpLX1gF820zgkkmFSNfU 8cqLBA== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cuh54v98k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Mar 2026 03:30:33 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cd7d66afceso1152978285a.3 for ; Thu, 12 Mar 2026 20:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773372632; x=1773977432; 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=cDxcjhAqOb/kGi+fNZPYkRZoZ7JQxWwf0K5Qbx1wh5o=; b=Sxisp9Qg1PyNMtjP2MKi9mBVQUPTJmh29t+yH4vC/NF7BxE/J3aTr2AiWSoAhTii2z MhaaQCdgg8ow4o4Cb88g+iEOBEF3PGVShHqf/WCQAucoisi9aqeCiJzK6dR77Cxktgus C8cOE78uwtUyi7DW6Bt7/Kpz4RnYWnLJ4xo1r2Ssyu8UPPyHzlojwSZDXJCpw+GjibAq 1M9g8d6OZY+yv5nV8yXSQPjISdKezeJqx/3msYA7W/M+uXO0W1YacqqJ8coKW3SQzx7i pSxUeqOmnILRJd3vlE+EAbaEhjABWnINwQG2L50yn8JY52ieCg+ix9SpURnFOfb4btn9 xXCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773372632; x=1773977432; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=cDxcjhAqOb/kGi+fNZPYkRZoZ7JQxWwf0K5Qbx1wh5o=; b=AQa4/apSRo7NaJPTbDVUcna0u8rxRiVf/r7cPSN88+17fgfsrm7irOcztPF2EY6hft naPnktr+iR8IAxwfmjw6z41EAfYT/T2sY8SQlJfnQ4ANqHbYb9sPI/+k8qt15lhWy2Xa Q/8J0cHwPvt5TnpaKyPVHk3fDotidv7+IoNjxIsCgnXwu5wFF6MCmx+Ew+21FuPHl9jm 0y1gZTu/7bpKosa9Ii9EdNxSdJe6eondDlDRibUf/TqmPynuTYn+tknUzACFWWu/cEeB fiqrnUQAR0CHXGotLmm73tSgyKj+39ZcqzAvTx0FayaXoEiW7xsPDLToQ3DujmbAfK8C 6zrg== X-Forwarded-Encrypted: i=1; AJvYcCVRPxhy5Lrp/nzwIjEjNI8dqpHXN8DxSqvdH/BuS9oMItlksP/E9pWgTnYS5ll99w5cyiPY01Jd4We6qk4=@vger.kernel.org X-Gm-Message-State: AOJu0YzqEATwZ0v27PAFCHEZaMXRwbpIWBt1oW3G9SU2yCCJbmyNknHo 9QdqJOnGSlamovwsYTG1kcUbukmBrFHwEICW2G+3uMbwp9df6PAljz5/3EQi2u84HcTbCnw+vq0 egnHlb9H92TX0gmGtFOn8L3HkA1WdkNERIejq8adkIsLVt1pwiT2wEDvppdvuqT0HfM4= X-Gm-Gg: ATEYQzzCPBW8bGB8jPpU7QcDZcq+aycEjZJH5u+TkcYEFMrsPNt/e7j/fqibudl5r/v SeKeTjXVwVkyPLm+eQUgHZXNAqbgAsKiH5SCBArP55sPDKwdvh4NnD8bGaYFzu7jTt6ehyHpAf4 +h2I5Uu/DwbNqwjsyhM+kSs+x07OVjcogcroZiLrHSUdsKwxpI8AKqbIEVANDeiCjUSmaqttVHK XFCtpKtklmo+hjI75aQwcog0xBI7HCmZYO9b5ms8LSoK6Q6iJk7RvsZjYZ0sFnBUsFrgSYIgQ1k DWeEBF/ipxDogel8ne/7PVeHSpXRyhOlA9Jyk8yOeAxLmobpFmFdtcN2f8hN3GPPDTKhOU7purF GEBeD8umUG/tlbQONYnICb8Wj9/picT/sf+26GxD3hAb/j7V4zFXjOovqBUgd037a2XCnPavaAp w8XnVxenu4rJFMYfmq9RWleM8UBHqMGmENF50= X-Received: by 2002:a05:620a:4589:b0:8cb:3d7a:c009 with SMTP id af79cd13be357-8cdb5bb2133mr297271485a.78.1773372632172; Thu, 12 Mar 2026 20:30:32 -0700 (PDT) X-Received: by 2002:a05:620a:4589:b0:8cb:3d7a:c009 with SMTP id af79cd13be357-8cdb5bb2133mr297268885a.78.1773372631724; Thu, 12 Mar 2026 20:30:31 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38a67d93576sm11254901fa.11.2026.03.12.20.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2026 20:30:30 -0700 (PDT) From: Dmitry Baryshkov Date: Fri, 13 Mar 2026 05:30:19 +0200 Subject: [PATCH v4 2/8] media: qcom: iris: use common set_preset_registers function 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: <20260313-iris-platform-data-v4-2-14927df4906d@oss.qualcomm.com> References: <20260313-iris-platform-data-v4-0-14927df4906d@oss.qualcomm.com> In-Reply-To: <20260313-iris-platform-data-v4-0-14927df4906d@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=6432; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=dKd+e7VXpOLrs33EkmmfTfblgiU21vmALyxPTYH2etM=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBps4TLRcprbDcJwZdoeW2lpQipWloREBklM9Z50 qN/sEUR5auJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCabOEywAKCRCLPIo+Aiko 1alWB/9FB/BE/ZM+JW3JpxjnqX6Xh9e+rpiYN3ZClgZa5J1mLmibpY68txsQisViIDWbmAHG5l/ O+VX48QKEamBdGo5fWhzM9kC2DeZ/AGMFqTUpKYMZEAKDQ6GbixU4QYQC8IDIZVoPPAOY+CM98Q jxn2heN/N9jJvChvVWn4A+vnYwBep3CdTQrgtliTrsSrcG3zTDbyFT3a79vNey6DNnbi4yJ3ndL r4UQ6nmT4obcKhaV54XfSnuMlQFfMqn9parVyn8ZEpmkLKCK9hanPMjVnS6zLH3FexkqDxY3pQX HOj6bsBUhDjsqZFJ4x0eoipsZRu403rNv6sw+4grqkoWJhvM X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: K9HrFU59mXUmaDSm2wUxmUSDRStnWaAi X-Authority-Analysis: v=2.4 cv=BNG+bVQG c=1 sm=1 tr=0 ts=69b384d9 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=LmgrmXmU8fDMlo1BKrQA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: K9HrFU59mXUmaDSm2wUxmUSDRStnWaAi X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEzMDAyNiBTYWx0ZWRfX49wd9FXBS+MR xvKteJ2RDRPUSbDRnBzjljd9IHwdQGKmBt9F207DMpnmjBH5ZYsBH4W5k6R3dXFDtrLhCwnczSZ X/YY5gb4vdjQFyb5UoFbIacMbmYCZY95jpcApSsuoRS1w5Bv0S/njBxrq1q3zUB4LQbNxsGk2N5 AClx2cdQhTS58KTLmW88kmQqZ6v6RZbMnzGD/YcK5gQrjk3Wzt0ddpfGZpTDg7pHHnVlZGcPsZa ryQWTsxdo7A+1LZP7Du4Lzg1748MGMUEF6j1hnBls6QgACJ1UZ1Rschnjr+/TmR/cdKwq+vL0WG ZbrAgbNyAnBBRzbNKCOP+YPRwgxknuURVih3FJ27duh9o2+YyXSMAjIhEVTNEJyxmAhhfNPOVFq JPJF1n1YpBJrXk7HqqnfPlDnkKaUPO1p+C699dVuYWh9B+X6x64wab7mVHpLbx6Ic5OqaPMeLSf bfEOI+0MT+l7aTvWbDQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-12_03,2026-03-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 bulkscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603130026 The set_preset_registers is (currently) common to all supported devices. Extract it to a iris_vpu_common.c and call it directly from iris_vpu_power_on(). Later, if any of the devices requires special handling, it can be sorted out separately. Signed-off-by: Dmitry Baryshkov Reviewed-by: Dikshita Agarwal --- drivers/media/platform/qcom/iris/iris_platform_common.h | 1 - drivers/media/platform/qcom/iris/iris_platform_gen1.c | 7 ------- drivers/media/platform/qcom/iris/iris_platform_gen2.c | 9 --------- drivers/media/platform/qcom/iris/iris_vpu_common.c | 7 ++++++- drivers/media/platform/qcom/iris/iris_vpu_common.h | 2 ++ 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index e4eefc646c7f..d7106902698c 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -207,7 +207,6 @@ struct iris_platform_data { struct iris_inst *(*get_instance)(void); u32 (*get_vpu_buffer_size)(struct iris_inst *inst, enum iris_buffer_type = buffer_type); const struct vpu_ops *vpu_ops; - void (*set_preset_registers)(struct iris_core *core); const struct icc_info *icc_tbl; unsigned int icc_tbl_size; const struct bw_info *bw_tbl_dec; diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/driver= s/media/platform/qcom/iris/iris_platform_gen1.c index 07ed572e895b..ed07d1b00e43 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c @@ -260,11 +260,6 @@ static struct platform_inst_caps platform_inst_cap_sm8= 250 =3D { .max_operating_rate =3D MAXIMUM_FPS, }; =20 -static void iris_set_sm8250_preset_registers(struct iris_core *core) -{ - writel(0x0, core->reg_base + 0xB0088); -} - static const struct icc_info sm8250_icc_table[] =3D { { "cpu-cfg", 1000, 1000 }, { "video-mem", 1000, 15000000 }, @@ -343,7 +338,6 @@ const struct iris_platform_data sm8250_data =3D { .init_hfi_response_ops =3D iris_hfi_gen1_response_ops_init, .get_vpu_buffer_size =3D iris_vpu_buf_size, .vpu_ops =3D &iris_vpu2_ops, - .set_preset_registers =3D iris_set_sm8250_preset_registers, .icc_tbl =3D sm8250_icc_table, .icc_tbl_size =3D ARRAY_SIZE(sm8250_icc_table), .clk_rst_tbl =3D sm8250_clk_reset_table, @@ -397,7 +391,6 @@ const struct iris_platform_data sc7280_data =3D { .init_hfi_response_ops =3D iris_hfi_gen1_response_ops_init, .get_vpu_buffer_size =3D iris_vpu_buf_size, .vpu_ops =3D &iris_vpu2_ops, - .set_preset_registers =3D iris_set_sm8250_preset_registers, .icc_tbl =3D sm8250_icc_table, .icc_tbl_size =3D ARRAY_SIZE(sm8250_icc_table), .bw_tbl_dec =3D sc7280_bw_table_dec, diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/driver= s/media/platform/qcom/iris/iris_platform_gen2.c index 1f23ddb972f0..c84d4399f84d 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c @@ -756,11 +756,6 @@ static struct platform_inst_caps platform_inst_cap_sm8= 550 =3D { .max_operating_rate =3D MAXIMUM_FPS, }; =20 -static void iris_set_sm8550_preset_registers(struct iris_core *core) -{ - writel(0x0, core->reg_base + 0xB0088); -} - static const struct icc_info sm8550_icc_table[] =3D { { "cpu-cfg", 1000, 1000 }, { "video-mem", 1000, 15000000 }, @@ -917,7 +912,6 @@ const struct iris_platform_data sm8550_data =3D { .init_hfi_response_ops =3D iris_hfi_gen2_response_ops_init, .get_vpu_buffer_size =3D iris_vpu_buf_size, .vpu_ops =3D &iris_vpu3_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 sm8550_clk_reset_table, @@ -1018,7 +1012,6 @@ const struct iris_platform_data sm8650_data =3D { .init_hfi_response_ops =3D iris_hfi_gen2_response_ops_init, .get_vpu_buffer_size =3D iris_vpu33_buf_size, .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, @@ -1114,7 +1107,6 @@ const struct iris_platform_data sm8750_data =3D { .init_hfi_response_ops =3D iris_hfi_gen2_response_ops_init, .get_vpu_buffer_size =3D iris_vpu33_buf_size, .vpu_ops =3D &iris_vpu35_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 sm8750_clk_reset_table, @@ -1212,7 +1204,6 @@ const struct iris_platform_data qcs8300_data =3D { .init_hfi_response_ops =3D iris_hfi_gen2_response_ops_init, .get_vpu_buffer_size =3D iris_vpu_buf_size, .vpu_ops =3D &iris_vpu3_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 sm8550_clk_reset_table, diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 548e5f1727fd..faabf53126f3 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -468,7 +468,7 @@ int iris_vpu_power_on(struct iris_core *core) =20 iris_opp_set_rate(core->dev, freq); =20 - core->iris_platform_data->set_preset_registers(core); + iris_vpu_set_preset_registers(core); =20 iris_vpu_interrupt_init(core); core->intr_status =3D 0; @@ -485,3 +485,8 @@ int iris_vpu_power_on(struct iris_core *core) =20 return ret; } + +void iris_vpu_set_preset_registers(struct iris_core *core) +{ + writel(0x0, core->reg_base + 0xb0088); +} diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.h index f6dffc613b82..07728c4c72b6 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h @@ -39,4 +39,6 @@ int iris_vpu35_vpu4x_power_on_controller(struct iris_core= *core); void iris_vpu35_vpu4x_program_bootup_registers(struct iris_core *core); u64 iris_vpu3x_vpu4x_calculate_frequency(struct iris_inst *inst, size_t da= ta_size); =20 +void iris_vpu_set_preset_registers(struct iris_core *core); + #endif --=20 2.47.3