mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paweł Anikiel" <panikiel@google.com>
To: kieran.bingham@ideasonboard.com, mchehab@kernel.org,
	 hverkuil-cisco@xs4all.nl, tharvey@gateworks.com,
	 niklas.soderlund@ragnatech.se, prabhakar.csengg@gmail.com,
	 charles-antoine.couret@nexvision.fr, thierry.reding@gmail.com,
	 jonathanh@nvidia.com, skomatineni@nvidia.com,
	luca.ceresoli@bootlin.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	chromeos-krk-upstreaming@google.com,
	"Paweł Anikiel" <panikiel@google.com>
Subject: [PATCH 02/16] media: i2c: adv748x: Switch dv timing callbacks to pad ops
Date: Fri,  5 Apr 2024 14:13:57 +0000	[thread overview]
Message-ID: <20240405141411.1807189-3-panikiel@google.com> (raw)
In-Reply-To: <20240405141411.1807189-1-panikiel@google.com>

Change all (s|g|query)_dv_timings subdev callbacks to include
a pad argument.

Signed-off-by: Paweł Anikiel <panikiel@google.com>
---
 drivers/media/i2c/adv748x/adv748x-hdmi.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c
index ec151dc69c23..a4db9bae5f79 100644
--- a/drivers/media/i2c/adv748x/adv748x-hdmi.c
+++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c
@@ -214,7 +214,7 @@ static int adv748x_hdmi_set_video_timings(struct adv748x_state *state,
  * v4l2_subdev_video_ops
  */
 
-static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd,
+static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
 				     struct v4l2_dv_timings *timings)
 {
 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
@@ -254,7 +254,7 @@ static int adv748x_hdmi_s_dv_timings(struct v4l2_subdev *sd,
 	return ret;
 }
 
-static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd,
+static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
 				     struct v4l2_dv_timings *timings)
 {
 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
@@ -269,7 +269,7 @@ static int adv748x_hdmi_g_dv_timings(struct v4l2_subdev *sd,
 	return 0;
 }
 
-static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd,
+static int adv748x_hdmi_query_dv_timings(struct v4l2_subdev *sd, unsigned int pad,
 					 struct v4l2_dv_timings *timings)
 {
 	struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd);
@@ -392,9 +392,6 @@ static int adv748x_hdmi_g_pixelaspect(struct v4l2_subdev *sd,
 }
 
 static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
-	.s_dv_timings = adv748x_hdmi_s_dv_timings,
-	.g_dv_timings = adv748x_hdmi_g_dv_timings,
-	.query_dv_timings = adv748x_hdmi_query_dv_timings,
 	.g_input_status = adv748x_hdmi_g_input_status,
 	.s_stream = adv748x_hdmi_s_stream,
 	.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
@@ -413,7 +410,7 @@ static int adv748x_hdmi_propagate_pixelrate(struct adv748x_hdmi *hdmi)
 	if (!tx)
 		return -ENOLINK;
 
-	adv748x_hdmi_query_dv_timings(&hdmi->sd, &timings);
+	adv748x_hdmi_query_dv_timings(&hdmi->sd, 0, &timings);
 
 	return adv748x_csi2_set_pixelrate(tx, timings.bt.pixelclock);
 }
@@ -610,6 +607,9 @@ static const struct v4l2_subdev_pad_ops adv748x_pad_ops_hdmi = {
 	.get_fmt = adv748x_hdmi_get_format,
 	.get_edid = adv748x_hdmi_get_edid,
 	.set_edid = adv748x_hdmi_set_edid,
+	.s_dv_timings = adv748x_hdmi_s_dv_timings,
+	.g_dv_timings = adv748x_hdmi_g_dv_timings,
+	.query_dv_timings = adv748x_hdmi_query_dv_timings,
 	.dv_timings_cap = adv748x_hdmi_dv_timings_cap,
 	.enum_dv_timings = adv748x_hdmi_enum_dv_timings,
 };
@@ -734,7 +734,7 @@ int adv748x_hdmi_init(struct adv748x_hdmi *hdmi)
 	struct v4l2_dv_timings cea1280x720 = V4L2_DV_BT_CEA_1280X720P30;
 	int ret;
 
-	adv748x_hdmi_s_dv_timings(&hdmi->sd, &cea1280x720);
+	adv748x_hdmi_s_dv_timings(&hdmi->sd, 0, &cea1280x720);
 
 	/* Initialise a default 16:9 aspect ratio */
 	hdmi->aspect_ratio.numerator = 16;
-- 
2.44.0.478.gd926399ef9-goog


  parent reply	other threads:[~2024-04-05 14:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 14:13 [PATCH 00/16] Switch subdev " Paweł Anikiel
2024-04-05 14:13 ` [PATCH 01/16] media: v4l2-subdev: Add pad versions of dv timing subdev calls Paweł Anikiel
2024-04-05 14:13 ` Paweł Anikiel [this message]
2024-04-06 14:04   ` [PATCH 02/16] media: i2c: adv748x: Switch dv timing callbacks to pad ops Niklas Söderlund
2024-04-05 14:13 ` [PATCH 03/16] media: i2c: adv7511: " Paweł Anikiel
2024-04-05 14:13 ` [PATCH 04/16] media: i2c: adv7604: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 05/16] media: i2c: adv7842: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 06/16] media: i2c: tc358743: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 07/16] media: i2c: tda1997x: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 08/16] media: i2c: ths7303: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 09/16] media: i2c: ths8200: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 10/16] media: i2c: tvp7002: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 11/16] media: spi: gs1662: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 12/16] media: cobalt: Use pad variant of dv timing subdev calls Paweł Anikiel
2024-04-05 14:14 ` [PATCH 13/16] media: rcar-vin: " Paweł Anikiel
2024-04-06 14:03   ` Niklas Söderlund
2024-04-05 14:14 ` [PATCH 14/16] media: vpif_capture: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 15/16] media: tegra-video: " Paweł Anikiel
2024-04-05 14:14 ` [PATCH 16/16] media: v4l2-subdev: Remove non-pad dv timing callbacks Paweł Anikiel
2024-04-08 14:15 ` [PATCH 00/16] Switch subdev dv timing callbacks to pad ops Hans Verkuil
2024-04-08 14:17   ` Hans Verkuil
2024-04-08 15:25     ` Paweł Anikiel

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=20240405141411.1807189-3-panikiel@google.com \
    --to=panikiel@google.com \
    --cc=charles-antoine.couret@nexvision.fr \
    --cc=chromeos-krk-upstreaming@google.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jonathanh@nvidia.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=prabhakar.csengg@gmail.com \
    --cc=skomatineni@nvidia.com \
    --cc=tharvey@gateworks.com \
    --cc=thierry.reding@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®