From patchwork Fri Feb 11 14:27:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12743498 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACCE9C433EF for ; Fri, 11 Feb 2022 14:30:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l3VFeQZ3U59cMNoC1PpIPMWkLG6HxLKZB+KOIdZIqt8=; b=1Jc8fgkZqJ4JhL 3l4VzX3gvLk39KAHYtilgiR0nLqNI3acJbamExMrN9wiYDWQgeinX+f0biC+oAyduDPTHsgN6Y/C6 oN0OAXo4QfrcHLLL1msw/IXqAOoMumjFxPXFo/C7NiF2+I0PpGepDHzoBqaKUCYku5HVElLr/HW+L qYeOcxOmkhmU39QwFxYqohJD2KwKU2KAS4O3SQ/FVw1vXyBobKbwZzmUWxqp+Pz2la+9xthL0FwKu kCo6VmVA3Pmf43GSHw8y0TWv88974LHG2GHfcDTAkcJjBKqaa7hyWya+n27hzOB7Pb2zAUdNmNlRV jBBndgNiAfLhOfHRPuow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIWv9-007Yr7-Kf; Fri, 11 Feb 2022 14:29:12 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIWuB-007YNE-JM for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 14:28:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644589691; x=1676125691; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jyjqm1guo7eCJ26INStDNcH149noY5F5ukFsurO5hjM=; b=EO5X3LJInzCeC8PW0Qp8pMmm3Z3XGR2gREMdqCiOW5hLhtg5RwRo0VLn KGvrLj8eS3jOKelyPx6MR0ap8rZDbPzBBPo88Lgo3nTjWyXoh1sBnExiQ burNDDy1DB5rBSnUYgGv2Kopl7akJRX7fDFvyAw21O2YrhnIRL0YNxHxS eJeeDw8cMcdUHI+qQXYkRiHqigE3HuGymjZ+UjKwWoruvUvfUYnPto7HI TMUM51jXvXsctVR8Rixi9r2dyOTBNQse9+cl7jEeXgUDd6T2H/86iFcJA hH5qzUHlPlvp13V968moQVK/EFOFZt5a5magb2kofIwTE1C/X9TNCFhLN w==; X-IronPort-AV: E=Sophos;i="5.88,361,1635199200"; d="scan'208";a="22042287" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 11 Feb 2022 15:28:02 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Fri, 11 Feb 2022 15:28:02 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Fri, 11 Feb 2022 15:28:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1644589682; x=1676125682; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jyjqm1guo7eCJ26INStDNcH149noY5F5ukFsurO5hjM=; b=jUJbuqe9IzrHR55d/NDW2BudEfLR7S1sHyC8mcxeAipryI/O1JEWUtmM DZTrwwhyqnm4Y8Y2iY2iPmqFKT1iuQfWRz4EfT/Rp9ADL7o9jiu0RK4UD Xm7EtI4fk4An7zG2AKBNxCVi4HIIVnmWi95zNbRf9mAx2BKwwWlwOlSZm YSUtzY5CtMsUoGAzXVKci3hpcGtV/xNkYQRA35Jaf7gJAB/FVboRQAjrM 4jtTgRnbi2LbwHNXu/zO7AtM2E2E70vOltJ3yGOmzoD4DwOTGZJdfteJT cu0fTJV0GM1tBfzzA1SHNXYkc1qxTLTOTf3fBKdEtkp7erkdzhPMi7XLl A==; X-IronPort-AV: E=Sophos;i="5.88,361,1635199200"; d="scan'208";a="22042286" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 11 Feb 2022 15:28:02 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id D0D31280078; Fri, 11 Feb 2022 15:28:01 +0100 (CET) From: Alexander Stein To: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Rui Miguel Silva , Laurent Pinchart , Dorota Czaplejewicz Cc: Alexander Stein , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/9] media: imx: imx7_mipi_csis: store colorspace in set_fmt as well Date: Fri, 11 Feb 2022 15:27:48 +0100 Message-Id: <20220211142752.779952-6-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211142752.779952-1-alexander.stein@ew.tq-group.com> References: <20220211142752.779952-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_062811_974357_B4AA0F7A X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Without this the default (SMPTE 170M) from init_cfg stays unchanged. Even after configuring 'srgb' colorspace (or 'raw') $ media-ctl -V "'csis-32e30000.mipi-csi':0 [colorspace:srgb]" the colorspace does not change at all: $ media-ctl --get-v4l2 "'csis-32e30000.mipi-csi':0" [fmt:SRGGB10_1X10/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range] Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart --- Changes in v2: * Store other colorspace-related fields as well drivers/staging/media/imx/imx7-mipi-csis.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index a22d0e6b3d44..388cfd012212 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -1062,6 +1062,10 @@ static int mipi_csis_set_fmt(struct v4l2_subdev *sd, fmt->code = csis_fmt->code; fmt->width = sdformat->format.width; fmt->height = sdformat->format.height; + fmt->colorspace = sdformat->format.colorspace; + fmt->quantization = sdformat->format.quantization; + fmt->xfer_func = sdformat->format.xfer_func; + fmt->ycbcr_enc = sdformat->format.ycbcr_enc; sdformat->format = *fmt;