On Mon, Oct 26, 2020 at 10:40:50AM +0100, Matthieu Herrb wrote:
> On Mon, Oct 26, 2020 at 07:24:47PM +1100, Jonathan Gray wrote:
> > On Sun, Oct 25, 2020 at 09:45:53PM +0100, Jean-Louis ABRAHAM wrote:
> > > Dear OpenBSD Team
> > >
> > >
> > >
> > > This mail has been generated with sendbug and I have manually added some
> > > attachments to give as much infos as possible.
> > >
> > > Of course, if you need more infos, please let me know.
> > >
> > > Just hope my issue is not due to not reading the docs...
> > >
> > >
> > >
> > > Regards
> > >
> > > Jean-Louis
> > >
> > >
> > >
> > > >Synopsis: X error with radeon graphic card - xenodm won't work
> > > >Category: amd64 xenodm
> > > >Environment:
> > > System : OpenBSD 6.8
> > > Details : OpenBSD 6.8 (GENERIC.MP) #98: Sun Oct 4 18:13:26 MDT
> > > 2020
> > >
> > > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > >
> > > Architecture: OpenBSD.amd64
> > > Machine : amd64
> > > >Description:
> > > xenodm doesn't work; xenodm.log and X.org.log contain error messages.
> > > >How-To-Repeat:
> > > at each reboot xenodm fails. However startx works.
> >
> > > [drm] *ERROR* radeon: ring test failed (scratch(0x15E4)=0xCAFEDEAD)
> > > [drm] *ERROR* radeon: cp isn't working (-22).
> > > drm:pid0:r100_startup *ERROR* failed initializing CP (-22).
> > > drm:pid0:r100_init *ERROR* Disabling GPU acceleration
> >
> > With acceleration disabled the ati driver error path seems to result in
> > X:/usr/X11R6/lib/modules/drivers/radeon_drv.so: undefined symbol
> > 'exaGetPixmapDriverPrivate'
> > this may be related to
> > https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/commit/c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54
>
> Yes that looks like the problem... We can probably merge this commit.
I can reproduce the way it fails using an xorg.conf with 'Option "Accel" "off"'.
Needs two commits to fix:
c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54 Don't crash X server if GPU
acceleration is not available
4d84cf438e7f1bebf0053035ef0292e9fed257d1 Handle NULL fb_ptr in pixmap_get_fb
Index: src/radeon.h
===================================================================
RCS file: /cvs/xenocara/driver/xf86-video-ati/src/radeon.h,v
retrieving revision 1.22
diff -u -p -r1.22 radeon.h
--- src/radeon.h 26 Oct 2019 09:37:25 -0000 1.22
+++ src/radeon.h 26 Oct 2020 12:19:40 -0000
@@ -790,8 +790,8 @@ static inline Bool radeon_set_pixmap_bo(
static inline struct radeon_buffer *radeon_get_pixmap_bo(PixmapPtr pPix)
{
-#ifdef USE_GLAMOR
RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen));
+#ifdef USE_GLAMOR
if (info->use_glamor) {
struct radeon_pixmap *priv;
@@ -799,7 +799,7 @@ static inline struct radeon_buffer *rade
return priv ? priv->bo : NULL;
} else
#endif
- {
+ if (info->accelOn) {
struct radeon_exa_pixmap_priv *driver_priv;
driver_priv = exaGetPixmapDriverPrivate(pPix);
return driver_priv ? driver_priv->bo : NULL;
@@ -896,7 +896,7 @@ radeon_pixmap_get_fb(PixmapPtr pix)
handle);
}
- return *fb_ptr;
+ return fb_ptr ? *fb_ptr : NULL;
}