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/exynos: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()

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

For the fbdev case a manual drm_get_format_info() lookup
is needed.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-12-ville.syrjala@linux.intel.com

+8 -3
+3 -2
drivers/gpu/drm/exynos/exynos_drm_fb.c
··· 56 56 57 57 struct drm_framebuffer * 58 58 exynos_drm_framebuffer_init(struct drm_device *dev, 59 + const struct drm_format_info *info, 59 60 const struct drm_mode_fb_cmd2 *mode_cmd, 60 61 struct exynos_drm_gem **exynos_gem, 61 62 int count) ··· 77 76 fb->obj[i] = &exynos_gem[i]->base; 78 77 } 79 78 80 - drm_helper_mode_fill_fb_struct(dev, fb, NULL, mode_cmd); 79 + drm_helper_mode_fill_fb_struct(dev, fb, info, mode_cmd); 81 80 82 81 ret = drm_framebuffer_init(dev, fb, &exynos_drm_fb_funcs); 83 82 if (ret < 0) { ··· 125 124 } 126 125 } 127 126 128 - fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i); 127 + fb = exynos_drm_framebuffer_init(dev, info, mode_cmd, exynos_gem, i); 129 128 if (IS_ERR(fb)) { 130 129 ret = PTR_ERR(fb); 131 130 goto err;
+1
drivers/gpu/drm/exynos/exynos_drm_fb.h
··· 14 14 15 15 struct drm_framebuffer * 16 16 exynos_drm_framebuffer_init(struct drm_device *dev, 17 + const struct drm_format_info *info, 17 18 const struct drm_mode_fb_cmd2 *mode_cmd, 18 19 struct exynos_drm_gem **exynos_gem, 19 20 int count);
+4 -1
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
··· 116 116 return PTR_ERR(exynos_gem); 117 117 118 118 helper->fb = 119 - exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); 119 + exynos_drm_framebuffer_init(dev, 120 + drm_get_format_info(dev, mode_cmd.pixel_format, 121 + mode_cmd.modifier[0]), 122 + &mode_cmd, &exynos_gem, 1); 120 123 if (IS_ERR(helper->fb)) { 121 124 DRM_DEV_ERROR(dev->dev, "failed to create drm framebuffer.\n"); 122 125 ret = PTR_ERR(helper->fb);