[PATCH 05/26] drm/fb-helper: set fbi->fix.id in fill_info()
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Jan 24 17:28:39 UTC 2019
On Thu, Jan 24, 2019 at 5:58 PM Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
>
> Looking at the oldest/most popular drivers ${driver}drmfb seems to be
> the standard, except i915.ko went with "inteldrmfb". I guess renaming
> that for consistency won't hurt, it definitely confused me when I
> started with kms 10 years ago.
>
> I hope this never became uapi ... worst case drivers can overwrite it
> after having called fill_info().
>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Since subsequent patches change this for some drivers later on in the
series, here's the exhaustive list of where all fix.id is used:
- /proc/fb which prints the minor number and fix.id name.
- per-fb sysfs name file
- getfix ioctl, which is used by fbset only to print out the name when
dumping information
- lots and lots of places in dmesg, anytime anything happens with an
fbdev really
I think minimal to 0 chances that changing this will screw up a config
script or something, since outside of informational message it's not
used by anything to identify which fbdev maps to which minor. After
all the last fbset release is from 1999, and that predates even devfs
I think.
I'll add the above to the commit message when merging/resending.
Thanks to Ilia for pointing out.
-Daniel
> ---
> drivers/gpu/drm/drm_fb_helper.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 34c4ed378796..20969c05a9e3 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -2126,6 +2126,9 @@ void drm_fb_helper_fill_info(struct fb_info *info,
> drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> drm_fb_helper_fill_var(info, fb_helper, fb->width, fb->height);
>
> + snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
> + fb_helper->dev->driver->name);
> +
> }
> EXPORT_SYMBOL(drm_fb_helper_fill_info);
>
> @@ -3185,8 +3188,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
> fbi->fix.smem_start =
> page_to_phys(virt_to_page(fbi->screen_buffer));
> #endif
> - strcpy(fbi->fix.id, "DRM emulated");
> -
> drm_fb_helper_fill_info(fbi, fb_helper);
>
> if (fb->funcs->dirty) {
> --
> 2.20.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dri-devel
mailing list