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 4221A223DCE for ; Thu, 23 Apr 2026 13:30:44 +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=1776951045; cv=none; b=jqTSDk7sGQ7Pm9+1kfLTHZa7NhYdODIJAPPZp0FU/dWNdnRdMOst7wa2w8vekyESMmtVDiH4/rioN5f96roeBsBmJjFeQQ2XYAUp7q5kE+1XXzKIJXaZt2ZSHj6FfDCVI5N3xvOsCw7tnluGjhMJeLkzCq+v5XTlfOMDlDGDbrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776951045; c=relaxed/simple; bh=HB+2dN7dauUgdrMwzh7J5kQuRahuzqqEHBqE2I7xdDA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X/NypIW+2Rj6tMD7myoumvQmeXbdQvJDMZilq78cqz6HycCnwLmF5bN4ZleR5UTcHN+oPtshydagCayrPngksRmh6MpO8dfYH+upWn8POPy5Z50yIkBtnCXDkIQkYYkVFbKVFXT0Zzh8PnjEBaAs5ibYyMVFp7aBDG9ch7MI9AA= 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=JQjdEduo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RvheGNtz; 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="JQjdEduo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RvheGNtz" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63NBweSC009844 for ; Thu, 23 Apr 2026 13:30:43 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= yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=JQjdEduo3jUB4J80 UxY01Cnk4y+htGI6K4HB4Q9VDGH+RDJj4KsPymFhpf7PdRne3+z38qSjHKKdTCTI maE419NrLKzQIFyJf80l3FKqZANQx+9NL7JKfQQHU1+o1rKZxXuy82M4oLkjzL8N jN9t1SdVEGYdvdegpuVRKFp6Jx7PbciC3MVFdfDNs1cwXyCDIM0kAOaSON+6dEbg 5URf07jh1XQ0GReKmv3koAWR9AfJUeoyqq/4F4qrrVz0Tkb1rrJZ4kiXluiwghpb Txi5+QjMDdGLFLpydNyXVjC1een+SDhfTCXse8e0xMENr3xxdMdvW3qTppJ6q1gi drl6iA== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqk178a8t-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 23 Apr 2026 13:30:43 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2b24a00d12cso68922935ad.1 for ; Thu, 23 Apr 2026 06:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776951042; x=1777555842; 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=yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=RvheGNtz9V7WEPuJCDJN7ts+Ys0clWdJVv2I7Gi72VsgoMRK/9MZIlnXgssUTtFisb GZ1XgCAEvCXueph0AbARQSHYxjAA2YFImKL2XaauDRoqQmFogmcHG1NrvguE85I23Nad 4al5a1mA8PoaUQlX16bv2qsNMGW4HKP4by4EYrE1fRr2vh3fYOJp5c+AQTBE20JKkzpA xEWnDT8CQtoCORDB27ghJBpR/8URNAwai0eawN4LzX+EIzX3htqclQyfauuUyRvR1XJX TQBh3uk6MJfTQ6f1HRkmjMhsLH8UtMIM5TdFXsNOnuBcYOA5YM7v5Zdk8IUh7tknVPNn AqbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776951042; x=1777555842; 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=yWKLcs6KFXQAtV2FQyw0tlDf/NPaYSspKHLsi0vr58M=; b=omNZNiM4FR/Pr7XheHzPLLMVxc6Bmh4q89JIZFaGCnl067VHrSwErFVhYfEHCdfsrT 9RucwV4se61lJ7r6C+NJi4dHypb+mnc143isg6ndtGa/Rr2v+gz8hKLJiu9aiHe0sbrH xRtm/yJirinvquVynMNApdjw+7ZCZcdxJ3YbqBdr27zMi+28e4M9wfj1pjnMH/PGbt4S GTpG2IGrlYonxhIh0JTk2PcsxQZfkpQyLGipJTqvBdcMY3M6yCHVbmP0V/KuFQDY7pRV 4WJGtJVFSS//cf9wi1qwwL7PXymblf5EJhmQFSCgVQZ/bJGcQYGAcMvgULBARQx9GWq4 iSaQ== X-Forwarded-Encrypted: i=1; AFNElJ/+LXnD+eY9epKzsUMnGxY2EQGe+dmbmLp6DjXLo8T13Id+Nfqyg5yrhw3Qmx2z7KEgQqUvAn2HgEx00A==@vger.kernel.org X-Gm-Message-State: AOJu0Yz1Ej8/pbOn/ZMXHZBuPL+dIq4DSGql1n5cpxXekDtT/1VjOhC9 hGmFQsMS4T3irf0wiYN/yLo7cDorao0Dyg4tiGa5nfbMnm3wpxKEQBzQ6lBd+hgmeiyfoK++CHt FocsdHnoro51e+wdyz1EPEq5iW3ED+KUqgNz8jfZVyHnR52JIjTS9LQCfho17F359OQ== X-Gm-Gg: AeBDies3tk/kn4zoykhxA8tsDuAevrUNwRQLfB9jsimiexzV426Fn9qp6nLfcRpbm+3 1tBfew1qRI/dcGJFW5n9Qox8rgafWIMdfRr2chD95dqRoDi4GSh+HT0Ki1SV6y//gQ0hpvP9Wyd zDgTHhxdmbhRAafjOVAvtVFG8npBC5VPqdtjpVM08Q893BISbEknC3O3j7y7r7Hme3EE5q8BHgj Jp4La47nTanmRGxhtOikbMuyVlR2vLY8kX3FVEeifnu2vZlZ++aZOYBemxuZSLuqT2lqFPWJhZ4 lpXTv8FK0RrpJ8R225zqgLdK5vEPpGgyvbqUgVp/dyDu+MIMqq+UoCq7eVquKRhbMPTEDz90SW/ WuATqUqurcNbJJ4JFPshzG0iO6CioN4lhvVi5ZAyBRwMi2rBf6reruAF/qXbEX5Jvgg== X-Received: by 2002:a17:903:246:b0:2b6:309:9f72 with SMTP id d9443c01a7336-2b603099feamr251901755ad.21.1776951042356; Thu, 23 Apr 2026 06:30:42 -0700 (PDT) X-Received: by 2002:a17:903:246:b0:2b6:309:9f72 with SMTP id d9443c01a7336-2b603099feamr251901185ad.21.1776951041662; Thu, 23 Apr 2026 06:30:41 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab0cbaasm198795635ad.54.2026.04.23.06.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Apr 2026 06:30:41 -0700 (PDT) From: Vishnu Reddy Date: Thu, 23 Apr 2026 18:59:34 +0530 Subject: [PATCH v2 05/13] media: iris: Add context bank hooks for platform specific initialization Precedence: bulk X-Mailing-List: linux-tegra@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: <20260423-glymur-v2-5-0296bccb9f4e@oss.qualcomm.com> References: <20260423-glymur-v2-0-0296bccb9f4e@oss.qualcomm.com> In-Reply-To: <20260423-glymur-v2-0-0296bccb9f4e@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 , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Thierry Reding , Mikko Perttunen , David Airlie , Simona Vetter , Jonathan Hunter 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, driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1776950985; l=3016; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=HB+2dN7dauUgdrMwzh7J5kQuRahuzqqEHBqE2I7xdDA=; b=gOrXRuyYOx63Ro+9sR82pXcBF5nq7YQVv4DGUiouKMpmgBheyBYqtRlAtDz0YtwxU4xK4b9hl ZU9S3UONyzDCyAMpp7MxY5zrCrXMGnz4RUuNOm3Zcit7fSDGObuuaq4 X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-GUID: 9y8aAQhB7vtt93sXMsOIWlXTOlaEGlnQ X-Authority-Analysis: v=2.4 cv=R98z39RX c=1 sm=1 tr=0 ts=69ea1f03 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=hn6c7xJugPWrWid5T_cA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIzMDEzNCBTYWx0ZWRfXwb4lBudDPf2Z hULBqBYgMSAs+DE4S1kTvRVAov8e9QNj+4+zbvmX18ZHFJbbp2htvSwKtnZ+S5LoKLj3/Ve1uGH DCijuy5R/hNcYz3bCplcoVYkBcT64pocsEapYZ/lQfeS1evGToo1hBm23JFh2HmnIfUaEIDi8KS 4N1duqJ/W46jusuo3a8B8f1fRtOOynR6C48twiTrE88605b89/pXXO5LTQXxBEiczqEZEWjdvrV 7/ezq3kEEOzofZKB0ErqedrRBNWAV0AMgsIbtpvxWZHm6eGCokZKXOeV6DRXur+OqLnZeG9573o TxwDq388vYIvzQMAgSnp4edBBLtKqGygzYEq85KYwc83uoH664x14DXtqJLRvSnrBwnPqVwrue1 iEh1h/GWKnWEWNFUYjbxjnhjeAb5WXQhvDwTqOI2ieIE/8kxJnknx9na8zD4t4XaBsCSAToBOEz qjsFKRvpWfZ1uO/V6ww== X-Proofpoint-ORIG-GUID: 9y8aAQhB7vtt93sXMsOIWlXTOlaEGlnQ 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-23_03,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 clxscore=1015 priorityscore=1501 phishscore=0 malwarescore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604230134 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. 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