From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 21266225A38 for ; Tue, 14 Apr 2026 05:00:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776142850; cv=none; b=Hts6CTjwhEfD/t4JB6hd4Lete7fkVnesbqD5jvMIDSHweCiujD1nf2kAu/0lKiFYDgJwbmZlkw3flJ+9Q6XGmAS9Nsb3cLS88/c1uw1H16JsEKyTB7mKUZ0x84zhh6oGbUkH+4vbJwRjgADJAAyHwkz8XmxV+QGCRyfSZjUiDuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776142850; c=relaxed/simple; bh=i6ZmiIhYyteEX9ku3DC5s4Wu1KZIwZCobr9Vm2PQ3dA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aEBs+Yr0WWfm7ndZKecP+YRzNPSfvLkWlcXEk5bOzjoj78OmpQ3Nb4KhXt5iBaTf+HFVcvCHQui2hmXARMqJ5wefGoZjLQpkgdDMdh5jFKz86Owkai4xtkf7I5TovyhNI+eDEN/RR0QUwIOH8fV+Dz7UQn67NHryWfen/IdX+1Q= 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=gpih+3HN; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MfXgGpsN; arc=none smtp.client-ip=205.220.168.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="gpih+3HN"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MfXgGpsN" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63DLCboh2386429 for ; Tue, 14 Apr 2026 05:00:48 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= /V6Rs8rcZ7PWWMWLKnxm5Zkp3zsUGa7EcbO4a5GtxCs=; b=gpih+3HND/I+h2iI E0zqieeXjDHZEX5HqWtB5fFp8+ztXhjYpp+BxQA6KpiVtJsLFu266A99rfghPyA3 CZNBXiYcpMEZ6v55ygSTZwCIEKf7WVVpZljpgWb3BB6GR5cmRBOj9AFDq02Tj96T 9sg3iE6DqeQ/Us0bcs3pnxzMCBkeC3WnQtUs24HA8LTKMx4mxANkyBGUhWRBro5l Gb/kmekTcEnuS1/9ErG/er95B/PF8Z/nymCprb/dsr/aD2EuVWqf/SoYQYhpI+Vf QXPlClLSmJKrqjqxyrKw1FMQ+m4so/Fbk/0OTxntujLR9KOlANZGPhDmIauKCGpa Pa/RXg== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dh86w12fx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 14 Apr 2026 05:00:48 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2b2ec948174so23070305ad.0 for ; Mon, 13 Apr 2026 22:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776142848; x=1776747648; 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=/V6Rs8rcZ7PWWMWLKnxm5Zkp3zsUGa7EcbO4a5GtxCs=; b=MfXgGpsNZhD2vbCnRQ4SRvJfkAZ/jOcLqtSH7Us58Qx/S78oF2AsabHZodkUrM403O LTOG1HL1STDjKRsub3HwvfEKOBFSpfyfIb599mKB8rj5Cme/FVpPbj2KdpZBdGionHPz oSJslYE0tZx0Pt324nMrz1r/b0ZvNEcNSf485qaiQOStZ421GFkP/CrrlHfcI5Bjoi1u 40t9ObujkEO82G/kTIYWgHT0uR4AIVhhfSnWIRyNU0jFMF9QGF1of5VJFf6lZPidc0+4 Y7zYA+2NWaGc8BjT570bNqp8ur5/iu+1wyK9evUeGeIlwBf++1dy0jhR3+UTQt96Wrjl rc2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776142848; x=1776747648; 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=/V6Rs8rcZ7PWWMWLKnxm5Zkp3zsUGa7EcbO4a5GtxCs=; b=W4WiySo54znzzvhsXWLtuKq9dyuRXCQ/S5AXpSTanYzHCkMtgN6tTHpfOyuR8HnCzv Mfg5YzP4v9WtPmFgX/ld9jkH+wp1xvn4X3sF9ryvZAd4/kWvd14qMqlAIstlVDXpMguu /kiObZ5kGgzYeJDrXwW0KRy8ova9cvHF5Wsp1/fn9cou/CKnhUl0B1jj6Rgyw5tjML3Z xWYJJveSaTPdjvuz4ER+4xNdCjUwlD+pPGuQ7GvE6nX5z3dxNhX0Og43v7F31Qh79Knk 3bVYhBiL3ynEOT8Q+mx+rxO9UBBs+u7Qgj30VXfSq1HiPvwG4/n3VO4ic9XpZlw/1US4 Z7AA== X-Forwarded-Encrypted: i=1; AFNElJ98zEB9t5RU0mkbMxgrUeA0DcODHwRwjA9yzRatZRsvkeoVLaEzrJkaIMmoBBRaKNMc7gUwC19d24Yt02g=@vger.kernel.org X-Gm-Message-State: AOJu0YybNpGNJHb/ugbklxt1Elvegu6TA0zwJO50yNu/brQCeX6MVj+Q IF3bYoD4KdAt7ALqeASvkwjoR+G3tTGnFfhcxpNbfJX26wH1SM5frjsRXKKboz3EDedSewk6toZ fFUnpomc0LX671wrxvPQYi2AeoXRcmX+eH5ZI8kZEnadw0yVAb/qTX1rirP1twruoY4Y= X-Gm-Gg: AeBDies9yitblt8OX3YPnzzJS7CKtC/RZymGOAKEXK+srYQuyDniXRQ9dzsLopBLmxD SEF/tBYG7A1Y4TamWZYeCOkq5Al+i1okawYBc4yXBxfMXEvzkdo84m/IogQeWlT8noVXJ7z1Gmp GYsbgWO8OauO/bEYdyf1u9pjp1Et3nkHsyKDwGd+xcCSJyenloK92+4iBNeHARcq6Ge/NbVNxZq aBk2dplknDybTuIi3QxM0XAeDGfHT7513gJfgHby8oI0Ltce1EPnR1W2eUA5Mve9Kpk6ePtMhs6 IQLX8VaO+JlvDa9WFGmDq9/XU6LdzRaFgRQEvw46uwfF6171xxCkbI6bP7EdkwhZ0/e/OTRfMnO WXg7hSR7AX3dtGKZMmNPIKoCRzRxAjVY1eJk7Bqa5l59Fv9BEpWjndIw= X-Received: by 2002:a17:903:4b0d:b0:2b2:5597:bad4 with SMTP id d9443c01a7336-2b2d5a69f1emr147906765ad.30.1776142847498; Mon, 13 Apr 2026 22:00:47 -0700 (PDT) X-Received: by 2002:a17:903:4b0d:b0:2b2:5597:bad4 with SMTP id d9443c01a7336-2b2d5a69f1emr147906225ad.30.1776142846873; Mon, 13 Apr 2026 22:00:46 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b2d4db198asm134678425ad.3.2026.04.13.22.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2026 22:00:46 -0700 (PDT) From: Vishnu Reddy Date: Tue, 14 Apr 2026 10:29:59 +0530 Subject: [PATCH 03/11] media: iris: Add context bank hooks for platform specific initialization 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: <20260414-glymur-v1-3-7d3d1cf57b16@oss.qualcomm.com> References: <20260414-glymur-v1-0-7d3d1cf57b16@oss.qualcomm.com> In-Reply-To: <20260414-glymur-v1-0-7d3d1cf57b16@oss.qualcomm.com> To: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776142821; l=3016; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=i6ZmiIhYyteEX9ku3DC5s4Wu1KZIwZCobr9Vm2PQ3dA=; b=+2+NbB6zm/k4yanN1JURhnrXB+oAf2ZOIVM4jw6hSDlg8urxTn2L1XRBSID6qg9Tot7pjAl7Z FeYY6PQsmWiBH7fqg1XPOijE2WBn/Q5eKdptaSAHhJBvzPYfJMoBCzA X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: YkeoPBSLaBXaE-KGE73pAKakA-RO4YUL X-Authority-Analysis: v=2.4 cv=HKfz0Itv c=1 sm=1 tr=0 ts=69ddca00 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE0MDA0NSBTYWx0ZWRfX++M3+03DRmlc tJ977obpvXVxkw2fRSqa5HmZzAFWiduNa08yvyiM3bPLT6YG1sPPwDtAmb7Npu2T6kyG7VGL74K PAK/x4tqQ9PgCG9RTbCZTd+eo84elW0m8tqXAEmBZZVy3YK9SzH6xaWXLHQMiS4Vxxp4MaWUmWx Buqa8VvUn22Qp2x5ZOl/HlQyfAyGUUgeaAuu2TI6Iv+TNjdK79qLz3E3AOhPK1Bqo0pR5Xq1ZPu 92Y9ytg4lP+QvVw3jGFzbim9PgPQoVpHOhrPTeFvoxHuHLKk61eRn8+mVSVvQ9oUu5F2w+36OoD 0ZnRXQNkTwKCGf1loin4h/VsXt9v6pjBIeMmJfgZb5akeetnqa6hcO2f9roucxqEl775qbupkfA h+i92WwzsQorp5i6Z5w8sTbjLz0u1+IKyYENscfOGTleSSkErhGKW+EXuyKyj9mw90tjfUYTnge dcP6xzaVt0RPa6RNxKw== X-Proofpoint-GUID: YkeoPBSLaBXaE-KGE73pAKakA-RO4YUL 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-04-14_01,2026-04-13_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 phishscore=0 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604140045 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. The Glymur platform requires a dedicated firmware context bank device which is mapped to the firmware stream ID to load the firmware. 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