From mboxrd@z Thu Jan 1 00:00:00 1970 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 EEBE3C433EF for ; Wed, 27 Apr 2022 18:59:02 +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=D03aK3orgMDOBozudbTiMpzm+KpWQXqaMGTaY5FpqKQ=; b=nydsN8XgmvNRLs VcwYgeWzRfDgKYDVBF/DYz0BnDD6qfUO2xtRaci64GJzXJrIPdDyUc8hC68AC4cCpW2NVIrwmU1av nlufqwEUbNgcTA9bybQrnI1FafGG/u2urMpUA2/qJpgJQSeD4HjS9YXE0ZU8kK8riuFRKiAGZzMja jWnXVKQtY0hpvI8ZLI4mHRSeVJkZoHkwYQBjqomKrqpO0MSk7X1tdb8Doyq6u2uhjA/1rpmyRX/J8 khc+85I+gihZ+xwe2A3UcJTJy7JPTVTK2Qe9Wcc612dt+tu7qJm3busY3B9zjsu0d3xSuV8PqeUOy LX7OCmAWuBpGis5qzEXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njmrG-003BZq-N6; Wed, 27 Apr 2022 18:57:51 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njmrC-003BWe-Fo for linux-arm-kernel@lists.infradead.org; Wed, 27 Apr 2022 18:57:47 +0000 Received: by mail-ed1-x52d.google.com with SMTP id g23so2990084edy.13 for ; Wed, 27 Apr 2022 11:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lS8C6RafnPFCNmRPaomCz+ezzn4yOYEkgm2SdaKAMZI=; b=ZDu7GDl464M/0nwcaEtfEEZs5Fxg1kNlagzEHgnRotBKlFvj+00B5hR/pf/bjcjuZS q1zScpcN7dFJxVFDMKmX+tmpRSn7in8dC+R8lciLPrM1lexEE8awrKImCmC7EIS5fHMi VzaOs8XTnATEvT4ZL7DH/O2vH4PjyD0t8dqYOEFQsBgPZ8sLXTIeeFm4+OKFnv18HpxC KXsSAJY5j+7e5vsBGaDmv+Vk14oMoUCesWeky1KwjMkzg5iLEERO7C4smH49GU44jiYb 9EoVM+RL/K7XHB6JGJpC0TzPDTqyj2lgdsjTrntZWT9XU1cAtV9SLmysM6GG2/rDpkuB kMew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lS8C6RafnPFCNmRPaomCz+ezzn4yOYEkgm2SdaKAMZI=; b=urSowLdXq/MLgV2QxOpoXatlBKPK4/TuIA/obIsklmsTcw/stFcKHxsptUA8gw+URV 4PnHuFdjODoKrp30R4RZGnXR0ssZyZInrHXHq8UGPVzJmmm7I+aGEecnc1ml73yJlR4y DJvwuThVWwImIcN56/rTGmzl0kJO4/yd8X0EOD34UAFJXCRldDUTOn1RcATiavFziv7V zWVb3Ki8+kEv/dFFluErt5wim1DVj5QgY3fmCsqLzOUuTM+JdWCOKaW23h8NCLCnqZA4 aluM0K+sETLyCDwIUtsZWoKJsw2DKlYezgD8qgA2ZZ1W4xaqXN2PEAfEI4hv6sbn0HF9 KAFw== X-Gm-Message-State: AOAM530yHurHOPS9ApxNjg6iCKTRrHNtDgorazQnk04dYLOJFlaixLvu EfYQtQws1GYI49xKGbSgYdY= X-Google-Smtp-Source: ABdhPJxu/WwF4HrtuesVWTzeoHXa/tN782vJ4UvpmeYZHn3AjkOL/EKC8t2nbV85B9C2iugS5khM+A== X-Received: by 2002:a05:6402:27d0:b0:41a:68bf:ff26 with SMTP id c16-20020a05640227d000b0041a68bfff26mr32100632ede.102.1651085862897; Wed, 27 Apr 2022 11:57:42 -0700 (PDT) Received: from jernej-laptop.localnet (89-212-118-115.static.t-2.net. [89.212.118.115]) by smtp.gmail.com with ESMTPSA id e26-20020aa7d7da000000b0042617ba63ccsm29217eds.86.2022.04.27.11.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 11:57:42 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Paul Kocialkowski Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Samuel Holland , Laurent Pinchart , Maxime Ripard , Thomas Petazzoni Subject: Re: [PATCH v4 20/45] media: sun6i-csi: Add dimensions and format helpers to capture Date: Wed, 27 Apr 2022 20:57:41 +0200 Message-ID: <8054890.T7Z3S40VBb@jernej-laptop> In-Reply-To: <20220415152811.636419-21-paul.kocialkowski@bootlin.com> References: <20220415152811.636419-1-paul.kocialkowski@bootlin.com> <20220415152811.636419-21-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_115746_575268_325A9AF0 X-CRM114-Status: GOOD ( 16.04 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne petek, 15. april 2022 ob 17:27:46 CEST je Paul Kocialkowski napisal(a): > Define and export useful helpers to access dimensions and pixel format. > > Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Best regards, Jernej > --- > .../sunxi/sun6i-csi/sun6i_csi_capture.c | 19 +++++++++++++++++++ > .../sunxi/sun6i-csi/sun6i_csi_capture.h | 5 +++++ > 2 files changed, 24 insertions(+) > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c > b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c index > e227940cb66e..acbd0ea62fd5 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c > @@ -25,6 +25,25 @@ > > /* Helpers */ > > +void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev, > + unsigned int *width, unsigned int *height) > +{ > + if (width) > + *width = csi_dev->capture.format.fmt.pix.width; > + if (height) > + *height = csi_dev->capture.format.fmt.pix.height; > +} > + > +void sun6i_csi_capture_format(struct sun6i_csi_device *csi_dev, > + u32 *pixelformat, u32 *field) > +{ > + if (pixelformat) > + *pixelformat = csi_dev- >capture.format.fmt.pix.pixelformat; > + > + if (field) > + *field = csi_dev->capture.format.fmt.pix.field; > +} > + > static struct v4l2_subdev * > sun6i_csi_capture_remote_subdev(struct sun6i_csi_capture *capture, u32 > *pad) { > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h > b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h index > 7fa66a2af5ec..935f35b7049a 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.h > @@ -37,6 +37,11 @@ struct sun6i_csi_capture { > u32 mbus_code; > }; > > +void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev, > + unsigned int *width, unsigned int *height); > +void sun6i_csi_capture_format(struct sun6i_csi_device *csi_dev, > + u32 *pixelformat, u32 *field); > + > void sun6i_csi_capture_sync(struct sun6i_csi_device *csi_dev); > void sun6i_csi_capture_frame_done(struct sun6i_csi_device *csi_dev); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel