All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH v2 9/9] media: v4l2-subdev: Rename pad config 'try_*' fields
Date: Fri, 27 Oct 2023 12:16:49 +0300	[thread overview]
Message-ID: <20231027091649.10553-10-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20231027091649.10553-1-laurent.pinchart@ideasonboard.com>

The try_fmt, try_crop and try_compose fields of the
v4l2_subdev_pad_config structure are misnamed (for historical reason) as
they also store data for the subdev active configuration. Rename them to
format, crop and compose respectively and update the accessor helpers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/v4l2-core/v4l2-subdev.c |  6 +++---
 include/media/v4l2-subdev.h           | 15 ++++++---------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index fa0a5b2933f6..2357d608194c 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -1694,7 +1694,7 @@ __v4l2_subdev_state_get_format_stream(struct v4l2_subdev_state *state,
 		if (WARN_ON(pad >= state->sd->entity.num_pads))
 			return NULL;
 
-		return &state->pads[pad].try_fmt;
+		return &state->pads[pad].format;
 	}
 
 	lockdep_assert_held(state->lock);
@@ -1728,7 +1728,7 @@ __v4l2_subdev_state_get_crop_stream(struct v4l2_subdev_state *state,
 		if (WARN_ON(pad >= state->sd->entity.num_pads))
 			return NULL;
 
-		return &state->pads[pad].try_crop;
+		return &state->pads[pad].crop;
 	}
 
 	lockdep_assert_held(state->lock);
@@ -1762,7 +1762,7 @@ __v4l2_subdev_state_get_compose_stream(struct v4l2_subdev_state *state,
 		if (WARN_ON(pad >= state->sd->entity.num_pads))
 			return NULL;
 
-		return &state->pads[pad].try_compose;
+		return &state->pads[pad].compose;
 	}
 
 	lockdep_assert_held(state->lock);
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 72131c943e06..b471e68aa5e7 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -688,17 +688,14 @@ struct v4l2_subdev_ir_ops {
 /**
  * struct v4l2_subdev_pad_config - Used for storing subdev pad information.
  *
- * @try_fmt: &struct v4l2_mbus_framefmt
- * @try_crop: &struct v4l2_rect to be used for crop
- * @try_compose: &struct v4l2_rect to be used for compose
- *
- * Note: This struct is also used in active state, and the 'try' prefix is
- * historical and to be removed.
+ * @format: &struct v4l2_mbus_framefmt
+ * @crop: &struct v4l2_rect to be used for crop
+ * @compose: &struct v4l2_rect to be used for compose
  */
 struct v4l2_subdev_pad_config {
-	struct v4l2_mbus_framefmt try_fmt;
-	struct v4l2_rect try_crop;
-	struct v4l2_rect try_compose;
+	struct v4l2_mbus_framefmt format;
+	struct v4l2_rect crop;
+	struct v4l2_rect compose;
 };
 
 /**
-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2023-10-27  9:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27  9:16 [PATCH v2 0/9] media: v4l2-subdev: Rename pad config 'try_*' fields Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 1/9] media: v4l2-subdev: Fix indentation in v4l2-subdev.h Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 2/9] media: v4l2-subdev: Drop outdated comment for v4l2_subdev_pad_config Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 3/9] media: microchip-isc: Remove dead code in pipeline validation Laurent Pinchart
2023-11-10 10:59   ` Eugen Hristev
2023-10-27  9:16 ` [PATCH v2 4/9] media: atmel-isi: Use accessors for pad config 'try_*' fields Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 5/9] media: atmel-isc: " Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 6/9] media: atomisp: " Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 7/9] media: tegra-video: " Laurent Pinchart
2023-10-27  9:16 ` [PATCH v2 8/9] media: i2c: " Laurent Pinchart
2023-10-27  9:16 ` Laurent Pinchart [this message]
2023-10-30  6:32 [PATCH v2 6/9] media: atomisp: " kernel test robot
2023-10-31  1:51 ` kernel test robot

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=20231027091649.10553-10-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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.