From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF1D737CD34 for ; Thu, 21 May 2026 12:58:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779368283; cv=none; b=QtmJln0a1gphzMZwAIoFvgbnxuQsv4Tvk8zDwxK9K7QNyJWd8nrkRUSkFTZ6afg4yzgWNfcGSnwvhWW+1LwaGyf91YVLf/rLKGoL1C1cCxiQA3Ia7rKHVjV/vjFjQl32NWtO/8tb1vX9qZ9fweo4vMwXBNwbQm5/QN0i+8m5wDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779368283; c=relaxed/simple; bh=14LJ5CLZqx0/2eEPwTtKM9AwLYxUCsecgICz5wwcJCo=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=a0pxav3KYme28sGyAJp7RIefpSfG/URa9udarX4I1ZVUYKcFO9lTZWUjHznexhnqwW9yOleyQG7cBzSos5iZI2km8iuB0v4LyNfDQax1z8xNQ46ZVVbxeKGqHP1PWb7sM/ecnNBTmN0+WLZ9a5YPi/hww7L4wLQhxlcogSdx8aE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mynaPeiI; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mynaPeiI" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4896c22fcbaso51101355e9.0 for ; Thu, 21 May 2026 05:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779368280; x=1779973080; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=ij+HmZb50wrOGLgyBR5wCEH6ymGTjEYisLCldFWkgQQ=; b=mynaPeiICRMzMHSzwH+2HwS1QU9WYbx90D1cQBFEUD5X7mR4yYKdtd0hGtrd6RDm9Z b+L/xeRwucUVbasf6ptks5Z2l80oyLaUn3SDAYWePysHbTp+FdJk8rcSg/rlORTGX5ts RoyX1lvkpketWiXCbrNOSn9jc0SIn47n4i//McyKayCIb17n99WpPWXmlwwuZMdGS18U Ek81/oKwzpRMIOO2miZymT4ksBO/80HQn1j2c0HOBcKjHuVkFw5zoJBLbtfVOh403pKW aq1ZfJ8pvp79PWBK4Hgny745iVmFHhQDCoRTsw1wumhwS1W6aI1jUbKTgxoGm7XaJ8K7 3XwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779368280; x=1779973080; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ij+HmZb50wrOGLgyBR5wCEH6ymGTjEYisLCldFWkgQQ=; b=Zh+DViIiPALuK7WDcRBt3O+JVGqM82iJ2a4TL7Y6XtBYZKndMWtgxEonZXu4Nf34so b3n8guulxV79523np0TTM5SyG2AzqXCABHjLwt2taxzL8KML6ke4yxRPNkr00cXkcOZU QBzTDIm3P8jdIys2E5tXWMbPutqpF3tVF79FEJvmv04wltROHimQ07iwcJDepah7ej4X ziGtXf5waFMHOlnW2BU2Ms3uGL1Jg+D+zBClOA07gRNAMvbFP8bZOrxzSMjk+r/k4p/x D2bUr+XMHeUaXymtpeiF/eTnocitojqNxU3fEj2NGV7PP+eWPjthfvpdhG83HJAPDGNL NQiw== X-Forwarded-Encrypted: i=1; AFNElJ9/IjroecR0HmlOR0ZlmJRQV9Ze5DV1VjNVVt3EVqWjCsAWkKGUr9nEJEacx5t8K/p94B8Pxx1nfEz3Xxk=@vger.kernel.org X-Gm-Message-State: AOJu0YzeU05R0LgswxFA92YmCNT6ukk/XMm5kIEQHyRP7iB78ROUz+Nt hT/pOt/X/m1WRP/61jy7ifhbIepgbEH9muxZxGWsBzbMHuAr/YJUc6Mzramzx9fK67g= X-Gm-Gg: Acq92OFAGGNWyFRt8l2nNJHsWx91NE25kFjtKP0VXF6vlTqKKEDvP6ipMgokB9ibbOm mqmnDb1ieRPH/siDQ2OIiLUWzaKSCcJNod0ZS5i3Mbj+9Tru5gjnm4A5le5pNGLAmv95ekia70p lABzvrca2l//4FYDA//6zgY8UMzkZZCOMw0jFZH/pkxkGkTIZss2Yc1rYD0VJN75RObbmabZegG Kkv7QwfCoryrtI4xk8Sv9wggD04eDI2u6eCkStUpl6XXlGWV8wuPacte4ButO1LpoM4Q0aidi/t jVii5jEzgpFcBI4StA0qzVb5kw5kX5IJDXQQZHYqc1cPw9EV4sEMRmH8vg+r1Omduf/D6aNYIJt jkvBeN62lsLaiXDsZ0zdJCYziHdPxxAWuh+Xwm1fMGdoxHjBl1gKKN7BhTTBr+fRXNqwV1TPuDs c5KUqb+IBz09XOFH0EEJYfYJCHCQ5AUSjP0z8RFfDQl+uhQWjLKuEC33hYG48BPckmLajFDTEjl PKF4Wk= X-Received: by 2002:a05:600c:4654:b0:48e:635a:18d9 with SMTP id 5b1f17b1804b1-4903608439fmr27803815e9.15.1779368279923; Thu, 21 May 2026 05:57:59 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:7e6c:bb76:ade5:7e8b? ([2a01:e0a:106d:1080:7e6c:bb76:ade5:7e8b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49035f52a0dsm15092125e9.24.2026.05.21.05.57.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 May 2026 05:57:59 -0700 (PDT) Message-ID: Date: Thu, 21 May 2026 14:57:58 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH v3 3/6] media: qcom: iris: gen2: add support for 10bit decoding To: Vikash Garodia , 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, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3Jn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lhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/21/26 11:44, Vikash Garodia wrote: > > 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" Thanks a lot for asking, I will leave it as is for now until we have a stride issue we can enable it for other codecs. Neil > > Regards, > Vikash