From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 1C8373D16EB for ; Mon, 18 May 2026 07:39:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779089986; cv=none; b=HA/wOjCDgyxDRz9gMEmj9wnCQv7I1/FFuyYyoWFVx1JramhJqFmj6Xp/hC82T2+uBIoSwsichJ6b1vJiJ7D/wxAJgI/mFbEqc5CpC2aZt8vAWDHgU0ltBH9GZv/fsbU0v987voy77gAliklY2c4cE30/gaZPcMtYh3kfJtSVLSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779089986; c=relaxed/simple; bh=9Xx2UAMXoacJM79zgoaAIvmpF7FnBgdmF6pHOzA/y78=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=qqgcM7J8VntY4sT6QvZ5Pc2pHamwpUw6IMvmC1J93BT2xHJbyt9RcDdv63SaDpDez6W2st0J8TfQrPEx0YISv00AdtgEPwHh9af/17UWrgJMgrfMipPPpYEgA7P4ZuM7q+dNjmRR7El0CYAGNuf2ZoJlqrjS3NP6Z9onmbvpfN0= 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=w62+iBNi; arc=none smtp.client-ip=209.85.221.42 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="w62+iBNi" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43d77f6092eso919214f8f.2 for ; Mon, 18 May 2026 00:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1779089983; x=1779694783; 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=kLwOrjdC5DyERrQjO9qVyciiFt7bkI8p0ZjFQ7uf2Bo=; b=w62+iBNid8vlXY8XZ3k43oUe4e+5RrQcoUJQZjUmsUTIZIdyXgciZQ14OUb9er3QSa iiR8M9xcHBV+hHJi+L5zxTAYSZKLCAln8WC4I4v+8HCPeFyPtmxsmoDwVTQXTBKUvTSC b6z6RnahRZH0mrtu/ga1q1j2U6JHDwyHhZNUgcM4EPyWy04096iT6qSrw3jjZDz/cCU8 p5na3FeCY9qAHe7OeDZhXf0XPXhvRVNwQsHwqzKndcvrg3JjbQ5K6vMO6m/hb3mzaVHD EO3xnrUQnrAdDrDTdUi43+xPlyvGT4zfDY3OHhOVU+iNnEkeI4jsmlt9p4nf0BN9um4Z Az3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779089983; x=1779694783; 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=kLwOrjdC5DyERrQjO9qVyciiFt7bkI8p0ZjFQ7uf2Bo=; b=J0n9qFblX+V1Kqy0Z0KKdZLzDhIZq/uLS0rlcZHtNIG7QhKATItGZhlgE4170nzVeK GJ82m9VihCfAGUWM+kWCHvPdhaYMlmQrPjgxsP2nnEshod/XwcMmBuVKfjs0WgAsohOX XBLdnqoq9FWOmq1obN759zKPfFwf4SXaq35Xvwn/SkriVWsd3GW7P5LWdkEPdV0ZeO87 MREGTOr3JOGhnv3v2lBTO3AyGS9jbc+Jxxr+zVmnmsnldTXj7fxp7W1EuOx6/gAiMHJm DPO0Pv4A2TBCkkRUWAYgxCAG8udUGKlnztGjPOb89TnX55X7CQA8b669Ftm4AvDCzDof fNPg== X-Forwarded-Encrypted: i=1; AFNElJ/NbRdarMZPz2jlosKNQwAN7zCyRJJzsg93qISAZkDhO6/k1piEKR2QdwG8A1yTWz6TAMqHa+ATlCnS010=@vger.kernel.org X-Gm-Message-State: AOJu0YxfT0QXoJAGaFx+ZKEqGJjNfc264SXbY7JapeHw0Pe4PGT1M6xR WsO3IAi5PVMT4UXLvJcRvL/ww4dwCIpr5kZvwE1iYpJ4EiRv8Mx9lLJ0E9M6KM3p8Ts= X-Gm-Gg: Acq92OFXi8+44b7/wP8Ot8VU5jVpAYH86DlCiR63rXQRB6fiWDtqYF04CmsVQJL3slE J+FUgiG+DMet92Dv7Xzbj0nuEWvq5/Lf+fHIyIeZeQe1wH5gKrGPZpaaQuOaqzbYtp+GOlUbqoJ W5q0J2+LJjaiC6ioKua/Up78BLfVde2NvTHfcIxL9q6m6LVQvNZt4z5GVTKGCzwQa/fxwTdNWLT RBurhufiSra1mZ+YwE2xIx1IVocN6N5WiIQOqjpySiu5zU6fqa2AcVag2OVQP1T6FK9NAhMd5gD FXo/YuU+Mv3MmS4bIwCDS3Z8AqjTbFg8Kbl9UPKARDpYNgyxwniVWwxgtkC0ih8+w4TL+SOAfeK BDDA1FAM7voMwJaRO2khRuT3D2EENa3KXvGnKWF1t0tROpIjTuq0dmK2KX64wUYkh0iQIprHrgJ V4DduookhNhn48MsrGRDQPso+VIIezh6n2kx2PXqGEcsAmY57HhEVidCSR3EJ1xhrDsKuFSSOdz FATJravUI+5E6g= X-Received: by 2002:a05:6000:22c5:b0:43c:f5a0:4e56 with SMTP id ffacd0b85a97d-45e5c5f9d94mr20396725f8f.42.1779089983299; Mon, 18 May 2026 00:39:43 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:64e2:72b:b9ed:6dcf? ([2a01:e0a:106d:1080:64e2:72b:b9ed:6dcf]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9e768072sm34524864f8f.5.2026.05.18.00.39.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 May 2026 00:39:42 -0700 (PDT) Message-ID: Date: Mon, 18 May 2026 09:39:42 +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 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 10bit format 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-6-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 AAHNKk5laWwg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xKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/13/26 21:39, Vikash Garodia wrote: > > On 5/11/2026 2:50 PM, Neil Armstrong wrote: >> Add the necessary bits into the gen2 platforms tables and handlers >> to allow decoding streams into 10bit pixel formats. >> >> Signed-off-by: Neil Armstrong >> --- >>   .../media/platform/qcom/iris/iris_hfi_gen2_response.c    | 16 +++++++++++++++- >>   drivers/media/platform/qcom/iris/iris_instance.h         |  2 ++ >>   drivers/media/platform/qcom/iris/iris_platform_gen2.c    |  8 +++++--- >>   drivers/media/platform/qcom/iris/iris_vdec.c             |  8 ++++++++ >>   4 files changed, 30 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c >> index 0541e02d7507..b6d815c01f1d 100644 >> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c >> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_response.c >> @@ -542,6 +542,15 @@ static void iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst) >>       pixmp_ip->width = width; >>       pixmp_ip->height = height; >> +    if (subsc_params.bit_depth == BIT_DEPTH_8 && >> +        pixmp_op->pixelformat != V4L2_PIX_FMT_NV12 && >> +        pixmp_op->pixelformat != V4L2_PIX_FMT_QC08C) >> +        pixmp_op->pixelformat = V4L2_PIX_FMT_NV12; >> +    else if (subsc_params.bit_depth == BIT_DEPTH_10 && >> +         pixmp_op->pixelformat != V4L2_PIX_FMT_P010 && >> +         pixmp_op->pixelformat != V4L2_PIX_FMT_QC10C) >> +        pixmp_op->pixelformat = V4L2_PIX_FMT_P010; >> + >>       switch (pixmp_op->pixelformat) { >>       case V4L2_PIX_FMT_P010: >>           pixmp_op->width = ALIGN(width, 128); >> @@ -625,7 +634,12 @@ static void iris_hfi_gen2_read_input_subcr_params(struct iris_inst *inst) >>       inst->fw_caps[POC].value = subsc_params.pic_order_cnt; >>       inst->fw_caps[TIER].value = subsc_params.tier; >> -    if (subsc_params.bit_depth != BIT_DEPTH_8 || >> +    if (subsc_params.bit_depth == BIT_DEPTH_8) >> +        inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_8; >> +    else >> +        inst->fw_caps[BIT_DEPTH].value = BIT_DEPTH_10; >> + >> +    if ((subsc_params.bit_depth != BIT_DEPTH_8 && subsc_params.bit_depth != BIT_DEPTH_10) || >>           !(subsc_params.coded_frames & HFI_BITMASK_FRAME_MBS_ONLY_FLAG)) { >>           dev_err(core->dev, "unsupported content, bit depth: %x, pic_struct = %x\n", >>               subsc_params.bit_depth, subsc_params.coded_frames); >> diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/drivers/media/platform/qcom/iris/iris_instance.h >> index 16965150f427..16424d1e94a6 100644 >> --- a/drivers/media/platform/qcom/iris/iris_instance.h >> +++ b/drivers/media/platform/qcom/iris/iris_instance.h >> @@ -25,6 +25,8 @@ enum iris_fmt_type_out { >>   enum iris_fmt_type_cap { >>       IRIS_FMT_NV12, >>       IRIS_FMT_QC08C, >> +    IRIS_FMT_TP10, >> +    IRIS_FMT_QC10C, >>   }; >>   struct iris_fmt { >> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c >> index 5da90d47f9c6..ceed4b5d96ca 100644 >> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c >> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c >> @@ -56,9 +56,10 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = { >>       { >>           .cap_id = PROFILE_HEVC, >>           .min = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN, >> -        .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE, >> +        .max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10, > > what about gen1 platforms ? With this patchset gen platforms will reject 10bit since all the plumbing in the HFI response handling is missing. Once the Gen1 HFI gets the bit_depth and calculates the buffer sizes, it should work. But looking at Venus, the 10bit buffer calculation seems much more complex in Gen1. > >>           .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_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, >> @@ -287,7 +288,7 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = { >>       { >>           .cap_id = BIT_DEPTH, >>           .min = BIT_DEPTH_8, >> -        .max = BIT_DEPTH_8, >> +        .max = BIT_DEPTH_10, >>           .step_or_mask = 1, >>           .value = BIT_DEPTH_8, >>           .hfi_id = HFI_PROP_LUMA_CHROMA_BIT_DEPTH, >> @@ -866,6 +867,7 @@ static const u32 sm8550_vdec_output_config_params[] = { >>       HFI_PROP_OPB_ENABLE, >>       HFI_PROP_COLOR_FORMAT, >>       HFI_PROP_LINEAR_STRIDE_SCANLINE, >> +    HFI_PROP_UBWC_STRIDE_SCANLINE, >>   }; >>   static const u32 sm8550_venc_output_config_params[] = { >> diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c >> index f4d9951ed04c..65cf509e4aef 100644 >> --- a/drivers/media/platform/qcom/iris/iris_vdec.c >> +++ b/drivers/media/platform/qcom/iris/iris_vdec.c >> @@ -70,6 +70,14 @@ static const struct iris_fmt iris_vdec_formats_cap[] = { >>           .pixfmt = V4L2_PIX_FMT_QC08C, >>           .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, >>       }, >> +    [IRIS_FMT_TP10] = { >> +        .pixfmt = V4L2_PIX_FMT_P010, >> +        .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, >> +    }, >> +    [IRIS_FMT_QC10C] = { >> +        .pixfmt = V4L2_PIX_FMT_QC10C, >> +        .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, >> +    }, >>   }; >>   static const struct iris_fmt * >> > > Regards, > Vikash >