From mboxrd@z Thu Jan 1 00:00:00 1970 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 B902B37E2FD for ; Thu, 21 May 2026 09:44:30 +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=1779356673; cv=none; b=QOADGFm/KnU2DoOcMLcPi8xfix1H8Z7B0TYXuHAyls/BGpsSlftGOKEijzedRL6JAxt4oSnUagEjUAgIAVukUl842h49FFyq/oRdN/mrgV/PvvX0W6dILUDQjVvtfkcWN7YP5Jbwjfx/RgzkZf4yYXvz0tov8ck+I1Mn06rIvKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779356673; c=relaxed/simple; bh=vx8UXlor1Q+mZBEMuasnpVJ17YTJIUQy7oD2wpSPt9c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KT337AAX+NIK921AXReQ3bN9/rM3BVRa8ck4Shfy6Vh3HT5S2M76InzwT3bjwXoPIms32Go0nCJxIUdHqErtoT9P9i/+cCT8d+ntMehBpASXv/fY5fnK8y/rP/q5rrXNfaespiDKbc/dBiHf/q5VSkzqthhDVUsbr+QhBzNI1jo= 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=e89tlKG2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hEWE8z9e; 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="e89tlKG2"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hEWE8z9e" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64L9ALHh620564 for ; Thu, 21 May 2026 09:44:29 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= Pm8xPGqFT3gNqQUPfHk3ZAk/G820di6y10EGhneFd/Q=; b=e89tlKG2ldRZLMgx ZROd5bzhmXQ5wAsHKr99UO36vWiJIQeLI7XLkwAClZJh6MaiyUIiSL5cwfuYPa/p EVi4MM0L32qSmqAEFoppGGbhaTP3k7xHSmZsaDdlL2IsyQluVwKdhwb/AbT5YFWl u5UyLo1C4aueueP1hc0ByxH/8rwmJL1QPOYLxAAiNcbsNRSBnbBw8Xwnz0kAj4yh wLcLRWB5bTeoKbLvVzlU6KeuhEPEw04QFSeB+NZlywnl3OrSuQD6VDGQc7mFI7QZ QOkA4mIcmXPFL0Ul8y7XA4dz5XJUFbHLF3x2zRu2uLx3BAnFoGTCNt1O7gyExSNu YDNO/g== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e9dxu4bdp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 21 May 2026 09:44:28 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2ba115ab6bbso62947725ad.3 for ; Thu, 21 May 2026 02:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779356668; x=1779961468; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Pm8xPGqFT3gNqQUPfHk3ZAk/G820di6y10EGhneFd/Q=; b=hEWE8z9ejFXC/IgNaUGsbo0EHfTqVEKwViMW7vTp7zBL2tnE9t8D/WG9hh5DE5zhu9 m2H6j68Q5ObBVB2Z+93aoBGSWDnAmIl2JlfBzPnMGMS0zmzdIPjLDjhXYZ4BBta38F9a XwUcIj50h1pAIZA1E4bdmny8IDBgXgpje7QrpBr5gzOVDx9vtJPL1QrsY+1qVg5QbaRc Zgxe2/nBweHGQP6rFoa++5OzFusfWpfPNK2KYZdEkXfcQTloR1f//UoBp2qbiqao+p8V l8Sv4IwC1KRc/nmvsKIrlwLYNwzZmGVnYBFiUV9ZR0xZlX4JaR0p//7+p+uPMFm9pifs sFHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779356668; x=1779961468; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Pm8xPGqFT3gNqQUPfHk3ZAk/G820di6y10EGhneFd/Q=; b=kB6Pi6kJP59EIkwzAhxxOQsQz1Y4VV6mm3PG83eySAguYJ3knw9EuMk0of3MrYY6XI RKx7oQdPPalwz1Lbhc1yzBqplTZKZlZShO05Uk6pao9wH6ducceBJRrFF2B5zJdTqNwa NGIK9wMULcszge7QKxXX+jT7vjKF00wXy5DMKWfyXwvkG+oKxY3QLpAwdDXaVS++wsL0 MVedN1cYnWHTYMYfGg7UrBiJrswdzF2+ly8ix8TMGhuz70JG7y2mTaETLF7yDk+abNmh sxj7qeL7YTgH8ArNFCgCEyOgBSgv/DQ+gusWjb0Kju8pZ7jgc5E9CnixzVxBDbKMy/VL T7BA== X-Forwarded-Encrypted: i=1; AFNElJ8Uax+e2v30JYxEcgK9A6oM4qNKA2itfSp5CDqezeJswmvrH61cLlOh1NPgtASIGszGhg4g8DtVZua47pc=@vger.kernel.org X-Gm-Message-State: AOJu0YwDgJzVf3nqdAXX2tWu/NEF93KqDgKPHW/UBWipTXTAfd+OsOSR 6vnJm+bGFVxBwg4nFG6Kj4cR03tFoT32KQfDgLuMQvrhQLkaKT/lAPLF+PGO4xJ06NCkAkFOEz/ Nqq7JsMvHccE5lJZI8LfdNPB/2BRQEvNplu+xYaqhSV4ID757me5ZufTt/NXd5TfduI8aBNp4kn M= X-Gm-Gg: Acq92OFa9BkIkKR1AkDZR8R2xpoobsX27DEq+u/U7uXaEtaKSEWpHnIhZfkhXD8HZcC oPSx7jtpLCU33+DLWdI+mYUpgH+omdom+inm3P9Y7oMX72og39HSYq1LrkGr7xRo7qFKWBSo/Rd /DrHj7MtbQjwNCvmEeWce4+wfVK3bLzz69S9MEflwXm5hpT2BbF/TSYjbj97cUZ4eb7s4PxobzC F2Z5qRzXsukCqtRHtzux6TzLa64NmvPgulvtZvxNaNzDn2XvxTvEnRmYnn/KgomGdKjYJyIvVr2 kP9JKEtd8RxtrDQHLmO3sqtLTYuW0MJ+RdeDP1tcdJyBEYuFkNeL5TcXyflPG0FIH/wIGUid5y5 BbtJ81BRS31h7sBFbl/w7WBQXrD8KGOEZ+O8ZbrcTY6fLvD6uV+6ScDw= X-Received: by 2002:a17:902:f786:b0:2bd:2de3:519f with SMTP id d9443c01a7336-2bea32fd20fmr21522455ad.19.1779356667895; Thu, 21 May 2026 02:44:27 -0700 (PDT) X-Received: by 2002:a17:902:f786:b0:2bd:2de3:519f with SMTP id d9443c01a7336-2bea32fd20fmr21522145ad.19.1779356667407; Thu, 21 May 2026 02:44:27 -0700 (PDT) Received: from [10.204.101.125] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bea99112basm5206415ad.64.2026.05.21.02.44.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2026 02:44:26 -0700 (PDT) Message-ID: Date: Thu, 21 May 2026 15:14:22 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/6] media: qcom: iris: gen2: add support for 10bit decoding To: Neil Armstrong , Dikshita Agarwal , 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 References: <20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org> <20260511-topic-sm8x50-iris-10bit-decoding-v3-3-7fc049b93042@linaro.org> Content-Language: en-US From: Vikash Garodia In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTIxMDA5NiBTYWx0ZWRfX4rURkzkcEhi2 LoQv9lvNJnla2P6M1HrMRh2FGe5LE+yfpJZYQvbfJ3OAvLjCk7h/BtO1e4Ynya5ijT79HtcxPhp CwvyQEEWNaSbvMqN/PPCJQZi2mQUI4e0GbSINAESaYyqmUdSuSg/Z9kteQc7gGwJsZHXaZaDHiC 9YSYGm0isOsHKXWT3xVjOdst2ShivCkd3h0Zr0n2qNYUsK7LdiZY0/5yUQjWgDUCw0GtzRRn/5W CrG+dEEsBFQwvffXIhL63P9AQwDmjjelcXiEv9kZQvGovtxb5hBcRQS1xRav8icXePRLeeigFr3 8g4JG70PP059gyqmGDWI3NhBKbsKYdl6/Jujctc5P4VXLaH63+JAZ7JrkkBW5vgxXDVwSZO7Adu TnnsqHsE7y1PjjeX0xtajWFv98n2LpfhfaGeGiavf7aoaD/3C1t7C/8XigjkJFf2OSmMgPUI4SY dbTfCziVT0bAaLPIt0Q== X-Authority-Analysis: v=2.4 cv=Zckt8MVA c=1 sm=1 tr=0 ts=6a0ed3fc cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=KKAkSRfTAAAA:8 a=iptcRLJNIGpdCXh1_3wA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: stAvvaAP8R7qIO0lSbPhjOWWnlur-xba X-Proofpoint-ORIG-GUID: stAvvaAP8R7qIO0lSbPhjOWWnlur-xba X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-21_01,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 phishscore=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605210096 On 5/18/2026 1:02 PM, Neil Armstrong wrote: > On 5/13/26 20:50, Vikash Garodia wrote: >> >> On 5/11/2026 2:50 PM, Neil Armstrong wrote: >>> Add the necessary plumbing into the HFi Gen2 to signal the decoder >>> the right 10bit pixel format and stride when in compressed mode. >>> >>> Signed-off-by: Neil Armstrong >>> --- >>>   .../platform/qcom/iris/iris_hfi_gen2_command.c     | 75 +++++++++++ >>> ++++++++++- >>>   .../platform/qcom/iris/iris_hfi_gen2_defines.h     |  1 + >>>   drivers/media/platform/qcom/iris/iris_utils.c      |  4 +- >>>   3 files changed, 76 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c >>> b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c >>> index 30bfd90d423b..89de8c366836 100644 >>> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c >>> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c >>> @@ -481,8 +481,20 @@ static int iris_hfi_gen2_set_colorformat(struct >>> iris_inst *inst, u32 plane) >>>       if (inst->domain == DECODER) { >>>           pixelformat = inst->fmt_dst->fmt.pix_mp.pixelformat; >>> -        hfi_colorformat = pixelformat == V4L2_PIX_FMT_NV12 ? >>> -            HFI_COLOR_FMT_NV12 : HFI_COLOR_FMT_NV12_UBWC; >>> +        switch (pixelformat) { >>> +        case V4L2_PIX_FMT_NV12: >>> +            hfi_colorformat = HFI_COLOR_FMT_NV12; >>> +            break; >>> +        case V4L2_PIX_FMT_QC08C: >>> +            hfi_colorformat = HFI_COLOR_FMT_NV12_UBWC; >>> +            break; >>> +        case V4L2_PIX_FMT_P010: >>> +            hfi_colorformat = HFI_COLOR_FMT_P010; >>> +            break; >>> +        case V4L2_PIX_FMT_QC10C: >>> +            hfi_colorformat = HFI_COLOR_FMT_TP10_UBWC; >>> +            break; >>> +        }; >> >> semicolon ? > > Ack > >> >>>       } else { >>>           pixelformat = inst->fmt_src->fmt.pix_mp.pixelformat; >>>           hfi_colorformat = pixelformat == V4L2_PIX_FMT_NV12 ? >>> @@ -517,7 +529,8 @@ static int >>> iris_hfi_gen2_set_linear_stride_scanline(struct iris_inst *inst, u32 >>>       stride_uv = stride_y; >>>       scanline_uv = scanline_y / 2; >>> -    if (pixelformat != V4L2_PIX_FMT_NV12) >>> +    if (pixelformat != V4L2_PIX_FMT_NV12 && >>> +        pixelformat != V4L2_PIX_FMT_P010) >>>           return 0; >>>       payload[0] = stride_y << 16 | scanline_y; >>> @@ -532,6 +545,61 @@ static int >>> iris_hfi_gen2_set_linear_stride_scanline(struct iris_inst *inst, u32 >>>                             sizeof(u64)); >>>   } >>> +static int iris_hfi_gen2_set_ubwc_stride_scanline(struct iris_inst >>> *inst, u32 plane) >>> +{ >>> +    u32 meta_stride_y, meta_scanline_y, meta_stride_uv, >>> meta_scanline_uv; >>> +    u32 stride_y, scanline_y, stride_uv, scanline_uv; >>> +    u32 port = iris_hfi_gen2_get_port(inst, plane); >>> +    u32 pixelformat, width, height; >>> +    u32 payload[4]; >>> + >>> +    if (inst->domain != DECODER || >>> +        inst->fmt_src->fmt.pix_mp.pixelformat != V4L2_PIX_FMT_AV1) >> >> whats the restriction with AV1 here ? > > This restriction is used in downstream driver and Dikshita reported we > shouldn't > call HFI_PROP_UBWC_STRIDE_SCANLINE except for AV1. > > Could you please check if it's necessary ? > I discussed this with firmware folks. As per them, this interface is effective for AV1, and for others, it might lead to higher size due to host demanded alignment. As per firmware team, "While the documentation states it is applicable "for AV1 ONLY", sending it for HEVC, VP9, or H.264 will physically work—forcing the UBWC output buffers into the Host's fixed stride layout. However, because older codecs handle resolution changes natively by triggering a standard Port Settings Change (PSC) to reallocate buffers, using this property for them is largely unnecessary and will persist statically, potentially leading to wasted memory due to over-allocated padding" Regards, Vikash