All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] rcar-vin: Use correct pixel format when aligning format
@ 2019-12-04 17:57 Niklas Söderlund
  2019-12-05  8:52 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Niklas Söderlund @ 2019-12-04 17:57 UTC (permalink / raw)
  To: Laurent Pinchart, linux-media; +Cc: linux-renesas-soc, Niklas Söderlund

When aligning the format the pixel format that is being processed shall
be used to figure out alignment constraints, not the currently active
pixel format. The alignment might be part of a try operation and shall
not be effected by the active format. Fix this by looking at the correct
pixel format.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 62d308a4ddaee82e..339cb2de111de166 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -149,7 +149,7 @@ static void rvin_format_align(struct rvin_dev *vin, struct v4l2_pix_format *pix)
 	}
 
 	/* HW limit width to a multiple of 32 (2^5) for NV12/16 else 2 (2^1) */
-	switch (vin->format.pixelformat) {
+	switch (pix->pixelformat) {
 	case V4L2_PIX_FMT_NV12:
 	case V4L2_PIX_FMT_NV16:
 		walign = 5;
-- 
2.24.0


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

* Re: [PATCH v2] rcar-vin: Use correct pixel format when aligning format
  2019-12-04 17:57 [PATCH v2] rcar-vin: Use correct pixel format when aligning format Niklas Söderlund
@ 2019-12-05  8:52 ` Laurent Pinchart
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2019-12-05  8:52 UTC (permalink / raw)
  To: Niklas Söderlund; +Cc: linux-media, linux-renesas-soc

Hi Niklas,

Thank you for the patch.

On Wed, Dec 04, 2019 at 06:57:59PM +0100, Niklas Söderlund wrote:
> When aligning the format the pixel format that is being processed shall
> be used to figure out alignment constraints, not the currently active
> pixel format. The alignment might be part of a try operation and shall
> not be effected by the active format. Fix this by looking at the correct
> pixel format.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

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

> ---
>  drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> index 62d308a4ddaee82e..339cb2de111de166 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -149,7 +149,7 @@ static void rvin_format_align(struct rvin_dev *vin, struct v4l2_pix_format *pix)
>  	}
>  
>  	/* HW limit width to a multiple of 32 (2^5) for NV12/16 else 2 (2^1) */
> -	switch (vin->format.pixelformat) {
> +	switch (pix->pixelformat) {
>  	case V4L2_PIX_FMT_NV12:
>  	case V4L2_PIX_FMT_NV16:
>  		walign = 5;

-- 
Regards,

Laurent Pinchart

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

end of thread, other threads:[~2019-12-05  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 17:57 [PATCH v2] rcar-vin: Use correct pixel format when aligning format Niklas Söderlund
2019-12-05  8:52 ` Laurent Pinchart

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.