aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_display.h
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2025-07-01 09:07:05 +0000
committerVille Syrjälä <[email protected]>2025-07-16 17:01:13 +0000
commit0e7d5874fb6b80c44be3cfbcf1cf356e81d91232 (patch)
tree2da2214e0f213a01d25b78d0e482f793ae016040 /drivers/gpu/drm/amd/amdgpu/amdgpu_display.h
parentdrm: Pass pixel_format+modifier to .get_format_info() (diff)
downloadkernel-0e7d5874fb6b80c44be3cfbcf1cf356e81d91232.tar.gz
kernel-0e7d5874fb6b80c44be3cfbcf1cf356e81d91232.zip
drm: Pass pixel_format+modifier directly to drm_get_format_info()
Decouple drm_get_format_info() from struct drm_mode_fb_cmd2 and just pass the pixel format+modifier combo in by hand. We may want to use drm_get_format_info() outside of the normal addfb paths where we won't have a struct drm_mode_fb_cmd2, and creating a temporary one just for this seems silly. Done with cocci: @@ identifier dev, mode_cmd; @@ struct drm_format_info * drm_get_format_info(struct drm_device *dev, - const struct drm_mode_fb_cmd2 *mode_cmd + u32 pixel_format, u64 modifier ) { <... ( - mode_cmd->pixel_format + pixel_format | - mode_cmd->modifier[0] + modifier ) ...> } @@ identifier dev, mode_cmd; @@ struct drm_format_info * drm_get_format_info(struct drm_device *dev, - const struct drm_mode_fb_cmd2 *mode_cmd + u32 pixel_format, u64 modifier ); @@ expression dev, mode_cmd; @@ - drm_get_format_info(dev, mode_cmd) + drm_get_format_info(dev, mode_cmd->pixel_format, mode_cmd->modifier[0]) v2: Fix kernel docs (Laurent) Drop drm_mode_fb_cmd2 forward declaration (Thomas) Cc: Liviu Dudau <[email protected]> Cc: Russell King <[email protected]> Cc: Inki Dae <[email protected]> Cc: Seung-Woo Kim <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Patrik Jakobsson <[email protected]> Cc: Chun-Kuang Hu <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: Rob Clark <[email protected]> Cc: Abhinav Kumar <[email protected]> Cc: Dmitry Baryshkov <[email protected]> Cc: Sean Paul <[email protected]> Cc: Marijn Suijten <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Danilo Krummrich <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Sandy Huang <[email protected]> Cc: "Heiko Stübner" <[email protected]> Cc: Andy Yan <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Mikko Perttunen <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Thomas Zimmermann <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.h')
0 files changed, 0 insertions, 0 deletions