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=1796408713; b=RYQg8ICbrHdB/MCBusT4ZqwqnrfLsZbKfGqreDAoLCGDsOLj4zSZNf3ShKIDO4LP73V9 1hX8pHU72xjTZ18RhMuenwbBI5dKsNK/tz+Mkgy+zBbOTlzL+h2D2K+jE5rqV6qrRFu3g 8OvJtq+J3t4gv6Sy4u2J+0wbXBUkcv7R8C1/SOYVL14xsZCfqZ3NQMx7IZyBW/pB8YtIk zoVHcG8wcpAjxnmQrUY1M2wRqqXP6w+i0VGWAG4raFPPflSnA5aOpPfuVM3sqNwiBPgl/ Gq6Dej/YCAZ+R/8eGH4eAf0ICKxa7kgEeZfcDDWbLjkI4Z8LWKW55W+z35EXgeZJ/dg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796408713; 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-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=FMj+tJhNM5yr9GNyWe55M7WXNmsaW67OIw7kyZkVtyc=; b=LWkn1300FPJhBF2D5obcRr+gu3PmN/ys8MJ4AtUOuM4v6LgVbs7SRMAnMRvqh7WVaYjG P+JktJnReB72ubo783L/pFGnEY78WKKSdLXIO10bdRtwDOtOME0QDmAeDuQeJjoXV/fqM qNsRvTkjH4Tr4vtXcgIaoyCcm+5Ut/Hk4274eBte6nlylZgcoYPDTjtuAoDptHIyqz4iC ZJq/rIJMizlyxsiz+Al8joddgy5uXimrO6d1SGbN/AfiXapfwaUXIqgAM2oc/9QCNSsFv ml28HF1rpvuqa1eqcUzPUVlmIPpAIoBD6SgZuoFxJJimqRhxoafB/ALOGaZPJZsGZWQ== 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=XVkgr+lv; 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 2AD73606A681 for ; Fri, 4 Dec 2026 18:25:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2AD73606A681 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=XVkgr+lv 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 6B4I6dHr2734039 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-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7q2eed-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-f198.google.com with SMTP id af79cd13be357-93f2c0e6653so198563685a.1 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=1796408711; x=1797013511; 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=XVkgr+lvVX1Iv3uP+lxPoaBEVU5x7mJKtN7Dp/n4hRU6TPuJDRKJaGpGj+LvzR1P/b 9IFhH/trEajGiMYGifcHgrsJw6SVQEIHRrfR4j9Sc4pTjEyxSwKlAjRHsmhC2OtJOlSF 0nXY+fHZhB83tss+6kHUhwuhrsY2b9kU0JaT3Bp5zdMY+voId2YNJIZgltVE2ZyxSmiM vuxIILsz2vam++qPA79IyhDxdIX/QFY9b1HDxbp4eH4Qv7axim7hE3+1ZMFDB4yaZef4 NGSjsr2jkKeextIHmhRV5joSTBmZm2JEILf8xJ9OKigRI5vjDJnLUp3uynD98Gn7UcK6 lbQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796408711; x=1797013511; 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=O4ozr1Hq4umHqUiWNC9NROrv/qaxjXHCB/KMM59s5KmEyUQ6chVLydt0fq9vzZaAS3 iAE6PsdNTB+42tJjSwnI7DsukoBbbGi5r6nLDaLubbnFk1o7UJ/pDQyhajdSMHhnLIXU S8gf9Pl+NKB7kvc92gqCL8DYSdBQufZrnNnXCcnTKII1/QEXO1VCZxIj6uQxE7kTrOSc yRKcw92ND425CxIAP0uCVZPMbVoAW4dbQ2koQkl9k88ZHap16jrgAuqDQBY++7ZutPtg WbPO6Bg8IDVmxJEZMH61jDCWb2XvB8wAT8BF2BID6QwwgJphI7uTgpg9NAPgNa+xJZ2W HLLA== X-Forwarded-Encrypted: i=1; AL+hErE0IcRYJ0ed4vF/dAC8FAzPO+Vc2BPhmNulj8R2SBIesk7zMQnapiaUaYbOmzrZBKnY02awXFPMvd5SXUEA@vger.kernel.org X-Gm-Message-State: APuU4Z9Z12ygId1JPU+9hUGbWSqUvgooV29Ckdvyg+SZQn7PnNRdnNCX 5pNus96jo01EB5MarPiZPMEBHifY/HoIMYyz9urSbmdgcrzsiWQD0JK/EcvrSho694Ran/drSUj fcWRaGaEJhhTet6UPDj2Mzsrjgr52wpwhBIBhUfaybcC9NqTGGN82E3bm5boU99P5TS8Q X-Gm-Gg: AZFdTZf1jMwsR2HPA+ZEuP6RW0wuqRlTFPZ79cnhkuyAUwURqv+C9GU4xjo0vm3/U9b n2quvsweqh4mmNzKgOYFM+sD3sHdj5smwy71gLWqGr2EpI3SwWHtHvFr9MWg8KpJQ4m5MTkO6tA GEmIZ2mE03AisCcEnaZhKWTdZt8FH7LrwObobsaXuEVME2/wbClWv9dDP3sXlYdmFq1W1W0+fo1 AK2FeUp+SiiRwfUEuI3nO6D25TX8EkTEmhr0PDXfPNQL4h68ExpvyPASjxTW6YXTUHbokK1YgFD NvDribI01X7IXPdulezjQpcxb90j0PcwLSS2RIZS4CA6qAErqv3FDQxHBFgH7+yEt3nf69Piehe 6Hg9CNLnf7cCrQfovPduFe6T0dakQgPlvJ+4sQiMkqDgWPCeDEB2f/cs/0NUHVEUP4Izl6g9Nor XtnQk/8DmEL0gFqJWpnT4j/n30VmzQJs21j/q4GOn0WlAVJhC7myT2cOgPlBAztw== X-Received: by 2002:a05:620a:4554:b0:93e:9292:1b96 with SMTP id af79cd13be357-94a82698c81mr478635785a.3.1796408711300; 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-arm-msm@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-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA3MyBTYWx0ZWRfX0A7H3DPRPQCb rP6YPqckJJg1aKnpFGeDbEPCXnEOrQHQtWc+Q+aTHVixv0/DfPZrGWrlV9icmdXzito5QrQ05+9 3QtJF9ujsd23T8PQ2HAFHMSdydjZgF0y/XCUhUW8wToLvC49Yhyr9ClLZkfDuIbKq98cqJJQcpH CjMul93nzO6qOMSlQhy1Zj243l387QurrjQ1p11fvSwJpJt85IC/LjR1lIkI0UoZivjtiuJsJiQ H+4ZNH3k8wZ7WBlRtj6Ze3kWVkxVd2m8ZlGIGFset5YSC8AlcFWWhM0LdwLo7gpsHldxjaz6R3L VuytohJjQORHqUN42QVr5x4r3Bl2tjzc6Wx+dKzAWWtd+J78pzCxqh6YNx64gYP+3O+gl6Hc/+V VDdJIDxFJOY04XIqw7ypZ3hsBZXgEJGUy5jKAaSvPUKoJJauETl/rihgrnGW1advP0Nhnfrib6g 3U7M314kx+EFsIKz4uQ== X-Proofpoint-ORIG-GUID: E5uQ70B9uxA43OFyHyuT4fT4ZDRPxwZw X-Authority-Analysis: v=2.4 cv=HOtWhYtv c=1 sm=1 tr=0 ts=6b130588 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=cEzmOCKoPSdgX3iFUHIA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA3MyBTYWx0ZWRfX6/Rf/KW4/QvI Owhs23ZeuZR+RGb/Cs6dM/mMZ8FeAvDDo69YxlzeIitPbCeG/3wYfNGpQZPvzYsmo7TnRWyv/UH KX+2lMqPMPkPTlqDx2ltzQJIhkd+XQ8= X-Proofpoint-GUID: E5uQ70B9uxA43OFyHyuT4fT4ZDRPxwZw 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 suspectscore=0 priorityscore=1501 clxscore=1015 phishscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 impostorscore=0 spamscore=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