Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147713188
D45059.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D45059.diff
View Options
Index: graphics/drm-510-kmod/files/patch-drivers_gpu_drm_linux__fb.c
===================================================================
--- /dev/null
+++ graphics/drm-510-kmod/files/patch-drivers_gpu_drm_linux__fb.c
@@ -0,0 +1,42 @@
+--- drivers/gpu/drm/linux_fb.c.orig 2023-12-17 11:50:44 UTC
++++ drivers/gpu/drm/linux_fb.c
+@@ -38,9 +38,11 @@ __FBSDID("$FreeBSD$");
+ #include <sys/sx.h>
+ #include <sys/fbio.h>
+
++#if __FreeBSD_version < 1400512
+ #include <vm/vm.h>
+ #include <vm/vm_page.h>
+ #include <vm/vm_phys.h>
++#endif
+
+ #include <dev/vt/vt.h>
+ #include <dev/vt/hw/fb/vt_fb.h>
+@@ -200,6 +202,7 @@ __register_framebuffer(struct linux_fb_info *fb_info)
+
+ MPASS(fb_info->apertures->ranges[0].base);
+ MPASS(fb_info->apertures->ranges[0].size);
++#if __FreeBSD_version < 1400512
+ vm_phys_fictitious_reg_range(fb_info->apertures->ranges[0].base,
+ fb_info->apertures->ranges[0].base +
+ fb_info->apertures->ranges[0].size,
+@@ -208,6 +211,7 @@ __register_framebuffer(struct linux_fb_info *fb_info)
+ #else
+ VM_MEMATTR_UNCACHEABLE);
+ #endif
++#endif
+
+ fb_info->fbio.fb_type = FBTYPE_PCIMISC;
+ fb_info->fbio.fb_height = fb_info->var.yres;
+@@ -251,9 +255,11 @@ __unregister_framebuffer(struct linux_fb_info *fb_info
+ {
+ int ret = 0;
+
++#if __FreeBSD_version < 1400512
+ vm_phys_fictitious_unreg_range(fb_info->apertures->ranges[0].base,
+ fb_info->apertures->ranges[0].base +
+ fb_info->apertures->ranges[0].size);
++#endif
+ if (fb_info->fbio.fb_fbd_dev) {
+ mtx_lock(&Giant);
+ device_delete_child(fb_info->fb_bsddev, fb_info->fbio.fb_fbd_dev);
Index: graphics/drm-515-kmod/files/patch-drivers_gpu_drm_linux__fb.c
===================================================================
--- /dev/null
+++ graphics/drm-515-kmod/files/patch-drivers_gpu_drm_linux__fb.c
@@ -0,0 +1,45 @@
+--- drivers/gpu/drm/linux_fb.c.orig 2024-03-14 17:31:28 UTC
++++ drivers/gpu/drm/linux_fb.c
+@@ -38,9 +38,12 @@ __FBSDID("$FreeBSD$");
+ #include <sys/sx.h>
+ #include <sys/fbio.h>
+
++#if __FreeBSD_version < 1400512 || \
++ (__FreeBSD_version >= 1500000 && __FreeBSD_version < 1500019)
+ #include <vm/vm.h>
+ #include <vm/vm_page.h>
+ #include <vm/vm_phys.h>
++#endif
+
+ #include <dev/vt/vt.h>
+ #include <dev/vt/hw/fb/vt_fb.h>
+@@ -200,6 +203,8 @@ __register_framebuffer(struct linux_fb_info *fb_info)
+
+ MPASS(fb_info->apertures->ranges[0].base);
+ MPASS(fb_info->apertures->ranges[0].size);
++#if __FreeBSD_version < 1400512 || \
++ (__FreeBSD_version >= 1500000 && __FreeBSD_version < 1500019)
+ vm_phys_fictitious_reg_range(fb_info->apertures->ranges[0].base,
+ fb_info->apertures->ranges[0].base +
+ fb_info->apertures->ranges[0].size,
+@@ -208,6 +213,7 @@ __register_framebuffer(struct linux_fb_info *fb_info)
+ #else
+ VM_MEMATTR_UNCACHEABLE);
+ #endif
++#endif
+
+ fb_info->fbio.fb_type = FBTYPE_PCIMISC;
+ fb_info->fbio.fb_height = fb_info->var.yres;
+@@ -264,9 +270,12 @@ __unregister_framebuffer(struct linux_fb_info *fb_info
+ {
+ int ret = 0;
+
++#if __FreeBSD_version < 1400512 || \
++ (__FreeBSD_version >= 1500000 && __FreeBSD_version < 1500019)
+ vm_phys_fictitious_unreg_range(fb_info->apertures->ranges[0].base,
+ fb_info->apertures->ranges[0].base +
+ fb_info->apertures->ranges[0].size);
++#endif
+ if (fb_info->fbio.fb_fbd_dev) {
+ mtx_lock(&Giant);
+ device_delete_child(fb_info->fb_bsddev, fb_info->fbio.fb_fbd_dev);
Index: graphics/drm-61-kmod/files/patch-drivers_gpu_drm_drm__os__freebsd.c
===================================================================
--- /dev/null
+++ graphics/drm-61-kmod/files/patch-drivers_gpu_drm_drm__os__freebsd.c
@@ -0,0 +1,51 @@
+--- drivers/gpu/drm/drm_os_freebsd.c.orig 2024-03-14 17:26:38 UTC
++++ drivers/gpu/drm/drm_os_freebsd.c
+@@ -8,7 +8,7 @@ __FBSDID("$FreeBSD$");
+ #include <drm/drm_fb_helper.h>
+ #include <drm/drm_os_freebsd.h>
+
+-#include <sys/types.h>
++#include <sys/param.h>
+ #include <sys/bus.h>
+ #include <dev/agp/agpreg.h>
+ #include <dev/pci/pcireg.h>
+@@ -18,7 +18,10 @@ __FBSDID("$FreeBSD$");
+ #include <dev/iicbus/iicbus.h>
+ #include <dev/iicbus/iiconf.h>
+
++#if __FreeBSD_version < 1400512 || \
++ (__FreeBSD_version >= 1500000 && __FreeBSD_version < 1500019)
+ #include <vm/vm_phys.h>
++#endif
+
+ #include <linux/cdev.h>
+ #include <linux/fb.h>
+@@ -94,6 +97,9 @@ register_fictitious_range(vm_paddr_t base, size_t size
+ vt_freeze_main_vd(ap);
+ kfree(ap);
+
++ ret = 0;
++#if __FreeBSD_version < 1400512 || \
++ (__FreeBSD_version >= 1500000 && __FreeBSD_version < 1500019)
+ ret = vm_phys_fictitious_reg_range(base, base + size,
+ #ifdef VM_MEMATTR_WRITE_COMBINING
+ VM_MEMATTR_WRITE_COMBINING
+@@ -102,6 +108,7 @@ register_fictitious_range(vm_paddr_t base, size_t size
+ #endif
+ );
+ MPASS(ret == 0);
++#endif
+
+ return (ret);
+ }
+@@ -109,7 +116,10 @@ unregister_fictitious_range(vm_paddr_t base, size_t si
+ void
+ unregister_fictitious_range(vm_paddr_t base, size_t size)
+ {
++#if __FreeBSD_version < 1400512 || \
++ (__FreeBSD_version >= 1500000 && __FreeBSD_version < 1500019)
+ vm_phys_fictitious_unreg_range(base, base + size);
++#endif
+ vt_unfreeze_main_vd();
+ }
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 14, 3:39 AM (3 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29649765
Default Alt Text
D45059.diff (5 KB)
Attached To
Mode
D45059: graphics/drm-*-kmod: Add patch to test D45058
Attached
Detach File
Event Timeline
Log In to Comment