From 0cc66153ec3c925a30c4c40d36d2245db4ce9a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 17 Mar 2023 14:01:47 +0100 Subject: [PATCH] vt(4) integration: Log FB_INFO based on `struct linux_fb_info` ... instead of FreeBSD's `struct fb_info`. [Why] With the introduction of `vt_drmfb`, we try to use `struct linux_fb_info` for every parameters and all callbacks. This is to make sure we use the same values as Linux, just in case we forget to update the corresponding FreeBSD's `struct fb_info`. --- drivers/gpu/drm/linux_fb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/linux_fb.c b/drivers/gpu/drm/linux_fb.c index a69f922f905..aa7c97cb9ee 100644 --- a/drivers/gpu/drm/linux_fb.c +++ b/drivers/gpu/drm/linux_fb.c @@ -100,15 +100,16 @@ vt_unfreeze_main_vd(void) } void -fb_info_print(struct fb_info *t) +fb_info_print(struct linux_fb_info *info) { printf("start FB_INFO:\n"); - printf("type=%d height=%d width=%d depth=%d\n", - t->fb_type, t->fb_height, t->fb_width, t->fb_depth); + printf("height=%d width=%d depth=%d\n", + info->var.yres, info->var.xres, info->var.bits_per_pixel); printf("pbase=0x%lx vbase=0x%lx\n", - t->fb_pbase, t->fb_vbase); - printf("name=%s flags=0x%x stride=%d bpp=%d\n", - t->fb_name, t->fb_flags, t->fb_stride, t->fb_bpp); + info->fix.smem_start, info->screen_base); + printf("name=%s id=%s flags=0x%x stride=%d\n", + info->fbio.fb_name, info->fix.id, info->fbio.fb_flags, + info->fix.line_length); printf("end FB_INFO\n"); } @@ -243,7 +244,7 @@ __register_framebuffer(struct linux_fb_info *fb_info) } return (-err); } - fb_info_print(&fb_info->fbio); + fb_info_print(fb_info); return 0; }