From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796408714; b=c9owk9+V2Eij0FiU3RiJoDAQNhLGe5ff5wpAwHhfRWoX3uQ4bzXEMguDaScM2RgJap2+ aUcJJ7y6I52ZDPNex8TNdAGN1DkI/FpBKpernpVsZmIE3mruvNbhUp2hVkQF+rCScFsWA PPihIFNcuCphTjUOFJiuUEoAb66Omb/wih7WT49CasYk5I9UezIzQt5kfTaikfMG7yoQJ HDU+c+YZo1zPGoZp+kqA02/UhSOzGOsJ/4FJrnEbfjmtwAjBKk2lbBGx56breVXEsEFiq g8DsOq1vy6e9PXMG5Syws3W8y5g3fTXNd4ZIgcaRkj3bGUIg68pFCuSODPHaYTz3fWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796408714; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=FMj+tJhNM5yr9GNyWe55M7WXNmsaW67OIw7kyZkVtyc=; b=EGff06M0gX2ggzK7UPliCfK/n8tAMZimwrRO6iWsLSpW68AvS+MxmYYIIJlYTuqwyKlU 3wjct61BqPFwF9WY1ixTE/FJI5bXFENPR8zLePhYXgvzGyGTm0Ju2OizlRFH8CAyS2aZ4 xFZKwe1EmrJS44g29pZSUfgHZ0YyRo85gdzA7qpt+pYsrzjXLpRAj8IwBqnEwMHCqSzop Aa7wxuFfqwokmXH4aVhQQgF/Zq7Hvwp0GW7Q6ViXSCgfRpB642v9Szx3pPOayz+NnRBm7 kB39HeDNZcHoPknjIY28xQt3wsSI7F4YnY4JN8zkHiaxwWko0gER0Ui0DxVjd0t2OyQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=eTqJQSGJ; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=eGPVrMz9; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ACEE606A33E for ; Fri, 4 Dec 2026 18:25:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2ACEE606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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.a=rsa-sha256 header.s=qcppdkim1 header.b=eTqJQSGJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=eGPVrMz9 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4I6aYl3105841 for ; Fri, 4 Dec 2026 18:25:12 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= FMj+tJhNM5yr9GNyWe55M7WXNmsaW67OIw7kyZkVtyc=; b=eTqJQSGJiPBH86jo c1p9pkMoTQ4z2GVS6J/0Bgzs9E4ynollYr3OKoI/7zIbYsqY9q8GmJCSGLqMNeL3 U/IA1n5qu45CPNsEmjTC3NLAboLnFJiUebZP2/H7iw36B4hxKCznOJnPC61hCHzf Q/xPLHyaGIhB0bfN7ypejNG+87PAvt7r5yY1Nyb5xaLaBx31maS2sqNAJJx8PttZ 0DKrCqHEhV2hcvAMuVAlCP/p8LkZLkpURgfeQxdRqMMNRA1ovSEASEYkNVt0aLpA WOh6ue6zWoOSur4jZdNgUpm1Tjox/mZxrIP2x4rzrDM9Bz3+2vXff3LrkLzqtm/O IlFtNg== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7rjfa2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 04 Dec 2026 18:25:12 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-9495c71055bso251140685a.2 for ; Fri, 04 Dec 2026 10:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796408712; x=1797013512; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FMj+tJhNM5yr9GNyWe55M7WXNmsaW67OIw7kyZkVtyc=; b=eGPVrMz98nG9GLz+I1sRFZ95/77PeMXRyD7qYFHvyEcDhP5A2gK1sd6+ADENehkkmb fyy2jjlovHtoz3tNJbjJwkmkc2eF2KnpQX2bKClC0dLCIbWhCww12DUDuEEszgiqmcYs BlYxdPxmwPxGIP5jRZzy3VOcSESYe7SjuonEORowg/8q9SV9u/KUVtG8h12O+0Fpy5ey CFKgz9PMR6P1Q5VdD2BbOgM4MDTaO2MdlWieGpqOm5coNJEjUiTNxGHVHvHqz9DFHRHU OsXD0wPGWkM7oUK5Nv17IKk4QpvNqqRSrGdbuDfTKnHdO8j8H1nWEjVH8iBSKJBsPNvD HtXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796408712; x=1797013512; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FMj+tJhNM5yr9GNyWe55M7WXNmsaW67OIw7kyZkVtyc=; b=lvogAgJ9Mjynxz+7s7kaCkNlZUHqaQfO0XiGiB9DPRi8WbwH4yG79WH1a0EaFuXIMo /TbWm1XidUiA+JxeZBQYmPAV93uoC+Kyx/IuXBu/Uw+bWMLLA4EpOumPWJs4X0rF3lvh vISVsTYxuJQ9x7sWM4rMz+shcqMRTWxearD6STS70RrHSdVB5XA4zdt5l0vwpaxnfIwx wcrEICtLoaUlbPx8qnN2YCH1FfaHQQyvXPkQOdnbYJDz3NXU3+oyGbjnYY0wr8LLq8rM 1OOJ8qwGQbUzxl95MCwD15d/qF4kR8E4iHqUQ3PX8Pg/Jo6yXiCwJ/IMOeNjYqIJ3oT4 +bjg== X-Forwarded-Encrypted: i=1; AL+hErH8Oa+Ho5rF5rK/9DZNW1uVbj+4raOL6G2DKfaVF9CeTbVXoDmTWlxdQjy89IQFmzNjAfiPjx+BCvla1rY=@vger.kernel.org X-Gm-Message-State: APuU4Z93HUb0w46D8VO78ijwNAbpxhvNtMB3viDJon+VxV2bmV2bU1zb rOAcudStaSvNGx/AgEIr3OGNNBvC8CcLRObkJ49CZqi6uYjCxTrUIHisTCnlTkKcA3vY9fVNXJg baDzcIxjSqvn6MfmdtNfASY5IVryDf6IYkDA5LHXtqf/uTITBaj/wr9ml7BV7ev1ufM8= X-Gm-Gg: AZFdTZcU1XH+FgwH81/umucPspVs4uTGd5X4wweKo1XNP2PT6oz9+o9b7KlI/dV/zlz W1tLR3IxxkE5PuvXHFC8tPdrLj4YgUG8R5TelaA1m5SEzppnlQ5SFNoP0CkEswumCWs+pN6rlwl rnS97qL+NNbvTw/PT6vSDZ5iizcLTIH2O4kni4LxfgslPBTB+aAxhdAzduHy80pb8KBuBw61Njo e9GjAxMnIw06MdfO4BxKkekWwAuX1HqBlqml9KWPwsHj4iq6sLbdMgNyuHqVS365r6v3b1wPMWF 5m74Fb/qonkZPSVEo6LJkYB9baTAEVnz7vrckfeiV+1bQYz4DIFPSZUupshd+grrAAp+PG6n86E 0F4M/kdThV9lGvUGOTU7ZhQ/C1or1lpDw4JdZ6n9wYJEMTsOEI6EgJjDukesN8Mtp9N3H/qq9KE IX6QXrYGTn8jNBs7Y5zyWvU1HYhYtuTW3fk5qvSYTu2G06qSq/DBbtPdCL3OZrZw== X-Received: by 2002:a05:620a:4554:b0:93e:9292:1b96 with SMTP id af79cd13be357-94a82698c81mr478635885a.3.1796408711301; Fri, 04 Dec 2026 10:25:11 -0800 (PST) X-Received: by 2002:a05:620a:4554:b0:93e:9292:1b96 with SMTP id af79cd13be357-94a82698c81mr478630585a.3.1796408710823; Fri, 04 Dec 2026 10:25:10 -0800 (PST) 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-3b0037ac7fasm9647221fa.25.2026.12.04.10.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 10:25:09 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 04 Dec 2026 20:24:46 +0200 Subject: [PATCH v2 05/13] media: iris: split Gen2 firmware data for vpu2-generation SoCs X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261204-iris-vp8-v2-5-462f9b48d246@oss.qualcomm.com> References: <20261204-iris-vp8-v2-0-462f9b48d246@oss.qualcomm.com> In-Reply-To: <20261204-iris-vp8-v2-0-462f9b48d246@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12270; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=fzS4X5II3ewyCkitI3B7Q6wDuTcxO31cEvBaecB/psU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBrEwV0DX5LbAQ6iOL48v9kz4uEOzsbEdGR92txF NQp59KASE+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCaxMFdAAKCRCLPIo+Aiko 1YmWB/9Fu9K+k8g9IJEemb/bPEkKfA5arLezqjeHd5Ujrgua5FUYlPPwntw8ayntcxrHUhU2VNd PwSPArVBdKsTqKn96wF7LI/CNQiWl8rtWNByeZviIoQiHo3w+by3k3TBflUde+StBmzYRhe+pB9 5xpFbPFF7hjgErhJezuDb7illwroKpaNlbRlilPW2zzRkmLvYnMfkJ6xhriy8fF2dat9O4ery+9 Zh8l3Tmh9pNpcom7ROjRL3T/XuuTMNTqmaMUTcY6079nLpv+f7oHLUtV6yTn0eUeMMXdqryKGCQ Tbw/sXa87oer4jGCCf+VYrKRpRdhXJD4UD5gJvSwZ9qOdcVX X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: 1ShkeTGxsN4jxC-nVpZzkqI7tg-IlZJL X-Proofpoint-ORIG-GUID: 1ShkeTGxsN4jxC-nVpZzkqI7tg-IlZJL X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA3MyBTYWx0ZWRfX/YUHABrPdYc3 oK8//nemTHfVBq1tWoSE2IvRlXaYncm+mdd3GeKVDc2J0tVq8AHzc19dCASmcyMXD54qHr3Z2vN gGujVy2/UJhWKOC8/YTyFFUDGeLliUE= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA3MyBTYWx0ZWRfX1wuFnoccF/qG 6LUijftPjPT6gcB/9a/LyTPHZtyK/H3T/IAv4lIZ/azqFYVmE2zUxOkSrK32nLAnz9lsL2VzemV jy5a4asl2k5gJRaBVYz9OUBJDB8F8GgpAUhFsvE5cpciKZU73cHH7NFCFFDqwj4IeWZe2is3Dc4 ADjWJCKZogu+ZyIh900n3xXg/uKiTAP+mEYvIlUUJ3YvhaTxPW/EsDmJjr5AkVKM1IAfRvnsv5E nH9OJtFx+ZPCZOXuVs9u6yi49meZf78qgE0mccHaLb4t1cMi8qkuEdeUY60zIrepknulzCBwcFy Sq4N04P3Ym5Vaz9G7OqQBTaMb8476mzdXi3duZ/ayplvxGsCXSTWDxjbpMUYqHC8m8qpI7stMBe +ug0AAw3vmf+x0DwkcSJR55ISr5zSQ== X-Authority-Analysis: v=2.4 cv=PtEG/AM3 c=1 sm=1 tr=0 ts=6b130588 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=cEzmOCKoPSdgX3iFUHIA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_04,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040073 The single iris_hfi_gen2_data instance is shared by both vpu3x SoCs (sm8550/sm8650/sm8750/x1p42100), which support AV1, and the vpu2 SoC sc7280, which does not. This is harmless today because the list of advertised decode formats is kept separately in the per-SoC platform data, but it prevents moving those format lists onto the firmware data where they belong: a shared struct cannot describe both an AV1-capable and an AV1-incapable generation. Add a dedicated iris_hfi_gen2_vpu2_data instance for vpu2-generation SoCs booting Gen2 firmware, using a decode cap table and config parameter lists with all AV1-specific entries dropped, and point sc7280's Gen2 firmware descriptor at it. The vpu3x SoCs keep using iris_hfi_gen2_data unchanged. No functional change: sc7280 already did not advertise or accept AV1. Reviewed-by: Vishnu Reddy Signed-off-by: Dmitry Baryshkov --- drivers/media/platform/qcom/iris/iris_hfi_gen2.c | 247 +++++++++++++++++++++ .../platform/qcom/iris/iris_platform_common.h | 1 + .../media/platform/qcom/iris/iris_platform_vpu2.c | 2 +- 3 files changed, 249 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c index 79bbd06ef8d2..79fb74af6ea6 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c @@ -1108,6 +1108,189 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = { }, }; +static const struct platform_inst_fw_cap inst_fw_cap_vpu2_gen2_dec[] = { + { + .cap_id = PROFILE_H264, + .min = V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE, + .max = V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) | + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE) | + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_HIGH) | + BIT(V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH), + .value = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, + .hfi_id = HFI_PROP_PROFILE, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = PROFILE_HEVC, + .min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN, + .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) | + BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE) | + BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10), + .value = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN, + .hfi_id = HFI_PROP_PROFILE, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = PROFILE_VP9, + .min = V4L2_MPEG_VIDEO_VP9_PROFILE_0, + .max = V4L2_MPEG_VIDEO_VP9_PROFILE_2, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_VP9_PROFILE_0) | + BIT(V4L2_MPEG_VIDEO_VP9_PROFILE_2), + .value = V4L2_MPEG_VIDEO_VP9_PROFILE_0, + .hfi_id = HFI_PROP_PROFILE, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = LEVEL_H264, + .min = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, + .max = V4L2_MPEG_VIDEO_H264_LEVEL_6_2, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_0) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1B) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_1) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_2) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_1_3) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_2_0) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_2_1) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_2_2) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_3_0) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_3_1) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_3_2) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_0) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_1) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_4_2) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_5_0) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_5_1) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_5_2) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_6_0) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_6_1) | + BIT(V4L2_MPEG_VIDEO_H264_LEVEL_6_2), + .value = V4L2_MPEG_VIDEO_H264_LEVEL_6_1, + .hfi_id = HFI_PROP_LEVEL, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = LEVEL_HEVC, + .min = V4L2_MPEG_VIDEO_HEVC_LEVEL_1, + .max = V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_1) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_2) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_3) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_4) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_5) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_6) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1) | + BIT(V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2), + .value = V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1, + .hfi_id = HFI_PROP_LEVEL, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = LEVEL_VP9, + .min = V4L2_MPEG_VIDEO_VP9_LEVEL_1_0, + .max = V4L2_MPEG_VIDEO_VP9_LEVEL_6_0, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_1_0) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_1_1) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_2_0) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_2_1) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_3_0) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_3_1) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_4_0) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_4_1) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_5_0) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_5_1) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_5_2) | + BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_6_0), + .value = V4L2_MPEG_VIDEO_VP9_LEVEL_6_0, + .hfi_id = HFI_PROP_LEVEL, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = TIER, + .min = V4L2_MPEG_VIDEO_HEVC_TIER_MAIN, + .max = V4L2_MPEG_VIDEO_HEVC_TIER_HIGH, + .step_or_mask = BIT(V4L2_MPEG_VIDEO_HEVC_TIER_MAIN) | + BIT(V4L2_MPEG_VIDEO_HEVC_TIER_HIGH), + .value = V4L2_MPEG_VIDEO_HEVC_TIER_HIGH, + .hfi_id = HFI_PROP_TIER, + .flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU, + .set = iris_set_u32_enum, + }, + { + .cap_id = INPUT_BUF_HOST_MAX_COUNT, + .min = DEFAULT_MAX_HOST_BUF_COUNT, + .max = DEFAULT_MAX_HOST_BURST_BUF_COUNT, + .step_or_mask = 1, + .value = DEFAULT_MAX_HOST_BUF_COUNT, + .hfi_id = HFI_PROP_BUFFER_HOST_MAX_COUNT, + .flags = CAP_FLAG_INPUT_PORT, + .set = iris_set_u32, + }, + { + .cap_id = STAGE, + .min = STAGE_1, + .max = STAGE_2, + .step_or_mask = 1, + .value = STAGE_2, + .hfi_id = HFI_PROP_STAGE, + .set = iris_set_stage, + }, + { + .cap_id = PIPE, + /* .max, .min and .value are set via platform data */ + .step_or_mask = 1, + .hfi_id = HFI_PROP_PIPE, + .set = iris_set_pipe, + }, + { + .cap_id = POC, + .min = 0, + .max = 2, + .step_or_mask = 1, + .value = 1, + .hfi_id = HFI_PROP_PIC_ORDER_CNT_TYPE, + }, + { + .cap_id = CODED_FRAMES, + .min = CODED_FRAMES_PROGRESSIVE, + .max = CODED_FRAMES_PROGRESSIVE, + .step_or_mask = 0, + .value = CODED_FRAMES_PROGRESSIVE, + .hfi_id = HFI_PROP_CODED_FRAMES, + }, + { + .cap_id = BIT_DEPTH, + .min = BIT_DEPTH_8, + .max = BIT_DEPTH_10, + .step_or_mask = 1, + .value = BIT_DEPTH_8, + .hfi_id = HFI_PROP_LUMA_CHROMA_BIT_DEPTH, + }, + { + .cap_id = RAP_FRAME, + .min = 0, + .max = 1, + .step_or_mask = 1, + .value = 1, + .hfi_id = HFI_PROP_DEC_START_FROM_RAP_FRAME, + .flags = CAP_FLAG_INPUT_PORT, + .set = iris_set_u32, + }, +}; + static const struct platform_inst_fw_cap inst_fw_cap_sm8550_enc[] = { { .cap_id = PROFILE_H264, @@ -2055,6 +2238,70 @@ const struct iris_firmware_data iris_hfi_milos_data = { .enc_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_enc_op_int_buf_tbl), }; +/* + * Firmware data for vpu2-generation SoCs (e.g. sc7280) booting Gen2 firmware. + * These do not support AV1, so the decode cap table and the config parameters + * omit all AV1-specific entries. + */ +const struct iris_firmware_data iris_hfi_gen2_vpu2_data = { + .init_hfi_ops = iris_hfi_gen2_sys_ops_init, + + .core_arch = VIDEO_ARCH_LX, + + .inst_fw_caps_dec = inst_fw_cap_vpu2_gen2_dec, + .inst_fw_caps_dec_size = ARRAY_SIZE(inst_fw_cap_vpu2_gen2_dec), + .inst_fw_caps_enc = inst_fw_cap_sm8550_enc, + .inst_fw_caps_enc_size = ARRAY_SIZE(inst_fw_cap_sm8550_enc), + + .dec_input_config_params_default = + sm8550_vdec_input_config_params_default, + .dec_input_config_params_default_size = + ARRAY_SIZE(sm8550_vdec_input_config_params_default), + .dec_input_config_params_hevc = + sm8550_vdec_input_config_param_hevc, + .dec_input_config_params_hevc_size = + ARRAY_SIZE(sm8550_vdec_input_config_param_hevc), + .dec_input_config_params_vp9 = + sm8550_vdec_input_config_param_vp9, + .dec_input_config_params_vp9_size = + ARRAY_SIZE(sm8550_vdec_input_config_param_vp9), + .dec_output_config_params = + sm8550_vdec_output_config_params, + .dec_output_config_params_size = + ARRAY_SIZE(sm8550_vdec_output_config_params), + + .enc_input_config_params = + sm8550_venc_input_config_params, + .enc_input_config_params_size = + ARRAY_SIZE(sm8550_venc_input_config_params), + .enc_output_config_params = + sm8550_venc_output_config_params, + .enc_output_config_params_size = + ARRAY_SIZE(sm8550_venc_output_config_params), + + .dec_input_prop = sm8550_vdec_subscribe_input_properties, + .dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties), + .dec_output_prop_avc = sm8550_vdec_subscribe_output_properties_avc, + .dec_output_prop_avc_size = + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_avc), + .dec_output_prop_hevc = sm8550_vdec_subscribe_output_properties_hevc, + .dec_output_prop_hevc_size = + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_hevc), + .dec_output_prop_vp9 = sm8550_vdec_subscribe_output_properties_vp9, + .dec_output_prop_vp9_size = + ARRAY_SIZE(sm8550_vdec_subscribe_output_properties_vp9), + + .dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl = sm8550_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_enc_ip_int_buf_tbl), + .enc_op_int_buf_tbl = sm8550_enc_op_int_buf_tbl, + .enc_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_enc_op_int_buf_tbl), +}; + static const struct platform_inst_fw_cap inst_fw_cap_gen2_ar50lt_dec[] = { { .cap_id = PROFILE_H264, diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h index cddab9a9c375..6318dbaab7e8 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -58,6 +58,7 @@ extern const struct iris_firmware_data iris_hfi_gen1_data; extern const struct iris_firmware_data iris_hfi_gen1_ar50lt_data; extern const struct iris_firmware_data iris_hfi_gen2_data; extern const struct iris_firmware_data iris_hfi_milos_data; +extern const struct iris_firmware_data iris_hfi_gen2_vpu2_data; extern const struct iris_firmware_data iris_hfi_gen2_ar50lt_data; extern const struct platform_inst_slice_caps iris_vpu2_vpu3x_slice_caps; extern const struct platform_inst_slice_caps iris_ar50lt_slice_caps; diff --git a/drivers/media/platform/qcom/iris/iris_platform_vpu2.c b/drivers/media/platform/qcom/iris/iris_platform_vpu2.c index becbe3776544..923898067540 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_vpu2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_vpu2.c @@ -32,7 +32,7 @@ static const struct iris_firmware_desc iris_vpu20_p1_gen1_desc = { }; static const struct iris_firmware_desc iris_vpu20_p1_gen2_s6_desc = { - .firmware_data = &iris_hfi_gen2_data, + .firmware_data = &iris_hfi_gen2_vpu2_data, .get_vpu_buffer_size = iris_vpu33_buf_size, .fwname = "qcom/vpu/vpu20_p1_gen2_s6.mbn", }; -- 2.47.3