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 836353C10A1 for ; Thu, 9 Jul 2026 19:37:13 +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=1783625836; cv=none; b=jCfpW4AoWHS3nSvXtkEIR5169lX5xmh9mmGBDFhO9JYmY1roccOKZGvf2iIctkuYagaoi5eWIj6/XnMHZcHp5mLQueyx0Rv2mGUlde4N2yoKNkfi4gPNJ21JyH4LqDp0Vu8xC+sFhCqMoSOk69+4+oMUWA4kQPx3PPqxAr3Oq84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783625836; c=relaxed/simple; bh=AqVrBTxKvYeAg6zSvgnDnZ9MHnMZAXziqcZ6PACjEwM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jGJ5WRUpHQ2gWAMxXI+uqq54cSybMQABpCQ9MDoDP8OlWgZ8CxabIjMylKDs02mmCrbysRmYA4hX9DH6ktLylySXqdPIgljcs61TnwK7rhDZqfeYnhhICpj+ec2IHtm+ahK+hUern+wR5xojX7sDcUdWCrBtwfCqYr62e40fzZ0= 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=YDsUY7Z3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YIiGv2/O; 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="YDsUY7Z3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YIiGv2/O" 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 669HX5pF2327420 for ; Thu, 9 Jul 2026 19:37: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= EGH+j49WCh2S3pxQP4EwCM738Fnkkvf5vIJ3vuUlwzM=; b=YDsUY7Z3JvQyBjy2 Qt272lEge8VcHkb97Ol40ZzTzC1xPL51HTZfTBHX7cPPf1DcsK2/1iSlNRNaa4/8 64NapIq2Lay8m5C/cuyIZr4V/mi+PSMy4JPuoCF5D6AooRYWUKzMnqcQfFb5CGUK AuXch/hEY8wHlhSmMMTpceNndt19jlL/Xq8orMGek+tZSD0Ym8pViz2V2V9mYcHd cFNd2xjW7y3MVQnGZwsIau4ZzKzFdTArB7ytEm4hgKN1aTw3vBlJsJnirABc85Yz tHSmA/7fImXdt9zeuysuWdznqHP55hLDqWf9SnzJRETTLIiUZu2aMiImXo7L6gr/ C40azg== Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4faf24rx7a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 09 Jul 2026 19:37:12 +0000 (GMT) Received: by mail-vs1-f70.google.com with SMTP id ada2fe7eead31-744e80385dbso60335137.1 for ; Thu, 09 Jul 2026 12:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783625832; x=1784230632; 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=EGH+j49WCh2S3pxQP4EwCM738Fnkkvf5vIJ3vuUlwzM=; b=YIiGv2/OGSUWp61kl7ZaFSuqUDl+wzOO6C/koquA2dhTOSlHWovG4zzLOHqkhyYkkt 3fFzG6tIbtecHJAL5ZN481v3vLFstlLAJzKCa5BL9DfJqR8gpGsPwV3dqOXo9Pp9VV/d 19hHAeszzIBq3uv1SL/SBK8mdaZ36VL8QD7/zL5HOVmSteC8M0TZ+sCxM0fDbXEMXh47 ++MEiM/6E5hHAQx5LUEakGFRyj6Mmrc2e2Xwa03SR2UFLB+lmIsPlQGjY6sY0ojiFNw8 ojRCCsKGc84yAhvbWM4oyjGX9PUnA6svOg3JmLf3Xi14MNmDIE0fe6BXJW568Rkb+uXQ JjBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783625832; x=1784230632; 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=EGH+j49WCh2S3pxQP4EwCM738Fnkkvf5vIJ3vuUlwzM=; b=RxFPNUca1trEcz4vVrJZfWRHQrFISoOL5IxUt0mlPYiS8VM9RmXPh+SwJl39rG3uli cqdcJZRRPdIogdg6scl9TdLDGpQGyCbTgcXHFLYllXKm2pNhvBxGaRTAAeSdk0hXvgOR WetAhDNGtY4Oyu767y2TV02L5QrqUhDn+0Etadsy5GuK5PFNpaJCV7HB2L7UbiYN670R xoY1fsIRx927ED4k6oCrUoZLjdzLQlVfkWoVQ8+sYUYaUCn33uVN8SxHTfk2ywJTsfVg amHJz5x+v+m7vpJEcpTPt4JXnyVAvI1XN3MCFtIksrih4BukzUXQq6EHIysIA3ROYhuI opLg== X-Forwarded-Encrypted: i=1; AHgh+RrUl585WnruTI7WPOwxlKJbOQ/KgI2WTeD+X2MEJ0dJ7oN5liXgnyMyQ49O7bo2R6PRAv8iSGWR5kR6nsw=@vger.kernel.org X-Gm-Message-State: AOJu0YxLoKfI9cCY0ESGTelLwXAGpxUdD0V1YDF9Y6Juq4olpLzWOAqf QcZygIBZQPGGZCNqGrkcbzuVj3s602qZzGzNe2x39oJfv37tm8EFVayGYC9p21draapW1hlTcfj 1/35f9S+fFCDZi6zACrJymNx+OH4kz8PnAK3we1meynXckPGtTLTqoADDUHbdQVjU8wY= X-Gm-Gg: AfdE7cmyvwzaaAr5JlwtNoTBVj/DoRLBvX2h8bo/P9RTQhF7zR8JIFB/4+UjWP5C7bO BpQ7kdDUJE7TYCxWqqFBbSjPwLAb90JOsltvAQX67ANN7HivrcT1pj+bfLo+9JTCdH/dXAXRMNe 9LbzXxoGzeJK++eacVfSrJTadIKk6/emnR69asnrhCZ/cS4IraDfmalT6MltWuQkN5+mscyTQes nusNLitvCVSd3BJH3JgH1zm/rws4Q55r2ziySD5imbtoonZL8Wy7E8VP3YFsPfpA+lfzPwWHfcC uGXfOdDQzztTzZj4tGz/37bejJb7aan2UZR5ggSI1+I5VaQVurQlRltuKVYBEZol8rAw7pk4eKI siaEg7INZY2e2UZcUAH4Utq43AvuCzJlIuIUCOq/xojxmuXNkJnODIqE8zn0q3+uhFGdTVUm38s LZl0Fq8WVOUhYnF1I+ccED//NV X-Received: by 2002:a05:6102:50a9:b0:73e:9fae:5848 with SMTP id ada2fe7eead31-744dffe4f76mr5479197137.12.1783625831907; Thu, 09 Jul 2026 12:37:11 -0700 (PDT) X-Received: by 2002:a05:6102:50a9:b0:73e:9fae:5848 with SMTP id ada2fe7eead31-744dffe4f76mr5479161137.12.1783625831330; Thu, 09 Jul 2026 12:37:11 -0700 (PDT) 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 2adb3069b0e04-5b01caa635dsm46400e87.62.2026.07.09.12.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 12:37:10 -0700 (PDT) From: Dmitry Baryshkov Date: Thu, 09 Jul 2026 22:37:01 +0300 Subject: [PATCH 4/9] media: iris: split Gen2 firmware data for vpu2-generation SoCs 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: <20260709-iris-vp8-v1-4-6af3ab578a7c@oss.qualcomm.com> References: <20260709-iris-vp8-v1-0-6af3ab578a7c@oss.qualcomm.com> In-Reply-To: <20260709-iris-vp8-v1-0-6af3ab578a7c@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 X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=12113; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=AqVrBTxKvYeAg6zSvgnDnZ9MHnMZAXziqcZ6PACjEwM=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBqT/hdDZkj/RPXcIlNuNeKUNsUV5cuqZllP1SMC DnXJWn/xXSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCak/4XQAKCRCLPIo+Aiko 1Vr2B/9auw4ohj0+RYh13jM638725Gt3QJgRaGr3RxbZ4ckX0nScrP7fFeoqPp6DzAzqPxMUNqT Prh4mKoq7taSzioFGutDNWbmAyn2dFqDGNcMQIFLBEpaEuUX/pApBwtNgsegatM+bPEVSzAlfg2 gpF4169TPpzatvlCnYOscHonNN0DoT21tO4PcnoGSA9eXSWbl14lrlIJmcee0XIkKAnIjBVlssf qrpW5nbqAKvnUShTh7Dz8Rkty13JQuew/qC9yYvl/8kVgYe7u92QKHTuUGgy7xmsbo4FGfzVYzL U9ooWIBJW6YUTaYo7ds+wzy/3x50K7lYSv4Dj+xOQz8C9jOQ X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: n2nGL_pPV2-eqWsowuESr-tuQpK9SAr- X-Proofpoint-ORIG-GUID: n2nGL_pPV2-eqWsowuESr-tuQpK9SAr- X-Proofpoint-Spam-Info: AW1haW4tMjYwNzA5MDE5MyBTYWx0ZWRfXzhfWmryDhKln KNwuxghsEV96i2KgpDrJtbhzaVuXyCY3M5xP/OAwDa0nLdIEZUceN7R5hqIL7rI+NPRiAP9YxIf OZMV9F64Ep4UBwwh9GdAd480IovV1g0= X-Authority-Analysis: v=2.4 cv=daKwG3Xe c=1 sm=1 tr=0 ts=6a4ff868 cx=c_pps a=N1BjEkVkxJi3uNfLdpvX3g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=cEzmOCKoPSdgX3iFUHIA:9 a=QEXdDO2ut3YA:10 a=crWF4MFLhNY0qMRaF8an:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzA5MDE5MyBTYWx0ZWRfX2gHdRRkY3Npb rLi0QXAvMgZRX59yYYaZB1FjeAr75AQWDOqQ6djTNuPRraQyVpw1RN7km2LKma9etPF2Ro/o5h4 De8p/wlZW8nIK4A9jHfC2UIvN9PLA4HSpO8KoutbXpOEpThyJTSnuvWYTSa4+3Ag5gx7drwNpco KF+/5c7QgCaAn9jH4yYM0FPoJpg9l+VW96hY9uXCmImOlg9tm86iMFDQxk4vQM8ePyc300klT5N bLL/0NYuV9Bh2reyqH5rmczImiVpUJU7rmvtRZsi6Xm54lVjH+NtM+V8r96kDlVVjG5+K2lqKEh XctdmlXobX+lQv/ozL2F4nQ55L0YybxPdA3mdheEgnEW9eMVv4NwZo/20nIPo8Yx8FPRH7j4bGU 6mZ3pqXIf0F19B/bzUqIXyxh31gyu6msjVFthpz2Fz3K5cZiepMjEPyipCCqp1niGWhAIhwBtuM OXUEG9eQsGMsQ7RwtrQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-09_04,2026-07-09_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607090193 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. Assisted-by: Claude:claude-opus-4-8 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 f89245269e8c..110b5630902f 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c @@ -280,6 +280,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, @@ -1119,6 +1302,70 @@ const struct iris_firmware_data iris_hfi_gen2_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 5afe395cc4a0..9743573ab083 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -57,6 +57,7 @@ enum pipe_type { 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_gen2_vpu2_data; extern const struct iris_firmware_data iris_hfi_gen2_ar50lt_data; extern const struct iris_platform_data qcm2290_data; diff --git a/drivers/media/platform/qcom/iris/iris_platform_vpu2.c b/drivers/media/platform/qcom/iris/iris_platform_vpu2.c index e194f67a6f48..8f01cf7f6d49 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_vpu2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_vpu2.c @@ -25,7 +25,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