Patrick Welche | 25 Jan 16:57 2015
Picon
Picon

redundant xf86-video-intel patches

We have local patches to use
1) drmIoctl instead of do_ioctl
2) drmMap   instead of mmap

1) The only difference between drmIoctl and do_ioctl is that do_ioctl calls
   sched_yield() if ioctl returns EAGAIN. Why is calling sched_yield() a
   bad idea?

   The sched_yield() call was added upstream in:

   Author: Chris Wilson <chris <at> chris-wilson.co.uk>
   Date:   Mon Jan 20 09:32:50 2014 +0000

    sna: Yield the processor if the kernel reports EAGAIN

    An artifact of our kernel/userspace interaction is that under certain
    circumstances the kernel will report EAGAIN in order for it to have CPU
    time to run its own workqueues before it can process the userspace
    request. We can be cooperative and yield ourselves rather than busy-spin
    waiting for the scheduler to demote us.

2)  Again, anyone remember what lead to us thinking that __kgem_bo_size()
    is doing the wrong thing?

    drmMap:
      pagesize_mask = getpagesize() - 1;
      size = (size + pagesize_mask) & ~pagesize_mask;
    mmap with call to bytes() => __kgem_bo_size():
      return PAGE_SIZE * bo->size.pages.count;

(Continue reading)

Manuel Bouyer | 23 Jan 15:47 2015

new Intel driver hangs

Hello,
since the xorg Intel driver has been updated on 7.0_BETA, the X server
occasionally hangs on vmem: 
yquem# ps axlww | grep Xorg
    0 11377 12013   95  85  0 4315860  37652 vmem    Dl   ?      3:10.66 /usr/X11R7/bin/X :0 -noretro -auth
/local/armandeche1/bouyer/.serverauth.11611 (Xorg)

I tried a reboot -d but didn't get a core dump ...

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

Nathanial Sloss | 22 Jan 02:15 2015
Picon

foobilard sefaults on startup - libGLU

Hi

With NetBSD-7.99.4 userland I've found that foobillard (pkgsrc/games)
will segfault on startup.

I've since patched libGLU and this fixes the problem but I would like someone 
familiar with libGLU to review it so I may commit it.

Regards,

Nat.

Index: xsrc/external/mit/glu/dist/src/libtess/sweep.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/glu/dist/src/libtess/sweep.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sweep.c
--- xsrc/external/mit/glu/dist/src/libtess/sweep.c	16 Dec 2014 06:01:15 
-0000	1.1.1.1
+++ xsrc/external/mit/glu/dist/src/libtess/sweep.c	21 Jan 2015 13:27:55 -0000
 <at>  <at>  -546,7 +546,9  <at>  <at> 
     if( EdgeSign( eUp->Dst, eLo->Org, eUp->Org ) < 0 ) return FALSE;

     /* eLo->Org appears to be above eUp, so splice eLo->Org into eUp */
-    RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
+    if (RegionAbove(regUp))
+        RegionAbove(regUp)->dirty = TRUE;
+    regUp->dirty = TRUE;
     if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
     if ( !__gl_meshSplice( eLo->Oprev, eUp ) ) longjmp(tess->env,1);
(Continue reading)

SAITOH Masanobu | 16 Jan 19:27 2015

-current with radeondrm fails on HP DL360 G5 and DL320 G6

 Hi.

 I tested today's -current on HP DL360 G5 and DL320 G6. This machines
have the same video chip:

001:03:0: ATI Technologies ES1000 (VGA display, revision 0x02)

And, while attaching radeondrm, it stopped with black screen.

The console output is like this:

> drm: Initializing kernel modesetting (RV100 0x1002:0x515E 0x103C:0x31FB)
> drm: register mmio base: 0xfb9f0000
> drm: register mmio size: 65536
> radeon0: info: VRAM: 128M 0x00000000F0000000 - 0x000000000f7ffffff (64M used)
> radeon0: info: GTI: 512M 0x00000000D0000000 - 0x00000000EFFFFFFFF
> drm: Detected VRAM RAM=80M, BAR=128M
> drm: RAM width 16bits DDR
> Zone  kernel: Available graphics memory: 1608862 KiB
> drm: radeon: 64M of VRAM memory ready.
> drm: radeon: 512M of GTI memory ready.
> drm: GART: num cpu pages 131072, num gpu pages 131072
> drm: PCI GART of 512M enabled (table at 0x0000000044B4A000).
> radeon0: info: WB disabled
> radeon0: info: fence driver on ring 0 use gpu addr 0x00000000f0000000 and cpu addr 0x0xde266000
> drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
> drm: Driver supports precise vblank timestamp query.
> radeon0: interrupting at ioapic0 pin 23 (radeon)
> drm: radeon: irq initialized.
> drm: Loading R100 Microcode
(Continue reading)

Jaap Boender | 16 Jan 12:13 2015

7.0_BETA on Ivy Bridge

Hello,

I've compiled 7.0_BETA on this machine:
NetBSD purcell.uni.mdx.ac.uk 7.0_BETA NetBSD 7.0_BETA (PURCELL) #1: 
Tue Jan 13 16:19:01 GMT 2015  
jaap1 <at> purcell.uni.mdx.ac.uk:/usr/obj/sys/arch/amd64/compile/PURCELL 
amd64

dmesg:
[...]
acpivga0 at acpi0 (VID): ACPI Display Adapter
acpiout0 at acpivga0 (CRT, 0x0100): ACPI Display Output Device
acpiout1 at acpivga0 (LCD, 0x0400): ACPI Display Output Device
acpiout1: brightness levels: 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
acpiout2 at acpivga0 (DVI, 0x0302): ACPI Display Output Device
acpiout3 at acpivga0 (DVI2, 0x0303): ACPI Display Output Device
acpiout4 at acpivga0 (DVI3, 0x0304): ACPI Display Output Device
acpiout5 at acpivga0 (DP, 0x0300): ACPI Display Output Device
acpiout6 at acpivga0 (DP2, 0x0301): ACPI Display Output Device
acpiout7 at acpivga0 (DP3, 0x0305): ACPI Display Output Device
acpivga0: connected output devices:
acpivga0:   0x0100 (acpiout0): Ext. Monitor, head 0
acpivga0:   0x0400 (acpiout1): Unknown Output Device, head 0
acpivga0:   0x0302 (acpiout2): Unknown Output Device, head 0
acpivga0:   0x0303 (acpiout3): Unknown Output Device, head 0
acpivga0:   0x0300 (acpiout5): Unknown Output Device, head 0
(Continue reading)

Manuel Bouyer | 14 Jan 20:44 2015

netbsd-7 on intel GPU (improvements and regressions)

Hello,
I've updated two systems with Intel GPU to the latest netbsd-7.
There were running netbsd-7 from december, with DRMKMS, with accel
disabled.
With the new netbsd-7:
- on a system running amd64 with 
pchb0 at pci0 dev 0 function 0: Intel Haswell Host Bridge, DRAM (rev. 0x06)
i915drmkms0 at pci0 dev 2 function 0: Intel Haswell Integrated Graphics Device (
rev. 0x06)
drm: Memory usable by graphics device = 2048M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at ioapic0 pin 16 (i915)
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier
i915drmkms0: More than 8 outputs detected via ACPI
intelfb0: framebuffer at 0xffff80008ef96000, size 1280x1024, depth 32, stride 51
20
wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0

I can now run with accel enabled, opengl applications are stable without
display problem. This is definitively an improvement.

- on a system running i386 with:
pchb0 at pci0 dev 0 function 0WARNING: module error: vfs load failed for `pciver
bose', error 45
WARNING: module error: vfs load failed for `pciverbose', error 45
: vendor 0x8086 product 0x2a00 (rev. 0x0c)
agp0 at pchb0: i965-family chipset
agp0: detected 7676k stolen memory
(Continue reading)

John D. Baker | 11 Jan 21:27 2015

i386 radeondrmkms results

Following the thread starting here:

  http://mail-index.netbsd.org/tech-x11/2014/12/19/msg001444.html

I made similar adjustments to my GENERIC-based kernel config.  This just
amounted to commenting out the UMS "radeondrm" driver and un-excluding
the "radeon*" and "radeondrmkmsfb*" drivers.  I already exclude "pcdisplay0
at isa?" and "vga0 at isa?".  My sources are -current from approximately
201501091900Z.

The system is an IBM Thinkpad A31p with (reported by my UMS drm kernel):

[...]
acpivga0 at acpi0 (VID): ACPI Display Adapter
acpiout0 at acpivga0 (LCD0, 0x0110): ACPI Display Output Device
acpiout1 at acpivga0 (CRT0, 0x0100): ACPI Display Output Device
acpiout2 at acpivga0 (TV0, 0x0200): ACPI Display Output Device
acpiout3 at acpivga0 (DVI0, 0x0210): ACPI Display Output Device
acpivga0: connected output devices:
acpivga0:   0x0110 (acpiout0): LCD Panel, head 0
acpivga0:   0x0100 (acpiout1): Ext. Monitor, head 0
acpivga0:   0x0200 (acpiout2): TV, head 0
acpivga0:   0x0210 (acpiout3): Unknown Output Device, head 0
[...]
vga0 at pci1 dev 0 function 0: ATI Technologies FireGL Mobility 7800 M7 LX (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
radeondrm0 at vga0: ATI Radeon LX RV200 Mobility FireGL 7800 M7
radeondrm0: AGP at 0xe0000000 64MB
radeondrm0: Initialized radeon 1.29.0 20080613
(Continue reading)

Piotr Meyer | 11 Jan 13:13 2015
Picon

amd64 DRMKMS Intel regression

After success reported in [1] I have had some troubles with disks and
returned yesterday to tests. Unfortunately, fresh installation of 
NetBSD 7_BETA (dist kernel DRMKMS.201501091650Z) gave me only black
screen after 'startx' command. I was able to return to console and
terminate session by ctrl+c (X dumps core after that).
I tried -current kernel and workaround from [3] but without success.

Some data (dmesg before 'startx', dmesg after and Xorg log) are located
at [2],

1 - http://mail-index.netbsd.org/tech-x11/2014/08/24/msg001398.html
2 - http://smutek.pl/netbsd/drmkms-regression-201501/
3 - http://mail-index.netbsd.org/netbsd-bugs/2014/11/05/msg038954.html

--

-- 
Piotr 'aniou' Meyer

Patrick Welche | 10 Jan 02:51 2015
Picon
Picon

i810 patch

We seem to have

--- /tmp/foo/src/legacy/i810/i810_dri.c 2014-09-08 08:53:32.000000000 +0100
+++ /usr/xsrc/external/mit/xf86-video-intel/dist/src/legacy/i810/i810_dri.c     2014-11-06
16:32:19.000000000 +0000
 <at>  <at>  -1104,10 +1104,17  <at>  <at> 
            while ((pboxNext >= pbox) && (pboxBase->y1 == pboxNext->y1))
               pboxNext--;
            pboxTmp = pboxNext + 1;
-           pptTmp = pptSrc + (pboxTmp - pbox);
-           while (pboxTmp <= pboxBase) {
-              *pboxNew1++ = *pboxTmp++;
-              *pptNew1++ = *pptTmp++;
+           if (pptSrc == &ptOldOrg) {
+               if (pboxTmp <= pboxBase) {
+                 *pboxNew1++ = *pboxTmp;
+                 *pptNew1++ = *pptSrc;
+               }
+           } else {
+              pptTmp = pptSrc + (pboxTmp - pbox);
+              while (pboxTmp <= pboxBase) {
+                 *pboxNew1++ = *pboxTmp++;
+                 *pptNew1++ = *pptTmp++;
+              }
            }
            pboxBase = pboxNext;
         }

in our tree, but I can't seem to find a commit message explaining what
it is for... Any ideas? Should it go upstream?
(Continue reading)

Patrick Welche | 9 Jan 19:34 2015
Picon
Picon

xf86DDC.h redefinitions

Looking at /usr/X11R7/include/xorg/xf86DDC.h, there is e.g.,

extern _X_EXPORT Bool
xf86MonitorIsHDMI(xf86MonPtr mon);

and

extern Bool
xf86MonitorIsHDMI(xf86MonPtr mon);

Any idea why? (xf86DDCGetModes is also interesting)

Cheers,

Patrick

matthew green | 19 Dec 19:54 2014
Picon

radaeondrmkms on i386 - how to get the console back


hi folks.

as some of you are aware, radeondrmkms on i386 doesn't work properly.
i've been tracking down the problems.

there are several.  the first relate to vga(4) or pcdisplay(4)
attaching at isa, and providing wsdisplay0, and then drm gets
attached to wsdisplay1, and console input/output don't work.

simply adding this to my GENERIC-based config fixes that for me:

	no pcdisplay
	no vga0 at isa?

that lets the console input and output go to the right place
and you can login on the console.

but there is a much deeper issue in the drm code itself.  when
the ati driver is trying to mmap the shader it gets an EINVAL.
i tracked this down to his code failing:

drm_vm.c:
     87 static paddr_t
     88 drm_mmap_paddr_locked(struct drm_device *dev, off_t byte_offset, int prot)
     89 {
     90         const off_t page_offset = (byte_offset >> PAGE_SHIFT);
     91         struct drm_hash_item *hash;
     92
     93         KASSERT(mutex_is_locked(&dev->struct_mutex));
(Continue reading)


Gmane