All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: niklas.soderlund@ragnatech.se, laurent.pinchart@ideasonboard.com
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	tomi.valkeinen@ideasonboard.com, linux-media@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: [PATCH v2 10/10] media: rcar-vin: Support state-aware transmitters
Date: Wed, 16 Mar 2022 16:46:41 +0100	[thread overview]
Message-ID: <20220316154641.511667-11-jacopo+renesas@jmondi.org> (raw)
In-Reply-To: <20220316154641.511667-1-jacopo+renesas@jmondi.org>

The VIN driver calls get_fmt() on the remove subdev to validate its
format. Now that the R-Car CSI-2 driver are moved to be state-aware
subdevices they need their active state when calling operations.

Use the newly introduced v4l2_subdev_call_state_active() from
v4l2-subdev-legacy.h.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 drivers/media/platform/rcar-vin/rcar-dma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
index e08d4ca28725..68c192ea7cb5 100644
--- a/drivers/media/platform/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/rcar-vin/rcar-dma.c
@@ -14,6 +14,7 @@
 #include <linux/interrupt.h>
 #include <linux/pm_runtime.h>
 
+#include <media/v4l2-subdev-legacy.h>
 #include <media/videobuf2-dma-contig.h>
 
 #include "rcar-vin.h"
@@ -1140,7 +1141,7 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
 	};
 
 	fmt.pad = pad->index;
-	if (v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt))
+	if (v4l2_subdev_call_state_active(sd, pad, get_fmt, &fmt))
 		return -EPIPE;
 
 	switch (fmt.format.code) {
-- 
2.35.1


      parent reply	other threads:[~2022-03-16 15:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 15:46 [PATCH v2 00/10] media: Multiplexed streams for R-Car CSI-2 and ADV748x Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 01/10] media: adv748x: Add flags to adv748x_subdev_init() Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 02/10] media: adv748x: Add support for v4l2_subdev_state Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 03/10] media: adv748x: Move format to subdev state Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 04/10] media: adv748x: Implement .get_frame_desc() Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 05/10] media: adv748x: Implement set_routing Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 06/10] media: rcar-csi2: Add support for multiplexed streams Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 07/10] media: rcar-csi2: Move format to subdev state Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 08/10] media: rcar-csi2: Config by using the remote frame_desc Jacopo Mondi
2022-03-16 15:46 ` [PATCH v2 09/10] media: rcar-csi2: Implement set_routing Jacopo Mondi
2022-03-16 15:46 ` Jacopo Mondi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220316154641.511667-11-jacopo+renesas@jmondi.org \
    --to=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=tomi.valkeinen@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.