From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 1E23744CACB for ; Fri, 15 May 2026 09:38:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778837884; cv=none; b=u9XyZeJm2Rz/YtVVQ1L6pSvEa7VnXc3+/5RNC5/Dc3yJ1nipSUey7pyRWKYb6ccyAwpfSf8eSvjCcwFYU3Nvjd8ERCGOEotwftuIa0QWG6Dzs/9pqNnh4ZbZFjzq2rGUsEfPUiGoVb4zCe+7tExC5V0DlIqRgd9Fs+KLs/S0DUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778837884; c=relaxed/simple; bh=3+DIrEKOTRjSn6Jf6u2F/51kxz9IyDHPxLTMZ31egG8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Lf8drlK556pK5KU9RncMno566i1JfdswWziTyveeAwJyuBXCzIW0DQmUM/Vio2O647eN9Ivd451i+vAWXrLncr/MEY1IwBZg9aZFcMgki+E4/Iw0Rj6dKV0CNODyejU8gJ6er3AUPlvtGmwRFDttDX4SMRRSh01t/h6lSlZfaJY= 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=l7KnHs6Q; arc=none smtp.client-ip=209.85.221.43 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="l7KnHs6Q" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-45ae6a0e523so2706963f8f.1 for ; Fri, 15 May 2026 02:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778837881; x=1779442681; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JM0+spwssTd7/SW0gHqM1ACIOAIt6XsH3GP9t91zyrs=; b=l7KnHs6Qy/WxNWuBa5bQu+OslUFq53oJnEXGUPyIvuGXiXy50poBlU6pybzxfmzKdL WAOzuzmSfuoe09/URs5ZysrTKKEwHfaKUYEGplEYAtqHDTJeLer3536nmRTmpKje0uxR LYMD2JDgFNibw9XgF4q5wCKBq21yiV9vwHIQJTPxwIdE3f0un6Pm0ZA9Fbj7No+hkiks 6VK6js3XnrsN/EWtm3AkfT6WAgUEguAz7hrpPOFzx9BJY6BsrrS/pWIKDMD/GOuzkxwF Yf9ppQ80AsBTDB59rA+Ex62bROKN7PfScqcuBWGad8tOsHL7roGluMaZZmEV4t4i8ZBs Lrrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778837881; x=1779442681; h=content-transfer-encoding:in-reply-to:content-language:from :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=JM0+spwssTd7/SW0gHqM1ACIOAIt6XsH3GP9t91zyrs=; b=HBYfpMGIlrCcE0kKxYC2bTeA1GlX/jo2gcWhpLcGlMBiF+d9Dz6z3f6kn//waS1H55 1xMAwogfHiuD2GuLfrwq3AicrUMdeearIa77ZjSWr+md198kJdY9JsCjRuQL6roe5j66 AUgWEvop4nEs4oxW17Nmt9jJtBL56mo7BMFctpqKXMIRhiz70HRTizvmMsZamEfaYhc9 R7GIEfFfUyEa7QAYf6OlPfyEVHD6TN+ZremHOIZuWKhD+tEVLCjLNWccIsKiSuquuSbv LcUKS2eUjaRzqVfpdpe5q9rlnxWalKTIyABCO+n/SWEDU+rUq5ow8Tkm1LngNtIJkONd 7+KA== X-Forwarded-Encrypted: i=1; AFNElJ9K9feikA+UvfpNi5E5C+98vmP8Md2eGD+72xzt9THeJT4edMv5aEBCIwDthS4IfhiUc7OlTu2ySCLH1kI=@vger.kernel.org X-Gm-Message-State: AOJu0YxEukRgyvHDh2H/A3kIM2XddVWbUMLD/rZMs8hgyqC9YcqS2hs7 WS/Es3kUwS43jKJub9LS5Vo5VGUlAAMtZicOh9T6XyXN5KATf3WYfTCtb7BEUxHqfAc= X-Gm-Gg: Acq92OE9oNQFfiQRPhg+I3kuJz3zAP6AD/rO+IlzjYb3GFRK1mRfIRg+YduKvQi7Sqa GKrS01Jl0JjmbNN0pMijnFW6ySf+0Xxs26/Y/GB79Y7/YSmvWUWXLpo08n6XDE8FYWsb9HibMiP v0+uT9jUM9daDtjPdXYB0FDs7MGoXLrkHMeii8uIxdKrN4Jb2N9oX8w4D7c08aot8brb+uVuoZw dxIYV7n3VV2Oce21Vf21hc1MJvh3lOHhWba7Zk484OtolLsIgs4G/BBQdP7zfPUTNK1H3dkxE5I +zFUKnB7q6pfcfs0uQ3sE3biabR/X6xaqxDZC0CQf5j/FEQuUeR/CXbCtGQmtVWNtrxVG2Z5Xb0 l28h+n4csnWUTX7mAN1kV8ET2QzYpIwTMK1Gi0V/FsVXDBlKFXjHQK703XgWppjtSjEWieQLWsp oXqgRJZy/XRcJRpcEAgJoJTewhuOzUDEBZsScv X-Received: by 2002:a05:6000:40df:b0:456:f186:7af8 with SMTP id ffacd0b85a97d-45e5c35e4c5mr4179602f8f.4.1778837881492; Fri, 15 May 2026 02:38:01 -0700 (PDT) Received: from [192.168.0.167] ([109.76.168.101]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec3ac86sm13540897f8f.14.2026.05.15.02.38.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 May 2026 02:38:00 -0700 (PDT) Message-ID: Date: Fri, 15 May 2026 10:37:59 +0100 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 5/6] media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats To: Neil Armstrong , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , 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> <0boIejkDZLA5Kw9uSWxeZX3GforfnPgAo7E27fY_Nnp4VjgHo8d9b70ojS2zrG-xk4dDT__EyunCPPEgJh1Niw==@protonmail.internalid> <20260511-topic-sm8x50-iris-10bit-decoding-v3-5-7fc049b93042@linaro.org> From: Bryan O'Donoghue Content-Language: en-US In-Reply-To: <20260511-topic-sm8x50-iris-10bit-decoding-v3-5-7fc049b93042@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/05/2026 10:20, Neil Armstrong wrote: > The 10bit pixel format can be only used when the decoder identifies the > stream as decoding into 10bit pixel format buffers, so update the > find_format helper to filter the formats and only allow the proper > formats when setting or trying a capture format. > > Signed-off-by: Neil Armstrong > --- > drivers/media/platform/qcom/iris/iris_platform_common.h | 1 + > drivers/media/platform/qcom/iris/iris_vdec.c | 10 ++++++++++ > 2 files changed, 11 insertions(+) > > diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h > index 5a489917580e..cd3509da4b75 100644 > --- a/drivers/media/platform/qcom/iris/iris_platform_common.h > +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h > @@ -18,6 +18,7 @@ struct iris_inst; > > #define REGISTER_BIT_DEPTH(luma, chroma) ((luma) << 16 | (chroma)) > #define BIT_DEPTH_8 REGISTER_BIT_DEPTH(8, 8) > +#define BIT_DEPTH_10 REGISTER_BIT_DEPTH(10, 10) > #define CODED_FRAMES_PROGRESSIVE 0x0 > #define DEFAULT_MAX_HOST_BUF_COUNT 64 > #define DEFAULT_MAX_HOST_BURST_BUF_COUNT 256 > diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c > index eea69f937147..f4d9951ed04c 100644 > --- a/drivers/media/platform/qcom/iris/iris_vdec.c > +++ b/drivers/media/platform/qcom/iris/iris_vdec.c > @@ -99,6 +99,16 @@ find_format(struct iris_inst *inst, u32 pixfmt, u32 type) > if (i == size || fmt[i].type != type) > return NULL; > > + if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { > + if (iris_fmt_is_8bit(fmt[i].pixfmt) && > + inst->fw_caps[BIT_DEPTH].value == BIT_DEPTH_10) > + return NULL; > + > + if (iris_fmt_is_10bit(fmt[i].pixfmt) && > + inst->fw_caps[BIT_DEPTH].value != BIT_DEPTH_10) > + return NULL; > + } > + > return &fmt[i]; > } > > Reviewed-by: Bryan O'Donoghue > -- > 2.34.1 >