diff mbox series

[19/19] drm: Make passing of format info to drm_helper_mode_fill_fb_struct() mandatory

Message ID 20250410163218.15130-20-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm: Eliminate redundant drm_format_info lookups | expand

Commit Message

Ville Syrjala April 10, 2025, 4:32 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Now that everyone passes along the format info to
drm_helper_mode_fill_fb_struct() we can make this behaviour
mandatory and drop the extra lookup.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_modeset_helper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Laurent Pinchart April 10, 2025, 7:40 p.m. UTC | #1
Hi Ville,

Thank you for the patch.

On Thu, Apr 10, 2025 at 07:32:18PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Now that everyone passes along the format info to
> drm_helper_mode_fill_fb_struct() we can make this behaviour
> mandatory and drop the extra lookup.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/drm_modeset_helper.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c
> index ae2a83ecb1cf..3c153d420822 100644
> --- a/drivers/gpu/drm/drm_modeset_helper.c
> +++ b/drivers/gpu/drm/drm_modeset_helper.c
> @@ -86,8 +86,7 @@ void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
>  	int i;
>  
>  	fb->dev = dev;
> -	fb->format = info ? : drm_get_format_info(dev, mode_cmd->pixel_format,
> -						  mode_cmd->modifier[0]);
> +	fb->format = info;
>  	fb->width = mode_cmd->width;
>  	fb->height = mode_cmd->height;
>  	for (i = 0; i < 4; i++) {
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c
index ae2a83ecb1cf..3c153d420822 100644
--- a/drivers/gpu/drm/drm_modeset_helper.c
+++ b/drivers/gpu/drm/drm_modeset_helper.c
@@ -86,8 +86,7 @@  void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
 	int i;
 
 	fb->dev = dev;
-	fb->format = info ? : drm_get_format_info(dev, mode_cmd->pixel_format,
-						  mode_cmd->modifier[0]);
+	fb->format = info;
 	fb->width = mode_cmd->width;
 	fb->height = mode_cmd->height;
 	for (i = 0; i < 4; i++) {