R7 370 (Pitcairn) issues

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

R7 370 (Pitcairn) issues

lord nihil.
I have recently upgraded from an Intel iGPU to the Sapphire overclocked variant of the Radeon R7 370. I have all the X tarballs installed & start X with xenodm. While it mostly works well in OpenBSD (drm & radeon kernel drivers attach & I get video), I am having 2 distinct major issues with the card:

1. DRI{1,2,3}, & thus, OpenGL are not working, because glamor will not attach. As seen in the attached Xorg.0.log, glamor gives the cryptic error "EGL_MESA_drm_image required." While I could not figure out exactly
what this error means, it is somewhat common enough among Linux users to have a few threads pop up; When Linux users have this issue, it is usually fixed by installing or upgrading a lib in the Xorg stack from their package manager (most notably, libEGL,libGLES2, & LLVM), which we obviously cannot do. I have tried every combination of xorg.conf settings to fix this & nothing works; oddly enough, I get the same behavior even when I set the Xorg driver to modesetting, despite modesetting working fine with DRI on my iGPU. I have also tried simply using EXA, however my GPU isn't supported, so glamor is my only option here.

2. After Xorg starts, any attempt to kill/restart it or use the "xrandr" command to change my monitors (xorg.conf xrandr works fine) will permanently freeze up all 3 of my screens, forcing me to use CTRL+ALT+DEL to halt the machine. While I haven't been able to get a dmesg after this happens (due to the screen freezing), the attached Xorg.0.log.old should be from the last time this has happened. Oddly enough, I can switch to tty, & if I switch to tty first then kill X it works most of the time' I am only having issues from within the running X server itself.

I am running the latest build of current as of 2:00 AM (America/New_York timezone).


Xorg.0.log (41K) Download Attachment
Xorg.0.log.old (55K) Download Attachment
dmesg.boot (46K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: R7 370 (Pitcairn) issues

lord nihil.
An OpenBSD developer on reddit has informed me that the cause of issue 1
is already known & being worked on (No libLLVM in base).

I have found that issue 2 is also triggered when X screen blanking is activated, whether by the DPMS extension or the xset "screen saver" feature.

Dec 2, 2018, 9:08 AM by [hidden email]:

> I have recently upgraded from an Intel iGPU to the Sapphire overclocked variant of the Radeon R7 370. I have all the X tarballs installed & start X with xenodm. While it mostly works well in OpenBSD (drm & radeon kernel drivers attach & I get video), I am having 2 distinct major issues with the card:
>
> 1. DRI{1,2,3}, & thus, OpenGL are not working, because glamor will not attach. As seen in the attached Xorg.0.log, glamor gives the cryptic error "EGL_MESA_drm_image required." While I could not figure out exactly
> what this error means, it is somewhat common enough among Linux users to have a few threads pop up; When Linux users have this issue, it is usually fixed by installing or upgrading a lib in the Xorg stack from their package manager (most notably, libEGL,libGLES2, & LLVM), which we obviously cannot do. I have tried every combination of xorg.conf settings to fix this & nothing works; oddly enough, I get the same behavior even when I set the Xorg driver to modesetting, despite modesetting working fine with DRI on my iGPU. I have also tried simply using EXA, however my GPU isn't supported, so glamor is my only option here.
>
> 2. After Xorg starts, any attempt to kill/restart it or use the "xrandr" command to change my monitors (xorg.conf xrandr works fine) will permanently freeze up all 3 of my screens, forcing me to use CTRL+ALT+DEL to halt the machine. While I haven't been able to get a dmesg after this happens (due to the screen freezing), the attached Xorg.0.log.old should be from the last time this has happened. Oddly enough, I can switch to tty, & if I switch to tty first then kill X it works most of the time' I am only having issues from within the running X server itself.
>
> I am running the latest build of current as of 2:00 AM (America/New_York timezone).
>
>

Reply | Threaded
Open this post in threaded view
|

Re: R7 370 (Pitcairn) issues

Jonathan Gray-11
On Mon, Dec 03, 2018 at 03:15:38AM +0100, lord nihil. wrote:
> An OpenBSD developer on reddit has informed me that the cause of issue 1
> is already known & being worked on (No libLLVM in base).

Indeed the xenocara sets can't include radeonsi for now but with
-current it is possible to build it yourself with Mesa 17.3.9 from
xenocara and LLVM 6.0 from ports.

Install libelf and llvm packages, apply the below patch and then build
xenocara.

Index: lib/mesa/Makefile.bsd-wrapper
===================================================================
RCS file: /cvs/xenocara/lib/mesa/Makefile.bsd-wrapper,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile.bsd-wrapper
--- lib/mesa/Makefile.bsd-wrapper 23 Oct 2018 06:35:32 -0000 1.21
+++ lib/mesa/Makefile.bsd-wrapper 4 Dec 2018 02:44:28 -0000
@@ -11,7 +11,7 @@ GALLIUM_DRIVERS= swrast
 
 .if ${MACHINE} == i386 || ${MACHINE} == amd64
 DRI_DRIVERS=swrast,radeon,r200,i915,i965
-GALLIUM_DRIVERS=swrast,r300,r600
+GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
 .endif
 
 .if ${MACHINE} == arm64 || ${MACHINE} == loongson || \
@@ -23,7 +23,8 @@ GALLIUM_DRIVERS=swrast,r300,r600
 CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \
  --with-gallium-drivers=${GALLIUM_DRIVERS} \
  --disable-silent-rules \
- --disable-llvm \
+ --enable-llvm \
+ --with-llvm-prefix=/usr/local \
  --disable-glx-tls \
  --disable-regen-sources \
  --enable-gles1 --enable-gles2 \
@@ -70,6 +71,25 @@ O2= ${O1} -fthread-jumps -fcrossjumping
 
 CONFIGURE_ARGS+=       USER_CFLAGS="-O0 ${O2}"
 .endif
+
+PKGCONFIG_LIBDIR= /usr/lib/pkgconfig:${X11BASE}/lib/pkgconfig:/usr/local/lib/pkgconfig
+
+XENOCARA_PATH= /bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+
+config.status:
+ PKG_CONFIG_LIBDIR="${PKGCONFIG_LIBDIR}" \
+ CONFIG_SITE=$(CONFIG_SITE) \
+ CC=${CC} \
+ CFLAGS="${CFLAGS}" \
+ CXX=${CXX} \
+ CXXFLAGS="${CXXFLAGS}" \
+ AR_FLAGS="cruD" \
+ MAKE="${MAKE}" \
+ PATH=$(XENOCARA_PATH) \
+ sh ${_SRCDIR}/configure --prefix=${X11BASE} \
+ --sysconfdir=/etc \
+ --mandir=${X11BASE}/man \
+ ${CONFIGURE_ARGS}
 
 ${.OBJDIR}/src/util/format_srgb.c:
  lndir -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}