From 4947a2513b29862cf3801d6d4713bd1d85baf7dc Mon Sep 17 00:00:00 2001 From: Vladimir Kondratyev Date: Sun, 13 Oct 2024 19:34:48 +0300 Subject: [PATCH 01/27] vt_drmfb: drop dependency on struct drm_fb_helper Generic framebufer driver is a lower layer than drm framebufer. It should not depend on later. The only usage of passing `struct drm_fb_helper` to vt_drmfb was using it as a container of reference to parent BSD device. Pass device directly from drm to vt_drmfb to not depend on drm. Sponsored by: Future Crew LLC --- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/linux_fb.c | 10 ---------- drivers/gpu/drm/vt_drmfb.c | 8 +------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index da9449b37291..afe5fbe23ea7 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1901,7 +1901,7 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper) info->var.pixclock = 0; #ifdef __FreeBSD__ - info->fbio.fb_priv = fb_helper; + info->fb_bsddev = dev->dev->bsddev; #endif /* Need to drop locks to avoid recursive deadlock in diff --git a/drivers/gpu/drm/linux_fb.c b/drivers/gpu/drm/linux_fb.c index 10d34554ae23..49cda3eb6f35 100644 --- a/drivers/gpu/drm/linux_fb.c +++ b/drivers/gpu/drm/linux_fb.c @@ -24,11 +24,6 @@ * */ -#include -__FBSDID("$FreeBSD$"); - -#undef fb_info - #include #include #include @@ -41,10 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include "vt_drmfb.h" -#include #include #include