From nobody Tue Feb 10 06:26:04 2026 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 B5F1E364EBF for ; Mon, 9 Feb 2026 09:46:10 +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=1770630370; cv=none; b=dcpnPbjBTVskqlcxS/5k7iZEAWZtHSy+3T1cGwEJyM8r+IPWv6mzrDHQGyaVcEMkhh4w6l1ZysdlfIU7SRU6wvZuoXioL5Hi0rvzZH9q4toriowxN+j5nV0jhPL3K2IU4Jf9uKCDkhVCvnJfK2veGn69SU1UKey8R/1Y5l5DU/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770630370; c=relaxed/simple; bh=IQ0e3U+S18cU6feftl6lZUy0c6+odiSJgtdVNR0dd78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cX1RZ0bXHYYachnn1sTfcc5FEmcjmi51z8Vls3h27+3o7bKUZu/XHiGj+KOHkBWJUi4ABd+i2JU15dwGPEQHVxxmCk4wjt2xdc9QMit115sUnWanPQESnR+0MgMwcDPry0OizNrrZVY84E2CDqXudINGkd7j4wcL5wxS0y8sZ18= 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=b/EGgu0y; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ftLkY7C4; 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="b/EGgu0y"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ftLkY7C4" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61989eXw3229571 for ; Mon, 9 Feb 2026 09:46:10 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= J0st88zXaPvsYHpPh6Jq0JH/VbPghzPRzWWaPLmGPLk=; b=b/EGgu0y829eziZx 3mZOEM0+soOhRJFL4sZBt2BK8DKk/+o3Flq5LUdVo2ZeO0XMyNDB6sRFD8wMTJpO MzTj/7FLYkkPxMOooN7tJRU1HBSVo1LF8+i03Uf3v3P4p21IRlY86T9HShL/Npo/ rXaYrtgHAm+ND2w2IcNEXvYMbVpDGlza42sV3qeZr32fn2aMlyq8w5o4xnaRHT5j F1GkKW5R3ujNABJ1NtB0yBbfcpHnP0LSNHU+54Dju5D+mwCDaMC8OyAyzIOs8ONK FiSOLyCPaKH7o3lRxFRtEtQAhVql9g3WxVstK/DYjaltTWpEc7yS+Gvtcwk/Ss1g y6Ys/g== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c64hnm3n4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Feb 2026 09:46:09 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c6ddf336128so3557150a12.1 for ; Mon, 09 Feb 2026 01:46:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770630369; x=1771235169; 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=J0st88zXaPvsYHpPh6Jq0JH/VbPghzPRzWWaPLmGPLk=; b=ftLkY7C4ZKhJeuIbhumu5OB4tAnnA6qPLUQydHINYxiOvCFtVdJQFHAllWFdPrAVjk auv9w7LBqB6caVW9sXQ3Qe3ynfG/mdYTEAp7SCW9hXLKipFg9GKErQ9M59GvJKVtKAJa 9ZnKi+8B9RnaJJzKL0BswXOQgAoI8/MZPiDpUvnlQLH96OMeZc0bVZhQ7aGWSIyXnhwn kOIk+XP2KwNXDwgDHMEG7o4KYA22QmzPPPk3sp0rAStbrNygPKyuGgt8qOI55uw1birp ZWLIjUHcYyrE/lvO52coYp3zdpLmmG/iqqQbZJEKrCarE6NT4HeKOQ3F/MuCQnIfu7aI ts3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770630369; x=1771235169; 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=J0st88zXaPvsYHpPh6Jq0JH/VbPghzPRzWWaPLmGPLk=; b=Am6a5U8pks2A/a/xuO6Kzfa+bUSU1c8VTMHQFJIh/R7n0b0nTjtu0QLaClwPtH78Vu QFZzEl6+7ZfV6q+dbVC2FTPdGTL23UC9YPmKHRur35LLNFi/S5/jrb6Nv9Jb+UHViclB Xk27x8cEKsxpJI4DRmU2uZt0mUXHkoQwq+TFE/ivN5cY/qeKebGZlpKVBcnh9RXVUq4a 7RJ197+S+SvRCzjVjcWur/JGU9vlMYnfX1x4CpMKcXjtpbraigO/CguXzQZCPQ0CjvVj WeA6kkmNy2SMxvrZ0cLl0DSFr3rNXq4to64czbzcfN9RFWaqBblYrgMTylI1HjdzaC9H LuFw== X-Forwarded-Encrypted: i=1; AJvYcCU4eqOjxcW1+NntRKYfKT0e0TxxS7KH6sclvib0iWLG8yJgzSC85GQGtYqqoVUHzB/gXuFbreBGwU0lXWg=@vger.kernel.org X-Gm-Message-State: AOJu0YypLEqpTd2xWIM6KnufsHc7CRaAjchr5P8z3diyijwEtrv0xKO1 V/+JiAmQn5W1gHlB3STp1L7E/vmTmNQxrduizZC2Hf9Ozse/DKv5p+VtVT9lIWlLN59FnNTVXAq csYQWUHr3yY9DV9up9WttBwlZ7VEvQVa2iIoAhR+V4FiVLA87WQ3igXj0E0V0/N0eKaE= X-Gm-Gg: AZuq6aLMPhTwFTxd4kJLXSNaqh3vDC8fQwlFn3e2nB6KYLzUnZy07g81RHaPYkj/Gna 4Frf1BaOwujpZjwznd2ZFh8CZ1Nu8RY5Nr3CbCQ+xyJb1/WguWhEFuuMyGRRz0+nkrb7h9JEii7 tVb5AlY/xj2tQdCQJQyudgpLBgAF4SRiISCn4yfzfb8gJdXjY0MNTaxeJfpt8KbvqNM5G57DbRV rCILx2X60N7Ta7EecZvFHGwFOxLQzmMbTAggJzTIYXdniv0o+cW7tz+EHVtrYnvqN4aNNngVd/J fJZKxd5bY0gVCgUA17xeOr2ZxH9eszYlFGi8tlDAgUrD2W/Vq3mw4gUpsjoyBl+E/FHnEBnwz3i ZhT8QmbveKe33LL9zk4twcI2tMKO6I3KAlmhqXnB9ekb5Cxw= X-Received: by 2002:a05:6a20:a11f:b0:35f:549a:b0b3 with SMTP id adf61e73a8af0-393acffdd84mr9834180637.23.1770630369314; Mon, 09 Feb 2026 01:46:09 -0800 (PST) X-Received: by 2002:a05:6a20:a11f:b0:35f:549a:b0b3 with SMTP id adf61e73a8af0-393acffdd84mr9834156637.23.1770630368809; Mon, 09 Feb 2026 01:46:08 -0800 (PST) Received: from hu-dikshita-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a95eedbceesm76884925ad.84.2026.02.09.01.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 01:46:08 -0800 (PST) From: Dikshita Agarwal Date: Mon, 09 Feb 2026 15:15:25 +0530 Subject: [PATCH 1/2] media: iris: Initialize HFI ops after firmware load in core init 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: <20260209-iris_sc7280_gen2_support-v1-1-390000a4fa39@oss.qualcomm.com> References: <20260209-iris_sc7280_gen2_support-v1-0-390000a4fa39@oss.qualcomm.com> In-Reply-To: <20260209-iris_sc7280_gen2_support-v1-0-390000a4fa39@oss.qualcomm.com> To: Vikash Garodia , 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, Dikshita Agarwal X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1770630362; l=3249; i=dikshita.agarwal@oss.qualcomm.com; s=20240917; h=from:subject:message-id; bh=IQ0e3U+S18cU6feftl6lZUy0c6+odiSJgtdVNR0dd78=; b=s/m2RbZgyvaMTsJCwwvf6ERBbRCqWWJ7oOIm/BvcxL0zNwWSc5ufwAjM2wqiQr9BTGUQAgPgU t3Bk/H+B6InAq12sZ2wCmZCjmM4apknhz0vVEu6nguR5t0zebHGx8zG X-Developer-Key: i=dikshita.agarwal@oss.qualcomm.com; a=ed25519; pk=EEvKY6Ar1OI5SWf44FJ1Ebo1KuQEVbbf5UNPO+UHVhM= X-Proofpoint-GUID: PE0LR_l2D1Ix0Thgv4JvOquALkSRz3cM X-Proofpoint-ORIG-GUID: PE0LR_l2D1Ix0Thgv4JvOquALkSRz3cM X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA5MDA4MSBTYWx0ZWRfXyTHF3ToZymaM 3fkIbK8z582cxOvsXda9yqwI+u1bbSUFRfIclQtncyulhpxS+PBk2FpV6/JvOx0O8T8F9hCgRYY HdghGMtf4O4ErfUbK+mIfM0V4QNQYm7OAFF2qnrfbtmaEszZVr78svo6dq6kEuBx7KGmUvOXFK5 ZoLPpEa1SoZhZxwfQCS1fUmfYKcjbjtKKi5rOuPq7g+CD+A/vAqHEu7aE4P+ndq+bZ+YftJEnzh tjJWC8CQ1nVBHLerwLFZKMhC6zKq5YTC4A86H5UVOqgAN3Fl/NlROur4bJE0ZLMc+UDjFm1LxTh /jleeX2aSzJ9CeC5G5lMvZ7J/At6DU8Ot/1wRg14xTQKX/HkyJAO7eBzGrR3RGAqcKgz4kF5vux q2EWghs+/lliWbtmG3lihF8qq+AEhu3rUlHJEW+oQUlFIVLRk9SlCc43jZorau4y5/7v8DHNkeH dVvvsJZk4SQKHQi9FTg== X-Authority-Analysis: v=2.4 cv=SNlPlevH c=1 sm=1 tr=0 ts=6989ace2 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=3tfMAF2nT37deXqZlAYA:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-08_05,2026-02-09_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602090081 The HFI command/response ops were previously initialized in probe(), but we don't have firmware loaded at probe time. Since HFI is tightly coupled to firmware, initialize the HFI ops after firmware has been successfully loaded and booted. Signed-off-by: Dikshita Agarwal Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/iris/iris_core.c | 2 ++ drivers/media/platform/qcom/iris/iris_hfi_common.c | 6 ++++++ drivers/media/platform/qcom/iris/iris_hfi_common.h | 1 + drivers/media/platform/qcom/iris/iris_probe.c | 2 -- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_core.c b/drivers/media/p= latform/qcom/iris/iris_core.c index 8406c48d635b6eba0879396ce9f9ae2292743f09..8e4cc6d6123069dea860062f017= 2f1e4b90cfc13 100644 --- a/drivers/media/platform/qcom/iris/iris_core.c +++ b/drivers/media/platform/qcom/iris/iris_core.c @@ -75,6 +75,8 @@ int iris_core_init(struct iris_core *core) if (ret) goto error_unload_fw; =20 + iris_init_hfi_ops(core); + ret =3D iris_hfi_core_init(core); if (ret) goto error_unload_fw; diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.c b/drivers/m= edia/platform/qcom/iris/iris_hfi_common.c index 92112eb16c11048e28230a2926dfb46e3163aada..bbca17edf281a11142d7582178c= d7562be053b45 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_common.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.c @@ -74,6 +74,12 @@ u32 iris_hfi_get_v4l2_matrix_coefficients(u32 hfi_coeffi= cients) } } =20 +void iris_init_hfi_ops(struct iris_core *core) +{ + core->iris_platform_data->init_hfi_command_ops(core); + core->iris_platform_data->init_hfi_response_ops(core); +} + int iris_hfi_core_init(struct iris_core *core) { const struct iris_hfi_command_ops *hfi_ops =3D core->hfi_ops; diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.h b/drivers/m= edia/platform/qcom/iris/iris_hfi_common.h index 3edb5ae582b49bea2e2408c4a5cfc0a742adc05f..498a08314cdeb65b4b621e2200a= ae8685f4a025b 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_common.h +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.h @@ -149,6 +149,7 @@ struct hfi_subscription_params { u32 iris_hfi_get_v4l2_color_primaries(u32 hfi_primaries); u32 iris_hfi_get_v4l2_transfer_char(u32 hfi_characterstics); u32 iris_hfi_get_v4l2_matrix_coefficients(u32 hfi_coefficients); +void iris_init_hfi_ops(struct iris_core *core); int iris_hfi_core_init(struct iris_core *core); int iris_hfi_pm_suspend(struct iris_core *core); int iris_hfi_pm_resume(struct iris_core *core); diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index ddaacda523ecb9990af0dd0640196223fbcc2cab..22c7b3410710328b900fc49459c= d399aa0e89b02 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -252,8 +252,6 @@ static int iris_probe(struct platform_device *pdev) disable_irq_nosync(core->irq); =20 iris_init_ops(core); - core->iris_platform_data->init_hfi_command_ops(core); - core->iris_platform_data->init_hfi_response_ops(core); =20 ret =3D iris_init_resources(core); if (ret) --=20 2.34.1 From nobody Tue Feb 10 06:26:04 2026 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 216843659F2 for ; Mon, 9 Feb 2026 09:46:13 +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=1770630374; cv=none; b=BhTIalvXUw+Ky9doZGXGlrBAazO+ieKTQWH2+oHuqN7Yv/iCDHCwoIzLgsIzKUgsEahfDqscXHc34jLSeqjDTCDNC/2lupD+KAz/YWcVnsnWTO3nsA73pRMHbkum2wMYO/OnEGYj7QrhqJDq0xKAl6y8HQVjbmtu/dTDU2jzkMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770630374; c=relaxed/simple; bh=d+IIsIi7kfuO/G+67G2tw1LdxeHxrkFVOKPANmKDm+U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oyfFVukrOjgXCCwsW0C+j43C8MM1swbn1pEGTc9yELyToIDfBUmsy7a2qd76Lr65//YHo3yOscpUJV/pKBZDPyz0h7n9W713E927G7LIGCMnkMOZNpw4UtQhm/TTlTcFbKMyJ0WzZTbCn8C1hMCW/UY5Qx/v/0ZL4MSqKXu2aUU= 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=d7aMd9R8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KnPHagjX; 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="d7aMd9R8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KnPHagjX" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6199dZv01656544 for ; Mon, 9 Feb 2026 09:46:13 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= 25cM4AyBvQDwMyOQmDFUD6Vsy45wjcF7vLOupDtJlIc=; b=d7aMd9R8cOOMCrSb qJ5FPjfLTsSJONwMaJeZ+9oKBd4dYmvUrDJ1hWUWBMDM+5A7MOJyekR+/XI58BxD RLm2k36tqyu/uihzltDmBArG1eLbHwReW7e4vKKRVMBc9WSRnSQsgkuctM1eN4vA KNU6aC+sKt5XIzUBDDbB7YY3rcAsDpqmgCyQl15JGKQeUOeAxOHRJX8ziGiI7AhQ 6RJDyk4yxjC8zYzt+HA040RzISgSKhaMTIgD2861jyBBuAGxPnf3NOzEGrnkvd1C E/2jDEwxoSEFbPS8htGg7JFQkGV+urcU1EpHYAvUMjE2yce5bzKuQGP3iz8Rqy+C pZ/14A== 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 4c7862s484-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Feb 2026 09:46:13 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2a8c273332cso88753255ad.1 for ; Mon, 09 Feb 2026 01:46:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770630373; x=1771235173; 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=25cM4AyBvQDwMyOQmDFUD6Vsy45wjcF7vLOupDtJlIc=; b=KnPHagjX19ua79ssAcNyPuKLxGoBXv9zpuhVJyc9SpzKHSVdljwJzsQvZWCjtUrwBV WiUe4eWgEkaLX1gtYSAXZLPediXH0Pikjl+IDEWfcyoMGMe/SsUCohGoTW/oVBI+ipGZ Bkxl0acJWofmww9mfK3XX0xUz2Iv+SnAP50w+KOM6iHRoHo0oaGVQfO8Q5cHHD2OzGG0 eHk/pHCDjY8t5TvTVsQ9qz6bu/Cj7TIYHibxLesD8j++zcs601P3YpgrJhCK8HmDYetW T8cXI6NhdKLvoo+J8kdmNszBl+HOPhmiMTbaA9xO12PLw9Af+YU1jv84GUYjf8tM7qEs hGYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770630373; x=1771235173; 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=25cM4AyBvQDwMyOQmDFUD6Vsy45wjcF7vLOupDtJlIc=; b=gX8DnMAPJHgbW+3SH5e1hzzIrEp+z+OwgINvMC2KlDkNefxA6JAe2ze/jD5+I/Hzon KIITzroNkQo8RIhEOrI3kYWNinMtNHd824ANnV6VnH3u+PCldYEE3LfqXmxcPyR9EGnT rZuzffokniu1Ves+Fie/EhNIJerbwtjcCTJ5O2F2hsSERg9hL921YxJkZzxxG9Vh9teq CMsjy8B+ggYDni5uTLKBwqSV65O6AQehUnJSPkCxPDDNrYnJZt1l1vLa4O+eHfA1vf7a 9t4YrYpMWWMWDWTt8pk9Ftyr/VJ+xd6rzu4HhwH5GGJBkYCY4Ao4AI0e7VqeWszyr4W3 h57Q== X-Forwarded-Encrypted: i=1; AJvYcCXI3pCI3TM9dwiMPZS6n7Mjcapi84Ja8QpKINElbCBcFN0f+s3AbOsltOpFDQ22H/DVeSFZaPEWqCsWsMA=@vger.kernel.org X-Gm-Message-State: AOJu0YwUxpaCXU8n27roWGLXpupkzzpUNjepPfz8o63qA/063/h0KaFU GYK+EjOpckehd7Oatxp9d2sw/Nohr6pseEsAvFWoGJzcMmOcNN9qqv9zKVj6T6zOAwClbVZ97xS A4Yxah4KCBsFjwhuOwPRJXVXR5+jAvgEFi2+kXe3vCIkmfLWVhCFevssHxwZPqpVo+mE= X-Gm-Gg: AZuq6aINYh7eUksXypZNXX160lozcZdVVCG9OZ002PRHhhONPykv//1gcUHp8ly1JbF Q/od29nsFNklr1psID9Zc6I6Q1X8Bors1RRuU5K/lkSim7+S0HR6Kold/V4aVJKl+s0woEoNAsJ gk82Q985DuRPoN9DrpqcCSGtull1SHj303KgV6jA3h3lH6dSKUweetYZ2suZrePKABiOrOMNl3D fHG3oXsvgzMr9epp6T3jsusHeXk1lmWl7ofCJTXbw6edH6zjwaJPpYgbtKhub7Z8L2+aGv1A7L8 b7so9hmdfZntYkYH5u5Q1avkE21sQLBK+CxIzaghAWrZG3n4Ju/JjPR/xFAcMCNZeBvmA2zVEjX /GBtmvA8Y9ZRrUZ9bfpWkYn1FKaTln12F38cnkRw2gpFRImA= X-Received: by 2002:a17:902:ecc9:b0:2aa:e7f3:fb05 with SMTP id d9443c01a7336-2aae7f40696mr30693265ad.59.1770630372562; Mon, 09 Feb 2026 01:46:12 -0800 (PST) X-Received: by 2002:a17:902:ecc9:b0:2aa:e7f3:fb05 with SMTP id d9443c01a7336-2aae7f40696mr30693015ad.59.1770630371987; Mon, 09 Feb 2026 01:46:11 -0800 (PST) Received: from hu-dikshita-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a95eedbceesm76884925ad.84.2026.02.09.01.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 01:46:11 -0800 (PST) From: Dikshita Agarwal Date: Mon, 09 Feb 2026 15:15:26 +0530 Subject: [PATCH 2/2] media: iris: Enable Gen2 HFI on SC7280 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: <20260209-iris_sc7280_gen2_support-v1-2-390000a4fa39@oss.qualcomm.com> References: <20260209-iris_sc7280_gen2_support-v1-0-390000a4fa39@oss.qualcomm.com> In-Reply-To: <20260209-iris_sc7280_gen2_support-v1-0-390000a4fa39@oss.qualcomm.com> To: Vikash Garodia , 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, Dikshita Agarwal X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1770630362; l=11953; i=dikshita.agarwal@oss.qualcomm.com; s=20240917; h=from:subject:message-id; bh=d+IIsIi7kfuO/G+67G2tw1LdxeHxrkFVOKPANmKDm+U=; b=53xKooVH8vBgCq1uMmaR2pBQ9REhprsPoAtitazBLZxCelfr6+wODouLSHSKoqLxsQxW6MSeF qliQ3AhabqkA/zF+FvAXopwBcMj3CD8tbJEcv2Xdcc+O15jfcNWckcI X-Developer-Key: i=dikshita.agarwal@oss.qualcomm.com; a=ed25519; pk=EEvKY6Ar1OI5SWf44FJ1Ebo1KuQEVbbf5UNPO+UHVhM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA5MDA4MSBTYWx0ZWRfX87ub3I7OJ2Y6 8oB5e750lsH2Ohs4e46UXPVnNQDtgLdHwNa+wNgcKlj2scq/zyCI4Gi9TnV5T2XDRvlBsKph1QP phVlo6W/3A1m0g5JfMfnAIcp/aFvbdgl6lNzmH1zDERTrEFoV2903rwZZPBXOdiwvArqGwtXjTo PrIUxlePbBeoPshYvRYEuvEyngffFDd2++dfDqlu+gIqypPA8xjMDNOd9ge2NkBVsAE0TLODsBR Dy8ORJTKtibF1wbWDsM+HZPn5Y2zcIS4GsFDDd8Dt84+WdXwlCL6LrVrzNKBYzuqVydBIfPfdCH crGxpmO+yyd5p0RKnk0p4oCyTcD6i4Yr3wAepqdDslFBvbh+6gClhBsKAxj9AfV5wsvHPP1NiGn ZypoCc0eI2CKdv2ewFwuxpZmGSt628CD2vCyb1JCKWX7o9Rx9pa99rpBV0C5jCIc2zYs8gdqZBH C3GfVIerYItM4BhY10Q== X-Authority-Analysis: v=2.4 cv=bZhmkePB c=1 sm=1 tr=0 ts=6989ace5 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=hg4RzyEoevDTOF3Nx0oA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-ORIG-GUID: ZryZiWbo1z0A1I5V8T_Nsg7qAZk6Ilbu X-Proofpoint-GUID: ZryZiWbo1z0A1I5V8T_Nsg7qAZk6Ilbu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-08_05,2026-02-09_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 phishscore=0 suspectscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602090081 SC7280 supports both Gen1 and Gen2 HFI firmware. The driver continues to use Gen1 by default, but boards that intend to use Gen2 firmware can opt=E2=80=91in by specifying a Gen2 image through the Device Tree 'firmware-name' property. Based on this property and the availability of the referenced firmware binary, the driver selects the appropriate HFI generation and updates its platform data accordingly. Boards that do not specify a Gen2 firmware, or where the firmware is not present, automatically fall back to Gen1. Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/iris/iris_core.c | 30 ++++++++ drivers/media/platform/qcom/iris/iris_core.h | 1 + .../platform/qcom/iris/iris_platform_common.h | 1 + .../media/platform/qcom/iris/iris_platform_gen1.c | 4 +- .../media/platform/qcom/iris/iris_platform_gen2.c | 83 ++++++++++++++++++= ++++ .../platform/qcom/iris/iris_platform_sc7280.h | 15 ++++ drivers/media/platform/qcom/iris/iris_probe.c | 3 - drivers/media/platform/qcom/iris/iris_vidc.c | 3 + 8 files changed, 135 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_core.c b/drivers/media/p= latform/qcom/iris/iris_core.c index 8e4cc6d6123069dea860062f0172f1e4b90cfc13..b14b04b32b62e324a70a558063d= c673f7b9c2981 100644 --- a/drivers/media/platform/qcom/iris/iris_core.c +++ b/drivers/media/platform/qcom/iris/iris_core.c @@ -3,6 +3,7 @@ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights res= erved. */ =20 +#include #include =20 #include "iris_core.h" @@ -10,6 +11,31 @@ #include "iris_state.h" #include "iris_vpu_common.h" =20 +int iris_update_platform_data(struct iris_core *core) +{ + const char *fwname =3D NULL; + const struct firmware *fw; + int ret; + + if (of_device_is_compatible(core->dev->of_node, "qcom,sc7280-venus")) { + ret =3D of_property_read_string_index(core->dev->of_node, "firmware-name= ", 0, + &fwname); + if (ret) + return 0; + + if (strstr(fwname, "gen2")) { + ret =3D request_firmware(&fw, fwname, core->dev); + if (ret) { + dev_err(core->dev, "Specified firmware is not present\n"); + return ret; + } + release_firmware(fw); + core->iris_platform_data =3D &sc7280_gen2_data; + } + } + return 0; +} + void iris_core_deinit(struct iris_core *core) { pm_runtime_resume_and_get(core->dev); @@ -67,6 +93,10 @@ int iris_core_init(struct iris_core *core) if (ret) goto error_queue_deinit; =20 + ret =3D iris_update_platform_data(core); + if (ret) + goto error_queue_deinit; + ret =3D iris_fw_load(core); if (ret) goto error_power_off; diff --git a/drivers/media/platform/qcom/iris/iris_core.h b/drivers/media/p= latform/qcom/iris/iris_core.h index fb194c967ad4f9b5e00cd74f0d41e0b827ef14db..3b6ff3405f504359a094ad65d5a= 3252f20adba4b 100644 --- a/drivers/media/platform/qcom/iris/iris_core.h +++ b/drivers/media/platform/qcom/iris/iris_core.h @@ -121,5 +121,6 @@ struct iris_core { =20 int iris_core_init(struct iris_core *core); void iris_core_deinit(struct iris_core *core); +int iris_update_platform_data(struct iris_core *core); =20 #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 5a489917580eb10022fdcb52f7321a915e8b239d..f1bbbe043e3a3ccc5eebf670911= 62678eb83bf45 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -43,6 +43,7 @@ enum pipe_type { =20 extern const struct iris_platform_data qcs8300_data; extern const struct iris_platform_data sc7280_data; +extern const struct iris_platform_data sc7280_gen2_data; extern const struct iris_platform_data sm8250_data; extern const struct iris_platform_data sm8550_data; extern const struct iris_platform_data sm8650_data; diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/driver= s/media/platform/qcom/iris/iris_platform_gen1.c index df8e6bf9430ed2a070e092edae9ef998d092cb5e..6dbdd0833dcdc7dfac6d7b35f99= 837c883e188e7 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c @@ -414,8 +414,8 @@ const struct iris_platform_data sc7280_data =3D { .dma_mask =3D 0xe0000000 - 1, .fwname =3D "qcom/vpu/vpu20_p1.mbn", .pas_id =3D IRIS_PAS_ID, - .inst_iris_fmts =3D platform_fmts_sm8250_dec, - .inst_iris_fmts_size =3D ARRAY_SIZE(platform_fmts_sm8250_dec), + .inst_iris_fmts =3D platform_fmts_sc7280_dec, + .inst_iris_fmts_size =3D ARRAY_SIZE(platform_fmts_sc7280_dec), .inst_caps =3D &platform_inst_cap_sm8250, .inst_fw_caps_dec =3D inst_fw_cap_sm8250_dec, .inst_fw_caps_dec_size =3D ARRAY_SIZE(inst_fw_cap_sm8250_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 5da90d47f9c6eab4a7e6b17841fdc0e599397bf7..8987fcc0cceb8632424e1d686ad= 04ca310d180bb 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c @@ -15,6 +15,7 @@ #include "iris_platform_qcs8300.h" #include "iris_platform_sm8650.h" #include "iris_platform_sm8750.h" +#include "iris_platform_sc7280.h" =20 #define VIDEO_ARCH_LX 1 #define BITRATE_MAX 245000000 @@ -1317,3 +1318,85 @@ const struct iris_platform_data qcs8300_data =3D { .enc_op_int_buf_tbl =3D sm8550_enc_op_int_buf_tbl, .enc_op_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_enc_op_int_buf_tbl), }; + +const struct iris_platform_data sc7280_gen2_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, + /* Gen2 FW for SC7280 requires bigger size for line buffer for encoder */ + .get_vpu_buffer_size =3D iris_vpu33_buf_size, + .vpu_ops =3D &iris_vpu2_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), + .bw_tbl_dec =3D sc7280_bw_table_dec, + .bw_tbl_dec_size =3D ARRAY_SIZE(sc7280_bw_table_dec), + .pmdomain_tbl =3D sm8550_pmdomain_table, + .pmdomain_tbl_size =3D ARRAY_SIZE(sm8550_pmdomain_table), + .opp_pd_tbl =3D sc7280_opp_pd_table, + .opp_pd_tbl_size =3D ARRAY_SIZE(sc7280_opp_pd_table), + .clk_tbl =3D sc7280_clk_table, + .clk_tbl_size =3D ARRAY_SIZE(sc7280_clk_table), + .opp_clk_tbl =3D sc7280_opp_clk_table, + /* Upper bound of DMA address range */ + .dma_mask =3D 0xe0000000 - 1, + .fwname =3D "qcom/vpu/vpu20_p1_gen2.mbn", + .pas_id =3D IRIS_PAS_ID, + .inst_iris_fmts =3D platform_fmts_sc7280_dec, + .inst_iris_fmts_size =3D ARRAY_SIZE(platform_fmts_sc7280_dec), + .inst_caps =3D &platform_inst_cap_sm8550, + .inst_fw_caps_dec =3D inst_fw_cap_sm8550_dec, + .inst_fw_caps_dec_size =3D ARRAY_SIZE(inst_fw_cap_sm8550_dec), + .inst_fw_caps_enc =3D inst_fw_cap_sm8550_enc, + .inst_fw_caps_enc_size =3D ARRAY_SIZE(inst_fw_cap_sm8550_enc), + .tz_cp_config_data =3D tz_cp_config_sm8550, + .tz_cp_config_data_size =3D ARRAY_SIZE(tz_cp_config_sm8550), + .hw_response_timeout =3D HW_RESPONSE_TIMEOUT_VALUE, + .ubwc_config =3D &ubwc_config_sm8550, + .core_arch =3D VIDEO_ARCH_LX, + .num_vpp_pipe =3D 1, + .no_aon =3D true, + .max_session_count =3D 16, + .max_core_mbpf =3D 4096 * 2176 / 256 * 2 + 1920 * 1088 / 256, + /* max spec for SC7280 is 4096x2176@60fps */ + .max_core_mbps =3D 4096 * 2176 / 256 * 60, + .dec_input_config_params_default =3D + sm8550_vdec_input_config_params_default, + .dec_input_config_params_default_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_params_default), + .dec_input_config_params_hevc =3D + sm8550_vdec_input_config_param_hevc, + .dec_input_config_params_hevc_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_param_hevc), + .dec_input_config_params_vp9 =3D + sm8550_vdec_input_config_param_vp9, + .dec_input_config_params_vp9_size =3D + ARRAY_SIZE(sm8550_vdec_input_config_param_vp9), + .enc_input_config_params =3D sm8550_venc_input_config_params, + .enc_input_config_params_size =3D + ARRAY_SIZE(sm8550_venc_input_config_params), + .dec_output_config_params =3D sm8550_vdec_output_config_params, + .dec_output_config_params_size =3D ARRAY_SIZE(sm8550_vdec_output_config_p= arams), + .enc_output_config_params =3D sm8550_venc_output_config_params, + .enc_output_config_params_size =3D ARRAY_SIZE(sm8550_venc_output_config_p= arams), + + .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), + + .enc_op_int_buf_tbl =3D sm8550_enc_op_int_buf_tbl, + .enc_op_int_buf_tbl_size =3D ARRAY_SIZE(sm8550_enc_op_int_buf_tbl), + + .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_avc =3D sm8550_vdec_subscribe_output_properties_avc, + .dec_output_prop_avc_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_avc), + .dec_output_prop_hevc =3D sm8550_vdec_subscribe_output_properties_hevc, + .dec_output_prop_hevc_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_hevc), + .dec_output_prop_vp9 =3D sm8550_vdec_subscribe_output_properties_vp9, + .dec_output_prop_vp9_size =3D + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_vp9), +}; diff --git a/drivers/media/platform/qcom/iris/iris_platform_sc7280.h b/driv= ers/media/platform/qcom/iris/iris_platform_sc7280.h index 0ec8f334df670c3c1548a5ee3b8907b333e34db3..6e05f2542a5457bd0b3b6acced3= bd54d166b2023 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_sc7280.h +++ b/drivers/media/platform/qcom/iris/iris_platform_sc7280.h @@ -6,6 +6,21 @@ #ifndef __IRIS_PLATFORM_SC7280_H__ #define __IRIS_PLATFORM_SC7280_H__ =20 +static struct iris_fmt platform_fmts_sc7280_dec[] =3D { + [IRIS_FMT_H264] =3D { + .pixfmt =3D V4L2_PIX_FMT_H264, + .type =3D V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, + }, + [IRIS_FMT_HEVC] =3D { + .pixfmt =3D V4L2_PIX_FMT_HEVC, + .type =3D V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, + }, + [IRIS_FMT_VP9] =3D { + .pixfmt =3D V4L2_PIX_FMT_VP9, + .type =3D V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, + }, +}; + static const struct bw_info sc7280_bw_table_dec[] =3D { { ((3840 * 2160) / 256) * 60, 1896000, }, { ((3840 * 2160) / 256) * 30, 968000, }, diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 22c7b3410710328b900fc49459cd399aa0e89b02..1f44d3ea337df63fbf5317b9b99= 139a0867267c3 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -12,7 +12,6 @@ #include =20 #include "iris_core.h" -#include "iris_ctrls.h" #include "iris_vidc.h" =20 static int iris_init_icc(struct iris_core *core) @@ -257,8 +256,6 @@ static int iris_probe(struct platform_device *pdev) if (ret) return ret; =20 - iris_session_init_caps(core); - ret =3D v4l2_device_register(dev, &core->v4l2_dev); if (ret) return ret; diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/p= latform/qcom/iris/iris_vidc.c index bd38d84c9cc79d15585ed5dd5f905a37521cb6dc..0727d5d19cb9b7ed1f72ab840ae= 5dfda0162e23d 100644 --- a/drivers/media/platform/qcom/iris/iris_vidc.c +++ b/drivers/media/platform/qcom/iris/iris_vidc.c @@ -9,6 +9,7 @@ #include #include =20 +#include "iris_ctrls.h" #include "iris_vidc.h" #include "iris_instance.h" #include "iris_vdec.h" @@ -196,6 +197,8 @@ int iris_open(struct file *filp) goto fail_m2m_release; } =20 + iris_session_init_caps(core); + if (inst->domain =3D=3D DECODER) ret =3D iris_vdec_inst_init(inst); else if (inst->domain =3D=3D ENCODER) --=20 2.34.1