NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xsrc/58321: macppc 10.0 X.org server on Power Mac G4 + ATI Rage gets SIGSEGV
The following reply was made to PR xsrc/58321; it has been noted by GNATS.
From: Michael <macallan1888%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: xsrc/58321: macppc 10.0 X.org server on Power Mac G4 + ATI Rage
gets SIGSEGV
Date: Mon, 10 Jun 2024 03:12:23 -0400
I dug up the Pismo, it's got a -current from Augost 2023 on it, which works.
> [ 112.595]
> X.Org X Server 1.21.1.9
> X Protocol Version 11, Revision 0
> [ 112.598] Current Operating System: NetBSD g4 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/macppc/compile/GENERIC macppc
> [ 112.598]
> [ 112.610] Current version of pixman: 0.38.4
[ 31.134]
X.Org X Server 1.21.1.8
X Protocol Version 11, Revision 0
[ 31.143] Current Operating System: NetBSD ardbeg 10.99.10 NetBSD 10.99.10 (PISMO) #0: Mon Jun 10 00:41:09 EDT 2024 ml@paddy:/disk/build/obj_clang/sys/arch/macppc/compile/PISMO macppc
[ 31.145]
[ 31.149] Current version of pixman: 0.38.4
> [ 112.844] (II) LoadModule: "r128"
> [ 112.845] (II) Loading /usr/X11R7/lib/modules/drivers/r128_drv.so
> [ 112.866] (II) Module r128: vendor="X.Org Foundation"
> [ 112.866] compiled for 1.21.1.9, module version = 6.12.0
> [ 112.867] Module class: X.Org Video Driver
> [ 112.867] ABI class: X.Org Video Driver, version 25.2
Mine seems to have a slightly newer r128 driver though
[ 31.250] (II) LoadModule: "r128"
[ 31.251] (II) Loading /usr/X11R7/lib/modules/drivers/r128_drv.so
[ 31.259] (II) Module r128: vendor="X.Org Foundation"
[ 31.259] compiled for 1.21.1.8, module version = 6.12.1
[ 31.259] Module class: X.Org Video Driver
[ 31.260] ABI class: X.Org Video Driver, version 25.2
> [ 112.890] (==) R128(0): RGB weight 888
> [ 112.890] (II) R128(0): Using 8 bits per RGB (8 bit DAC)
> [ 112.896] (--) R128(0): Chipset: "ATI Rage 128 Pro GL PF (AGP)" (ChipID = 0x5046)
> [ 112.896] (--) R128(0): Linear framebuffer at 0x94000000
> [ 112.896] (--) R128(0): MMIO registers at 0x90000000
> [ 112.897] (--) R128(0): VideoRAM: 16384 kByte (64-bit SDR SGRAM 1:1)
[ 31.286] (==) R128(0): RGB weight 888
[ 31.286] (II) R128(0): Using 8 bits per RGB (8 bit DAC)
[ 31.288] (--) R128(0): Chipset: "ATI Rage 128 Mobility M3 LF (AGP)" (ChipID = 0x4c46)
[ 31.289] (--) R128(0): Linear framebuffer at 0xb4000000
[ 31.289] (--) R128(0): MMIO registers at 0xb0000000
[ 31.289] (--) R128(0): VideoRAM: 8192 kByte (128-bit SDR SGRAM 1:1)
Hmm, the diff to netbsd-10-0-RELEASE is mostly typos in comments though.
Another difference is that mine has an EDID block that specifies
exactly one mode - the panel's native resolution, so there is no mode
list to be sorted and pruned, which may be the reason why it doesn't
trigger here.
The problem I remember fixing in a bunch of other drivers was that
xf86CVTMode(), which generates a mode struct from width, height and
refresh rate, doesn't fill in the name field anymore, which led to
NULL derefs, which is consistent with the segfault in strcmp() you're
getting.
Problem is, r128 does not call xf86CVTMode(), so it didn't get updated.
There are a few calls to xf86CVTMode() in hw/xfree86/modes/, none of
which are followed by xf86SetModeDefaultName() as far as I can tell,
which was the fix on the drivers that do call it.
Please try the following patch, which makes sure xf86CVTMode() always
fills in the name field:
Index: xf86Modes.c
===================================================================
RCS file:
/cvsroot/xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Modes.c,v
retrieving revision 1.1.1.8 diff -u -w -r1.1.1.8 xf86Modes.c
--- xf86Modes.c 15 Jul 2022 02:12:51 -0000 1.1.1.8
+++ xf86Modes.c 10 Jun 2024 07:08:29 -0000
@@ -818,6 +818,7 @@
Mode->VTotal = libxcvt_mode_info->vtotal;
Mode->VRefresh = libxcvt_mode_info->vrefresh;
Mode->Flags = libxcvt_mode_info->mode_flags;
+ xf86SetModeDefaultName(Mode);
free(libxcvt_mode_info);
... untested because my builds fail elsewhere for unrelated reasons :/
have fun
Michael
Home |
Main Index |
Thread Index |
Old Index