Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/malidp: Pass along the format info from .fb_create() malidp_verify_afbc_framebuffer_size()

Plumb the format info from .fb_create() all the way to
malidp_verify_afbc_framebuffer_size() to avoid the
redundant lookup.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-7-ville.syrjala@linux.intel.com

+4 -6
+4 -6
drivers/gpu/drm/arm/malidp_drv.c
··· 306 306 static bool 307 307 malidp_verify_afbc_framebuffer_size(struct drm_device *dev, 308 308 struct drm_file *file, 309 + const struct drm_format_info *info, 309 310 const struct drm_mode_fb_cmd2 *mode_cmd) 310 311 { 311 312 int n_superblocks = 0; 312 - const struct drm_format_info *info; 313 313 struct drm_gem_object *objs = NULL; 314 314 u32 afbc_superblock_size = 0, afbc_superblock_height = 0; 315 315 u32 afbc_superblock_width = 0, afbc_size = 0; ··· 324 324 DRM_DEBUG_KMS("AFBC superblock size is not supported\n"); 325 325 return false; 326 326 } 327 - 328 - info = drm_get_format_info(dev, mode_cmd->pixel_format, 329 - mode_cmd->modifier[0]); 330 327 331 328 n_superblocks = (mode_cmd->width / afbc_superblock_width) * 332 329 (mode_cmd->height / afbc_superblock_height); ··· 364 367 365 368 static bool 366 369 malidp_verify_afbc_framebuffer(struct drm_device *dev, struct drm_file *file, 370 + const struct drm_format_info *info, 367 371 const struct drm_mode_fb_cmd2 *mode_cmd) 368 372 { 369 373 if (malidp_verify_afbc_framebuffer_caps(dev, mode_cmd)) 370 - return malidp_verify_afbc_framebuffer_size(dev, file, mode_cmd); 374 + return malidp_verify_afbc_framebuffer_size(dev, file, info, mode_cmd); 371 375 372 376 return false; 373 377 } ··· 379 381 const struct drm_mode_fb_cmd2 *mode_cmd) 380 382 { 381 383 if (mode_cmd->modifier[0]) { 382 - if (!malidp_verify_afbc_framebuffer(dev, file, mode_cmd)) 384 + if (!malidp_verify_afbc_framebuffer(dev, file, info, mode_cmd)) 383 385 return ERR_PTR(-EINVAL); 384 386 } 385 387