Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2316290rwl; Thu, 30 Mar 2023 08:43:24 -0700 (PDT) X-Google-Smtp-Source: AKy350YHp5+9joj7GEN6P30XQhnIfYJHpeqlB/mP70UXx5YpXKDjM6nzPJPkaBPr0snEE9LUq6gQ X-Received: by 2002:a17:906:1ce:b0:92e:f520:7762 with SMTP id 14-20020a17090601ce00b0092ef5207762mr2581733ejj.6.1680191004399; Thu, 30 Mar 2023 08:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680191004; cv=none; d=google.com; s=arc-20160816; b=W1Rdg8IpWsWj6qbS6c0DXXoXPlh8LK1++Pxyp4DmzlG6RIDcB9Q7lfDmC8WTYkqjpj 3oWhzf9Wngx0fHZNMvilbUAD8uSJgzbOf9R9Y1z8w0YW/7zI17UGgRjaH1x/JmTyvIw4 dqabWhOG+qZbOiBCYmzxWXNuj6yTjN02kOBtxai4SIcy6QOpj2UoUCDfZtYe2tIvC+1C w22gJdifX1u6eiQr1XRDyeSwS0IeUocHPDOVDu/KX31KqSWWjatd8n2eqpi77G2YLffU hvjopl0UBEUiQpKhE+5TAaysyRxyAUzW6kKQBv1iuABcCsJU+Y/dVP2Qngf892ZgDPwa 7Vmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HaeOJcMXFOUAiZC5CaYBtGiFJmNbqa9iwEeyBCkgQ6I=; b=Dblwt3ZBWk7nBz2vaGlAcXFkfhoTOSGye8b0yGTF9WMIrXisJ9UE4PnVIYFLr5s4YT ILKPniEenndYyRba3G26gptewoUynHp9cF0+OChXKZ3LwsgZb+XqPsF3S207g5P1pcB5 x/RZgdl0cGr9krRnF587vgVDawxbOOP4WonpqVnVtCu0F7zVj5WbShI2a8WDV1lbGrE1 llSYOIgwfAaOZu00rdOOkQVfhsLFUYllYi8lVaRKc53NjJTd2mwqo7DKILnLgN3m5lFx pcktr79gsqwhDNJrNjSjcRbUtZZWW8+/p7BDqL4xbFr01gV4ESNRJrvA9DSdSzmvSDnR bySQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=A2EtgEzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a170906680d00b009313b7b3076si1143802ejr.607.2023.03.30.08.42.59; Thu, 30 Mar 2023 08:43:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=A2EtgEzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233366AbjC3PlY (ORCPT + 99 others); Thu, 30 Mar 2023 11:41:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233287AbjC3PlE (ORCPT ); Thu, 30 Mar 2023 11:41:04 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6709777; Thu, 30 Mar 2023 08:41:01 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:792c:96d5:14:366a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 6267D660319F; Thu, 30 Mar 2023 16:40:57 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680190857; bh=SFkEyJ2jkQipi8zjFY3ky+Bya3/h0EUtC+kLHT4AkTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2EtgEztlrHnrRU0BzaaBdBu07wYIDSUVOLhz5cKnhpNdHj30caOCnjt03N7xdosU geikShiaIq4F2sPMSuSLzmu4IsFnfHQNxkyU8y5WrnBj+1FgKl/buOJ7Jotgea08Zb neaVz4ISLQCXqoPGwmoA3bm2RnTw0aVqf6ilFGbECcajazFIIbuQ/AKtbaw9YSULs0 GfKL6B4GhYPb8uiQQkCo9RJqWUac0zG4yXnUwK21zSgqpt6A2ctSQwfNv6dHR8utBT id/imiAlYszGIYTSd/fZeGw9prpEm6gHmaRNa+IJ2NS3CCu7MOpyWJg6MbGdf5sane OIyN9ATe/gpGA== From: Benjamin Gaignard To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v5 13/13] media: AV1: Make sure that bit depth in correctly initialize Date: Thu, 30 Mar 2023 17:40:43 +0200 Message-Id: <20230330154043.1250736-14-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330154043.1250736-1-benjamin.gaignard@collabora.com> References: <20230330154043.1250736-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make sure that bit_depth field of V4L2_CTRL_TYPE_AV1_SEQUENCE is initialized correctly before using it. Signed-off-by: Benjamin Gaignard --- drivers/media/v4l2-core/v4l2-ctrls-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c index 9fd37e94db17..a662fb60f73f 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c @@ -111,6 +111,7 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, struct v4l2_ctrl_vp9_frame *p_vp9_frame; struct v4l2_ctrl_fwht_params *p_fwht_params; struct v4l2_ctrl_h264_scaling_matrix *p_h264_scaling_matrix; + struct v4l2_ctrl_av1_sequence *p_av1_sequence; void *p = ptr.p + idx * ctrl->elem_size; if (ctrl->p_def.p_const) @@ -157,6 +158,10 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, p_vp9_frame->flags |= V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING | V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING; break; + case V4L2_CTRL_TYPE_AV1_SEQUENCE: + p_av1_sequence = p; + p_av1_sequence->bit_depth = 8; + break; case V4L2_CTRL_TYPE_FWHT_PARAMS: p_fwht_params = p; p_fwht_params->version = V4L2_FWHT_VERSION; -- 2.34.1