From mboxrd@z Thu Jan 1 00:00:00 1970 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 9621441B355 for ; Fri, 8 May 2026 19:01:41 +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=1778266903; cv=none; b=sVqtbHoFEtW1FoqnIVfgxUa7L99X9ZAiF4i6l9sDrd6c1DLQEewOQg0qdPjjYj78O4JFpMg+92fXYIb6ptFcBn9Pwef9wDTvQqjYc6A5csr5cBOySBmttwLhKfHG7NZgyAkRbxHktZV7DR+34zlunMPJauzmfhgWmwHFR1CDbXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778266903; c=relaxed/simple; bh=2FrychMIG3LHR9amZA9Bhyd149/t+cV8/TYXT9nsgoY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DyPDlhql++RvmU17C06SEVy0tsMXM1Z7gOriiyEaq3PNvo/IQdZt+fMou1VzBraSxt54TBZoV68TqPyiayunL5F7W0G4xYlIJNJwLhFghf+f+k1Md6yGlwYNd9MZjjY6IO7FHmftmuKjxjyrMt/OpV20mwcA3FxTfm7d6GzJXUk= 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=J+CjV61q; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=e7PzmwKw; 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="J+CjV61q"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="e7PzmwKw" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 648CDSwk1173958 for ; Fri, 8 May 2026 19:01:40 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= dn3CzzlpHtBN1CICIkLhbSzmIcgQM8PPO9ueTKjRmq4=; b=J+CjV61qhcCvq2DY nZd2eo9lQeK/2x/HQzhpBteFjbsmnCSj6r/z2ddHQXrCKtSg2CQ25bsH8ZskXc+2 SLPCNB7ki11GN7K3g8Ul+ow9ZaaFbZw0JHIS9c2IUBZSGoPXIQb0yvDN6vARn4Wa 9qkY6h0Q9wJEzy5+N3Kgkq7+7UXK//+s7znAdf/E7ZBQtJrxR6Vvbsfvz0ZaWWqj BsyyXLoCQQO5cHue7ovuf5D4UbfIjhI+R1/cEoD9ASQ+2Q8y5QRyWKRaTu2Rap6t CZrpvmbrTU2j5PfsioLBAVHWwXdzmeG/ni7aWc7zUW9B6PwK+4vMgODzmLWa258W rO1+aA== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e132hcct3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 19:01:40 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-82fa860e71eso1331230b3a.0 for ; Fri, 08 May 2026 12:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778266900; x=1778871700; 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=dn3CzzlpHtBN1CICIkLhbSzmIcgQM8PPO9ueTKjRmq4=; b=e7PzmwKwofl9k+a9H2eRu7IVMowwC8L6zGEamPYazLqH0PKyKsI2CNwk7LHT3aA8TD KboSI8vZwL2lIBZQwnM86mPFH3tWGyztW1fPFkcC1WIyP0BqX5XinJ0qTCwGURbdoqJ6 aU6ZlJaqurWbqLhz6AKzRelqBN6u3nvZGgeYlHYqwMjibxYzHwvc7+OjMyAA920K29MM toX5PtHAh+iRgpOkBk7MW1TX+268YANyTh3xgklCS5++znFVMQj1V3uby0ygAs0hh5VI mUraiW3Ci1WlvwI87QLfckcHPcwszhBIP8EOSyXlfRMH5lWSDFWE2Jwl0mPxotBaapiS OKJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778266900; x=1778871700; 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=dn3CzzlpHtBN1CICIkLhbSzmIcgQM8PPO9ueTKjRmq4=; b=sRDe7Ev8RtF7xpw9uPC+y3qYelh7cVz3NwwWQSq4SEqxyp41oWM9KPelUdE7NQWvWn qGtOywdV+DN6AxwevJJYqBdTqg9Lb3vi3RgMXPrJbilbr1U8BnKa2NgmVtuoJY5Pgog1 Igovrw7xJdzNiOXf2z8kT6cB9dJGLx+bqivHGvt6Cr1LtGOP1T37uhxaPK3jZIpDN4rX 48dNnzo8vXx28IRYMLoKUJ4IKGwKAy1+Km4lJ12qkrUssdUUdBlUN3whkNGYBgmzU1kC DflFS0UI1Keoh68VZqougiN9R272sHH9iaDLTtROALaaa5WO34QStyOexxEnH0Fx3Zy9 h5pg== X-Forwarded-Encrypted: i=1; AFNElJ9qMlEEJ1gIyh8bvyAneI//jwWhgEL7edp1a4eqzJwpGgW7vj0D+yl2OuntZC3+icUth9PnD7tvaE0l@vger.kernel.org X-Gm-Message-State: AOJu0YzAgiV5aM0pAkGcH2AbLe+nwkXIMfuxPGqr8GN+jSQvyqG2O2cH dxPrS5h0IKZ9v0BRv15T+aDhMTjarCwD6JI5/gKeXJZ3tGO4WZo1smhro5KVBHTr+iR2SGxXNFw sCFXlZkmbgD5tEgqURB5GX2CQVKk+B4B7eLegFQEHlZn+/hKAymN9TfErM4dmLjad X-Gm-Gg: Acq92OHcKRN3ys7fh1jgl5DTpg6k9P84SRkRTJ2x/Y3E9C1QiKrfIuKEVQlUgjJX5Ui K0Tfv7C2+dzVmN0Y5136Q68oHWuWaFqbal2oJwyCaMqtI+L+Zck6lYfBRg9HKDWQx1JAKPW/xq1 7ayR8EutIO0Se1nUYgBe4iddFcbbUKd/8gJ6Xy15Ic+wl5VQkih59XjjRFkuEje7tbB5U0jtEZU wk0omfXzYXJW9Bif8m0Eg3c//6aOF3Gy3RYbZny7Zzw6J5MGCmp7zm0Wg6/JSd6zCT8lWj/02YK i36gmBWx2HnbZnFp7BfEFmMh032k6WyZgne/Xt3WrO3b3pPLMD20kw4Rf7sWVtwvZof/ILqHouv ont6pvY4r1PepSlV1uOOGFrT6vuQy2rie1HMjTCYfMiOKpQxF7OZl0Vo= X-Received: by 2002:a05:6a00:2e90:b0:82f:b0:28f0 with SMTP id d2e1a72fcca58-83a5d96f560mr14458715b3a.34.1778266899407; Fri, 08 May 2026 12:01:39 -0700 (PDT) X-Received: by 2002:a05:6a00:2e90:b0:82f:b0:28f0 with SMTP id d2e1a72fcca58-83a5d96f560mr14458559b3a.34.1778266897986; Fri, 08 May 2026 12:01:37 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965a3e3ecsm13395550b3a.19.2026.05.08.12.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 12:01:37 -0700 (PDT) From: Vishnu Reddy Date: Sat, 09 May 2026 00:29:55 +0530 Subject: [PATCH v5 06/14] media: iris: Add context bank hooks for platform specific initialization Precedence: bulk X-Mailing-List: devicetree@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: <20260509-glymur-v5-6-7fbb340c5dbd@oss.qualcomm.com> References: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> In-Reply-To: <20260509-glymur-v5-0-7fbb340c5dbd@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Joerg Roedel , Will Deacon , Robin Murphy , Hans Verkuil , Stefan Schmidt , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Jorge Ramirez-Ortiz , Del Regno , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, Krzysztof Kozlowski , devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778266845; l=3079; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=2FrychMIG3LHR9amZA9Bhyd149/t+cV8/TYXT9nsgoY=; b=7wLjzMkpFTKevjusI3lfqR/03jJoonRzKWGH2n3/qQquIs5JISQIbUxn1gQV/9+NlOhlNPlUM CoUC+yZXZRqAfcrViDbh13LB5NZx+epsQfEZJfy9HGOr6KrF+Gec1T+ X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDE5MCBTYWx0ZWRfX80ni/fezIuvA Zod18yyxkQSynxfKie1fhIusonNqYVqhpkz2TZhIYwg3E1ibh4s7IY9x5893UIqBuznktFFJ1EM 9xORBgxRaDbL5qi1gyqjeMeklLOUx29x8uJnemw8y4hGWWd2Rl1FAwJF88MkjKznHtSa24ix4qW MwVbFGy3kC3p0/U1v7uh24vJHiR9+DgYn7QxjbraEPKK3SSiuaNQj7mkMRhJnQhottaVcOXOifi rjzem9kCzRxyf0pH/Zn/kKaEjA92ro3WSkjgt7DCiJHUF72U3ccVkn8p2+A4nutQAIymbqVWvZv aTxZRsJpbiLoc+cTD3RhAmoDtDWDRqgCH8xGuKvpL5+jCdCtvPGvVj4Rzs+ssIJhxh6+RIHisPm DTro2bCUUHWEWFWitk62UNCMtg4dth61OXOYHTsXwUbHHKBCwmHMqQjM7eXe5kMvSXq+fpIzKIN RjJEQfhPRGqW1d+9JBw== X-Proofpoint-ORIG-GUID: DaJPum3cS_j5Nb8dKQLCGZO_Z-bVV0v1 X-Proofpoint-GUID: DaJPum3cS_j5Nb8dKQLCGZO_Z-bVV0v1 X-Authority-Analysis: v=2.4 cv=McxcfZ/f c=1 sm=1 tr=0 ts=69fe3314 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 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-05-07_02,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080190 The Glymur platform requires a dedicated firmware context bank device which is mapped to the firmware stream ID to load the firmware. Add init and deinit hooks in the platform data for context bank setup. These hooks allow platform specific code to initialize and tear down context banks. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- .../platform/qcom/iris/iris_platform_common.h | 2 ++ drivers/media/platform/qcom/iris/iris_probe.c | 23 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h index 5a489917580e..55ff6137d9a9 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -219,6 +219,8 @@ struct iris_platform_data { 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); + int (*init_cb_devs)(struct iris_core *core); + void (*deinit_cb_devs)(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_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c index ddaacda523ec..34751912f871 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -142,6 +142,20 @@ static int iris_init_resources(struct iris_core *core) return iris_init_resets(core); } +static int iris_init_cb_devs(struct iris_core *core) +{ + if (core->iris_platform_data->init_cb_devs) + return core->iris_platform_data->init_cb_devs(core); + + return 0; +} + +static void iris_deinit_cb_devs(struct iris_core *core) +{ + if (core->iris_platform_data->deinit_cb_devs) + core->iris_platform_data->deinit_cb_devs(core); +} + static int iris_register_video_device(struct iris_core *core, enum domain_type type) { struct video_device *vdev; @@ -193,6 +207,7 @@ static void iris_remove(struct platform_device *pdev) return; iris_core_deinit(core); + iris_deinit_cb_devs(core); video_unregister_device(core->vdev_dec); video_unregister_device(core->vdev_enc); @@ -259,11 +274,15 @@ static int iris_probe(struct platform_device *pdev) if (ret) return ret; + ret = iris_init_cb_devs(core); + if (ret) + return ret; + iris_session_init_caps(core); ret = v4l2_device_register(dev, &core->v4l2_dev); if (ret) - return ret; + goto err_deinit_cb; ret = iris_register_video_device(core, DECODER); if (ret) @@ -298,6 +317,8 @@ static int iris_probe(struct platform_device *pdev) video_unregister_device(core->vdev_dec); err_v4l2_unreg: v4l2_device_unregister(&core->v4l2_dev); +err_deinit_cb: + iris_deinit_cb_devs(core); return ret; } -- 2.34.1