media: platform: rzg2l-cru: Use v4l2_fill_pixfmt()
authorDaniel Scally <dan.scally+renesas@ideasonboard.com>
Wed, 25 Jun 2025 09:20:30 +0000 (10:20 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 3 Jul 2025 07:04:14 +0000 (09:04 +0200)
commitace92ccef0c9bee4fad192b151c1aed9eef7f7c9
tree994940040d25ab7d3b45ff02649eafe94b86bfa5
parentac261abe73e3db462340645a84291ec384df7191
media: platform: rzg2l-cru: Use v4l2_fill_pixfmt()

Rather than open-code a calculation of the format's bytesperline
and sizeimage, use the v4l2_fill_pixfmt() helper. This makes it
easier to support the CRU packed pixel formats without over
complicating the driver.

This change makes the .bpp member of struct rzg2l_cru_ip_format
superfluous - remove them.

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Daniel Scally <dan.scally+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/20250625-rzg2l-cru-v6-4-a9099ed26c14@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c