linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect
@ 2025-07-05  8:37 Niklas Söderlund
  2025-07-05  8:37 ` [PATCH 1/3] media: adv7180: Remove g_pixelaspect implementation Niklas Söderlund
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Niklas Söderlund @ 2025-07-05  8:37 UTC (permalink / raw)
  To: Lars-Peter Clausen, Mauro Carvalho Chehab, Kieran Bingham,
	Laurent Pinchart, linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

Hello,

With the recent cleanup of the R-Car VIN driver the last user of the 
subdevice operation .g_pixelaspect have been addressed. We can now 
remove the two last implementations in adv7180 and adv748x, and then 
remove the operation from the internal API.

The operation where kept in adv7180 and adv748x to support to R-Car VIN 
as these devices are used on some of the evaluation platforms.

Patch 1/3 and 2/3 removes the implementations while patch 3/3 removes 
the operation from the internal API.

Niklas Söderlund (3):
  media: adv7180: Remove g_pixelaspect implementation
  media: adv748x: Remove g_pixelaspect implementation
  media: v4l2-subdev: Remove g_pixelaspect operation

 drivers/media/i2c/adv7180.c              | 16 ----------------
 drivers/media/i2c/adv748x/adv748x-afe.c  | 17 -----------------
 drivers/media/i2c/adv748x/adv748x-hdmi.c | 10 ----------
 include/media/v4l2-subdev.h              |  3 ---
 4 files changed, 46 deletions(-)

-- 
2.50.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] media: adv7180: Remove g_pixelaspect implementation
  2025-07-05  8:37 [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Niklas Söderlund
@ 2025-07-05  8:37 ` Niklas Söderlund
  2025-07-05  8:37 ` [PATCH 2/3] media: adv748x: " Niklas Söderlund
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2025-07-05  8:37 UTC (permalink / raw)
  To: Lars-Peter Clausen, Mauro Carvalho Chehab, Kieran Bingham,
	Laurent Pinchart, linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

There are no consumer left of g_pixelaspect in the tree, remove the
implementation from the adv7180 driver in preparation of removing it
from struct v4l2_subdev_video_ops all together.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/i2c/adv7180.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 6e50b14f888f..5d90b8ab9b6d 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -868,21 +868,6 @@ static int adv7180_get_skip_frames(struct v4l2_subdev *sd, u32 *frames)
 	return 0;
 }
 
-static int adv7180_g_pixelaspect(struct v4l2_subdev *sd, struct v4l2_fract *aspect)
-{
-	struct adv7180_state *state = to_state(sd);
-
-	if (state->curr_norm & V4L2_STD_525_60) {
-		aspect->numerator = 11;
-		aspect->denominator = 10;
-	} else {
-		aspect->numerator = 54;
-		aspect->denominator = 59;
-	}
-
-	return 0;
-}
-
 static int adv7180_g_tvnorms(struct v4l2_subdev *sd, v4l2_std_id *norm)
 {
 	*norm = V4L2_STD_ALL;
@@ -929,7 +914,6 @@ static const struct v4l2_subdev_video_ops adv7180_video_ops = {
 	.querystd = adv7180_querystd,
 	.g_input_status = adv7180_g_input_status,
 	.s_routing = adv7180_s_routing,
-	.g_pixelaspect = adv7180_g_pixelaspect,
 	.g_tvnorms = adv7180_g_tvnorms,
 	.s_stream = adv7180_s_stream,
 };
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] media: adv748x: Remove g_pixelaspect implementation
  2025-07-05  8:37 [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Niklas Söderlund
  2025-07-05  8:37 ` [PATCH 1/3] media: adv7180: Remove g_pixelaspect implementation Niklas Söderlund
@ 2025-07-05  8:37 ` Niklas Söderlund
  2025-07-05  8:37 ` [PATCH 3/3] media: v4l2-subdev: Remove g_pixelaspect operation Niklas Söderlund
  2025-07-05 12:10 ` [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Laurent Pinchart
  3 siblings, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2025-07-05  8:37 UTC (permalink / raw)
  To: Lars-Peter Clausen, Mauro Carvalho Chehab, Kieran Bingham,
	Laurent Pinchart, linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

There are no consumer left of g_pixelaspect in the tree, remove the
implementation from the adv748x driver in preparation of removing it
from struct v4l2_subdev_video_ops all together.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/i2c/adv748x/adv748x-afe.c  | 17 -----------------
 drivers/media/i2c/adv748x/adv748x-hdmi.c | 10 ----------
 2 files changed, 27 deletions(-)

diff --git a/drivers/media/i2c/adv748x/adv748x-afe.c b/drivers/media/i2c/adv748x/adv748x-afe.c
index 5edb3295dc58..678199196b84 100644
--- a/drivers/media/i2c/adv748x/adv748x-afe.c
+++ b/drivers/media/i2c/adv748x/adv748x-afe.c
@@ -161,22 +161,6 @@ int adv748x_afe_s_input(struct adv748x_afe *afe, unsigned int input)
 	return sdp_write(state, ADV748X_SDP_INSEL, input);
 }
 
-static int adv748x_afe_g_pixelaspect(struct v4l2_subdev *sd,
-				     struct v4l2_fract *aspect)
-{
-	struct adv748x_afe *afe = adv748x_sd_to_afe(sd);
-
-	if (afe->curr_norm & V4L2_STD_525_60) {
-		aspect->numerator = 11;
-		aspect->denominator = 10;
-	} else {
-		aspect->numerator = 54;
-		aspect->denominator = 59;
-	}
-
-	return 0;
-}
-
 /* -----------------------------------------------------------------------------
  * v4l2_subdev_video_ops
  */
@@ -307,7 +291,6 @@ static const struct v4l2_subdev_video_ops adv748x_afe_video_ops = {
 	.g_tvnorms = adv748x_afe_g_tvnorms,
 	.g_input_status = adv748x_afe_g_input_status,
 	.s_stream = adv748x_afe_s_stream,
-	.g_pixelaspect = adv748x_afe_g_pixelaspect,
 };
 
 /* -----------------------------------------------------------------------------
diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c
index a4db9bae5f79..b154dea29ba2 100644
--- a/drivers/media/i2c/adv748x/adv748x-hdmi.c
+++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c
@@ -382,19 +382,9 @@ static int adv748x_hdmi_s_stream(struct v4l2_subdev *sd, int enable)
 	return ret;
 }
 
-static int adv748x_hdmi_g_pixelaspect(struct v4l2_subdev *sd,
-				      struct v4l2_fract *aspect)
-{
-	aspect->numerator = 1;
-	aspect->denominator = 1;
-
-	return 0;
-}
-
 static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
 	.g_input_status = adv748x_hdmi_g_input_status,
 	.s_stream = adv748x_hdmi_s_stream,
-	.g_pixelaspect = adv748x_hdmi_g_pixelaspect,
 };
 
 /* -----------------------------------------------------------------------------
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] media: v4l2-subdev: Remove g_pixelaspect operation
  2025-07-05  8:37 [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Niklas Söderlund
  2025-07-05  8:37 ` [PATCH 1/3] media: adv7180: Remove g_pixelaspect implementation Niklas Söderlund
  2025-07-05  8:37 ` [PATCH 2/3] media: adv748x: " Niklas Söderlund
@ 2025-07-05  8:37 ` Niklas Söderlund
  2025-07-05 12:10 ` [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Laurent Pinchart
  3 siblings, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2025-07-05  8:37 UTC (permalink / raw)
  To: Lars-Peter Clausen, Mauro Carvalho Chehab, Kieran Bingham,
	Laurent Pinchart, linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

There are no consumers or implementations left in tree for the subdevice
operation g_pixelaspect, delete it.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 include/media/v4l2-subdev.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 57f2bcb4eb16..5dcf4065708f 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -460,8 +460,6 @@ enum v4l2_subdev_pre_streamon_flags {
  *	but use the v4l2_subdev_enable_streams() and
  *	v4l2_subdev_disable_streams() helpers.
  *
- * @g_pixelaspect: callback to return the pixelaspect ratio.
- *
  * @s_rx_buffer: set a host allocated memory buffer for the subdev. The subdev
  *	can adjust @size to a lower value and must not write more data to the
  *	buffer starting at @data than the original value of @size.
@@ -491,7 +489,6 @@ struct v4l2_subdev_video_ops {
 	int (*g_tvnorms_output)(struct v4l2_subdev *sd, v4l2_std_id *std);
 	int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
 	int (*s_stream)(struct v4l2_subdev *sd, int enable);
-	int (*g_pixelaspect)(struct v4l2_subdev *sd, struct v4l2_fract *aspect);
 	int (*s_rx_buffer)(struct v4l2_subdev *sd, void *buf,
 			   unsigned int *size);
 	int (*pre_streamon)(struct v4l2_subdev *sd, u32 flags);
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect
  2025-07-05  8:37 [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Niklas Söderlund
                   ` (2 preceding siblings ...)
  2025-07-05  8:37 ` [PATCH 3/3] media: v4l2-subdev: Remove g_pixelaspect operation Niklas Söderlund
@ 2025-07-05 12:10 ` Laurent Pinchart
  3 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2025-07-05 12:10 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: Lars-Peter Clausen, Mauro Carvalho Chehab, Kieran Bingham,
	linux-media, linux-renesas-soc

Hi Niklas,

Thank you for the patches.

On Sat, Jul 05, 2025 at 10:37:38AM +0200, Niklas Söderlund wrote:
> Hello,
> 
> With the recent cleanup of the R-Car VIN driver the last user of the 
> subdevice operation .g_pixelaspect have been addressed. We can now 
> remove the two last implementations in adv7180 and adv748x, and then 
> remove the operation from the internal API.
> 
> The operation where kept in adv7180 and adv748x to support to R-Car VIN 
> as these devices are used on some of the evaluation platforms.
> 
> Patch 1/3 and 2/3 removes the implementations while patch 3/3 removes 
> the operation from the internal API.
> 
> Niklas Söderlund (3):
>   media: adv7180: Remove g_pixelaspect implementation
>   media: adv748x: Remove g_pixelaspect implementation
>   media: v4l2-subdev: Remove g_pixelaspect operation

For the whole series,

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

>  drivers/media/i2c/adv7180.c              | 16 ----------------
>  drivers/media/i2c/adv748x/adv748x-afe.c  | 17 -----------------
>  drivers/media/i2c/adv748x/adv748x-hdmi.c | 10 ----------
>  include/media/v4l2-subdev.h              |  3 ---
>  4 files changed, 46 deletions(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-05 12:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-05  8:37 [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Niklas Söderlund
2025-07-05  8:37 ` [PATCH 1/3] media: adv7180: Remove g_pixelaspect implementation Niklas Söderlund
2025-07-05  8:37 ` [PATCH 2/3] media: adv748x: " Niklas Söderlund
2025-07-05  8:37 ` [PATCH 3/3] media: v4l2-subdev: Remove g_pixelaspect operation Niklas Söderlund
2025-07-05 12:10 ` [PATCH 0/3] media: Remove remains of v4l2_subdev_video_ops.g_pixelaspect Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).