https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250307
--- Comment #8 from Jung-uk Kim <[email protected]> ---
It's little off-topic but I was not able to use SNA with iris. It always
failed with "(WW) intel(0): Detected unsupported/dysfunctional hardware,
disabling acceleration." in the log file. I did some debugging and found it
always failed at test_has_execbuffer2() function although we've been supporting
DRM_IOCTL_I915_GEM_EXECBUFFER2 ioctl for many years. IIRC, it was supported
even in drm2 days.
As a work-around, commenting out the test function let me enable SNA
successfully, i.e.,
Index: x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c
===================================================================
--- x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c (nonexistent)
+++ x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c (working copy)
@@ -0,0 +1,29 @@
+--- src/sna/kgem.c.orig 2020-05-15 16:56:58 UTC
++++ src/sna/kgem.c
+@@ -1186,6 +1186,7 @@ static int gem_param(struct kgem *kgem, int name)
+ return v;
+ }
+
++#ifndef __FreeBSD__
+ static bool test_has_execbuffer2(struct kgem *kgem)
+ {
+ struct drm_i915_gem_execbuffer2 execbuf;
+@@ -1197,6 +1198,7 @@ static bool test_has_execbuffer2(struct kgem *kgem)
+ DRM_IOCTL_I915_GEM_EXECBUFFER2,
+ &execbuf) == -EFAULT;
+ }
++#endif
+
+ static bool test_has_no_reloc(struct kgem *kgem)
+ {
+@@ -1252,8 +1254,10 @@ static bool is_hw_supported(struct kgem *kgem,
+ if (DBG_NO_HW)
+ return false;
+
++#ifndef __FreeBSD__
+ if (!test_has_execbuffer2(kgem))
+ return false;
++#endif
+
+ if (kgem->gen == (unsigned)-1) /* unknown chipset, assume future gen */
+ return kgem->has_blt;
In fact, I've been using this for few weeks now without a problem. My guess is
the ioctl wrapper do_ioctl() isn't working for our ioctl handler.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.