Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2176738rwi; Tue, 1 Nov 2022 04:57:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM78WIlIqYCypUo7egzRtYz3hf9cnochyiDY7K6aYEFr5qu2aZFnpDMTkyZIYe2DvlUqP5iB X-Received: by 2002:a17:90b:4d91:b0:213:f1b:dab5 with SMTP id oj17-20020a17090b4d9100b002130f1bdab5mr19553364pjb.95.1667303827281; Tue, 01 Nov 2022 04:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667303827; cv=none; d=google.com; s=arc-20160816; b=yDa3BBIEddJ8vOlmY/fHmHhC4c3plbP4XMWBt2gbx0CmRMdgA2orG8ILf4a5fUSIdh J5oFjIxyoamsi4u2eUlmOJNQ+TyE8xhTtFlfdeZaZAYF+re9tKLNvNMe2Gl1uz0OIjuY q+UoUNxJp+beO+VwZNZRHkeF7JtVDg2qbuYoNuuAHjr8Daw7dxKbgHYaoMkA8p3K9nSK 9+cpPpl4Z6TAzUCsHmT63yJRWM8BsvLvPAGwgAu6LUpp7pywCUirciCL3fQw1/FWquzD wrORGAXGHEuLWrYH3neuThjV6lfSDOgEDJTQU9bPt4z0OU0GGDuJDa8Lc0oYz176Df7o WdPw== 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=Nnc7ffXx1r5nLMtuubQXEAkvqRC1mpmEck1h4rmno4c=; b=LJPXHTZKkY4daX5ZX0ZACBf0nXS76cLS73sA884GC+g1NFCI6JAATpkdmvB6xh5b79 3swlKhfmaUTgs/GiG6zxzW7DBLt5odARU+rj336dq+Dt2NbfxNumntGYvqdvgUuV9Qsu RmWUOB8j5rJ5aSnWzORLqkoCjRvs6huUyjuPXduruVPuTi2/tghp1thHoEZvafEWmW6m AwpkLGII3fc+CjBQCMSAzkSiOs9O/VSNAhCmq4upYOw3zCg2tk7j7UZUKUFIdIiXJgVh G3BW61HjgQ3V2sNjgDlKYEJVd06gPslWgCmbPW3wKJQ5Drla7XUFvzubZSgK1nMv60kT i/Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iueMesf9; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u23-20020a63ef17000000b0045fa2a39f4bsi11471274pgh.247.2022.11.01.04.56.54; Tue, 01 Nov 2022 04:57:07 -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=@kernel.org header.s=k20201202 header.b=iueMesf9; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230207AbiKAL1n (ORCPT + 98 others); Tue, 1 Nov 2022 07:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiKAL1e (ORCPT ); Tue, 1 Nov 2022 07:27:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36FAF17E21; Tue, 1 Nov 2022 04:27:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C84AF61588; Tue, 1 Nov 2022 11:27:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15DCAC433B5; Tue, 1 Nov 2022 11:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667302053; bh=YXsQNvRAP0XbPT0YNr2ogvZLzXqQIuO8u8yY6x/VbSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iueMesf9/6PzuqKOPOoKfLp4FmpStPmzXLRhbymilCcsrMFDLHrdAOgD1SFHY9RTm oXgg3Y/NBmTdroAPvON3kHvp+cxrOCNk1K2827fJxy4yWY5Uj8Z/oiNd2cQYflsT9o GRvPpFKbmXPK2BZaCInNFik60769Wj6uWavC7r3pJ7jJAMDpi5Ygs/ptWwwZZiEp4y RieaP09Y9vKr0126UQEawPR/gzLlAuTqvX0ErMuHnwyHcnJdM5soZfPXiNwr3NDnPw yZ9PHRL5qrDr8uvwlmFVPS52/Zr72ue0uBHVL7DomzYVzwGLxGVH5BLRFQvML+HQ7M N/lw3yfzg7ZpA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Laurent Pinchart , Paul Elder , Dafna Hirschfeld , Mauro Carvalho Chehab , Sasha Levin , heiko@sntech.de, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.0 03/34] media: rkisp1: Initialize color space on resizer sink and source pads Date: Tue, 1 Nov 2022 07:26:55 -0400 Message-Id: <20221101112726.799368-3-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221101112726.799368-1-sashal@kernel.org> References: <20221101112726.799368-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Laurent Pinchart [ Upstream commit 83b9296e399367862845d3b19984444fc756bd61 ] Initialize the four color space fields on the sink and source video pads of the resizer in the .init_cfg() operation. The resizer can't perform any color space conversion, so set the sink and source color spaces to the same defaults, which match the ISP source video pad default. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Dafna Hirschfeld Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c index f4caa8f684aa..a2dc6f60d9cf 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c @@ -411,6 +411,10 @@ static int rkisp1_rsz_init_config(struct v4l2_subdev *sd, sink_fmt->height = RKISP1_DEFAULT_HEIGHT; sink_fmt->field = V4L2_FIELD_NONE; sink_fmt->code = RKISP1_DEF_FMT; + sink_fmt->colorspace = V4L2_COLORSPACE_SRGB; + sink_fmt->xfer_func = V4L2_XFER_FUNC_SRGB; + sink_fmt->ycbcr_enc = V4L2_YCBCR_ENC_601; + sink_fmt->quantization = V4L2_QUANTIZATION_LIM_RANGE; sink_crop = v4l2_subdev_get_try_crop(sd, sd_state, RKISP1_RSZ_PAD_SINK); -- 2.35.1