From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B3234307AF5; Tue, 26 Aug 2025 13:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756215794; cv=none; b=p6mzKfBM2fmZSxeeCLw3EvvleiywbMFLDL3y5AoR+rlomXO+tkve/mWLXY8WEUAGIg8rKi92vlZzk3TT1Oq7pJaQYEvZ4aaEg7ulNoVP6byq5Mym/I7P62khzw+rKfthLoEh1AJwo4IZVTRMZvSTcRosPFrlV4RyuusXbZQoQZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756215794; c=relaxed/simple; bh=adWvh7z/oHGo7ZjChrGXjuZhskpRyQmiGT+vHd+tqMM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O/hM8TqYEJyMA9tfbWoFd8+h61/y7c/K95YXzycQvc3VJ9ff29i9hlGLJWScXDuCAuPI0/687N0cW+pJbXi9veOBxUzLFZPUvP3cySkmNgmgxjoNSR3t8Wu2zERAhEEI8qQZvYFi4IYlb3uWpO8m/0pBmAhTz04nzNUMh1CvAyw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UQEkJwaG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UQEkJwaG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 065FEC4CEF1; Tue, 26 Aug 2025 13:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756215794; bh=adWvh7z/oHGo7ZjChrGXjuZhskpRyQmiGT+vHd+tqMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UQEkJwaGCKB6raSJxTkqr86xAHinQzq1mElH/NWFyz11k22KJsv2nyaVByie3XYYs kJ2l8qURhbK/ltCPGIe3XFgBXviO8UQygPuXcv3dB6JCcFd8ihIEP8868ZOCxT3AI8 8fOu9TiKHrJJfCA57IBpcrV7/yZ0TsMrEjuEkLto= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, James Cowgill , Nicolas Dufresne , Hans Verkuil , Sasha Levin Subject: [PATCH 5.15 169/644] media: v4l2-ctrls: Fix H264 SEPARATE_COLOUR_PLANE check Date: Tue, 26 Aug 2025 13:04:20 +0200 Message-ID: <20250826110950.666747677@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110946.507083938@linuxfoundation.org> References: <20250826110946.507083938@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: James Cowgill [ Upstream commit 803b9eabc649c778986449eb0596e5ffeb7a8aed ] The `separate_colour_plane_flag` element is only present in the SPS if `chroma_format_idc == 3`, so the corresponding flag should be disabled whenever that is not the case and not just on profiles where `chroma_format_idc` is not present. Fixes: b32e48503df0 ("media: controls: Validate H264 stateless controls") Signed-off-by: James Cowgill Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c index 3798a57bbbd4..19e769420b9b 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c @@ -431,12 +431,12 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx, p_h264_sps->flags &= ~V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS; - - if (p_h264_sps->chroma_format_idc < 3) - p_h264_sps->flags &= - ~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE; } + if (p_h264_sps->chroma_format_idc < 3) + p_h264_sps->flags &= + ~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE; + if (p_h264_sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY) p_h264_sps->flags &= ~V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD; -- 2.39.5