Re: HEADS UP: riastradh-drm2 branch merged

2014-05-19 Thread NONAKA Kimihiro
Hi,

I wrote a small patch to be i915drmkms as a console.
If you want a compiled kernel, get from
http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/drmkms.bz2

Index: sys/dev/pci/hdaudio/hdafg.c
===
RCS file: /cvsroot/src/sys/dev/pci/hdaudio/hdafg.c,v
retrieving revision 1.18
diff -u -r1.18 hdafg.c
--- sys/dev/pci/hdaudio/hdafg.c16 Oct 2013 18:13:00 -1.18
+++ sys/dev/pci/hdaudio/hdafg.c24 Mar 2014 15:33:58 -
@@ -4263,7 +4263,9 @@
 for (j = 0; j  HDAUDIO_MAXPINS; j++) {
 if (as[i].as_pins[j] == 0)
 continue;
+#if 0/* XXX */
 hdafg_assoc_dump_dd(sc, as[i], j);
+#endif
 }
 }
 break;
Index: sys/external/bsd/drm2/i915drm/i915_pci.c
===
RCS file: /cvsroot/src/sys/external/bsd/drm2/i915drm/i915_pci.c,v
retrieving revision 1.2
diff -u -r1.2 i915_pci.c
--- sys/external/bsd/drm2/i915drm/i915_pci.c18 Mar 2014 18:20:42
-1.2
+++ sys/external/bsd/drm2/i915drm/i915_pci.c24 Mar 2014 15:33:58 -
@@ -416,7 +416,7 @@
 goto fail3;
 }

-prop_dictionary_set_bool(dict, is_console, 0); /* XXX */
+prop_dictionary_set_bool(dict, is_console, true /*0*/); /* XXX
*/ /*NONAKA*/
 prop_dictionary_set_uint32(dict, width, mode_cmd.width);
 prop_dictionary_set_uint32(dict, height, mode_cmd.height);
 prop_dictionary_set_uint8(dict, depth, sizes-surface_bpp);
@@ -431,6 +431,11 @@
 genfb_ops.genfb_mmap = i915drm_genfb_mmap;

 /* XXX errno NetBSD-Linux */
+#if 1 /* XXX NONAKA */
+extern int vga_cndetach(void);
+vga_cndetach();
+wsdisplay_cndetach();
+#endif /* XXX NONAKA */
 ret = -genfb_attach(sc-sc_genfb, genfb_ops);
 if (ret) {
 aprint_error_dev(sc-sc_dev, unable to attach genfb: %d\n,


Regards,
-- 
NONAKA Kimihiro
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.

NetBSD 6.99.37 (DRMKMS) #24: Tue Mar 25 00:39:37 JST 2014
nonaka@koharu.myhome.local:/usr/obj.amd64/sys/arch/amd64/compile/DRMKMS
total memory = 16261 MB
avail memory = 15773 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter i8254 frequency 1193182 Hz quality 100
NEC Express5800/S70 [N8100-9023] (FR1.0)
mainbus0 (root)
ACPI: RSDP 0xf0490 24 (v02 ALASKA)
ACPI: XSDT 0xda1c0078 74 (v01 ALASKAA M I 01072009 AMI  00010013)
ACPI: FACP 0xda1c8a18 F4 (v04 ALASKAA M I 01072009 AMI  00010013)
ACPI: DSDT 0xda1c0180 008895 (v02 ALASKAA M I 0002 INTL 20051117)
ACPI: FACS 0xda36af80 40
ACPI: APIC 0xda1c8b10 72 (v03 ALASKAA M I 01072009 AMI  00010013)
ACPI: FPDT 0xda1c8b88 44 (v01 ALASKAA M I 01072009 AMI  00010013)
ACPI: MCFG 0xda1c8bd0 3C (v01 ALASKAA M I 01072009 MSFT 0097)
ACPI: HPET 0xda1c8c10 38 (v01 ALASKAA M I 01072009 AMI. 0005)
ACPI: SSDT 0xda1c8c48 00036D (v01 SataRe SataTabl 1000 INTL 20091112)
ACPI: SSDT 0xda1c8fb8 000968 (v01  PmRef  Cpu0Ist 3000 INTL 20051117)
ACPI: SSDT 0xda1c9920 000A92 (v01  PmRefCpuPm 3000 INTL 20051117)
ACPI: DMAR 0xda1ca3b8 B8 (v01 INTEL  SNB  0001 INTL 0001)
ACPI: ASF! 0xda1ca470 A5 (v32 INTEL   HCG 0001 TFSM 000F4240)
ACPI: All ACPI Tables successfully acquired
cpu0 at mainbus0 apid 0: Intel(R) Core(TM) i5-3475S CPU @ 2.90GHz, id 0x306a9
cpu1 at mainbus0 apid 2: Intel(R) Core(TM) i5-3475S CPU @ 2.90GHz, id 0x306a9
cpu2 at mainbus0 apid 4: Intel(R) Core(TM) i5-3475S CPU @ 2.90GHz, id 0x306a9
cpu3 at mainbus0 apid 6: Intel(R) Core(TM) i5-3475S CPU @ 2.90GHz, id 0x306a9
ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x20, 24 pins
acpi0 at mainbus0: Intel ACPICA 20131218
acpi0: X/RSDT: OemId ALASKA,   A M I,01072009, AslId AMI ,00010013
ACPI: SSDT 0xda1ec018 00083B (v01  PmRef  Cpu0Cst 3001 INTL 20051117)
ACPI: SSDT 0x0 00083B (v01  PmRef  Cpu0Cst 3001 INTL 20051117)
ACPI: SSDT 0xda1eda98 000303 (v01  PmRefApIst 3000 INTL 20051117)
ACPI: SSDT 0x0 000303 (v01  PmRefApIst 3000 INTL 20051117)
ACPI: SSDT 0xda1f7c18 000119 (v01  PmRefApCst 3000 INTL 20051117)
ACPI: SSDT 0x0 000119 (v01  PmRefApCst 3000 INTL 20051117)
acpi0: SCI interrupting at int 9
timecounter: Timecounter ACPI-Fast frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed0-0xfed00400)
timecounter: Timecounter hpet0 frequency 14318180 Hz quality 2000
acpiec0 at acpi0 (H_EC, PNP0C09-1)acpiec0: unable to evaluate _GPE: AE_NOT_FOUND
TPMX (PNP0C01) WARNING: module error: vfs load failed for `acpiverbose', error 
45
at acpi0 not configured
FWHD (INT0800) WARNING: module error: vfs load failed for 

Re: HEADS UP: riastradh-drm2 branch merged

2014-04-06 Thread David H . Gutteridge
On 2014-03-23, at 6:06 PM, David H. Gutteridge wrote:
 On 2014-03-20, at 6:27 PM, David H. Gutteridge wrote:
 On Tue, 18 Mar 2014 at 19:17:01, Taylor R Campbell wrote:
 I merged the riastradh-drm2 branch to HEAD today.  This shouldn't
 cause any problems for anyone, because it touched very little outside
 sys/external/bsd/drm2 -- it's not hooked into any kernels other than
 the new amd64/DRMKMS one.  But let me know if you observe any fallout.
 
 Update to userland X.org should be coming soon, so that userlands can
 take advantage of the new DRM/KMS drivers.
 
 Hello,
 
 I doubt I'm telling you anything you don't already know, but I tried
 compiling a DRMKMS kernel for both amd64 and i386 to test, and
 neither compiled.
 
 With i386, I hit this first:
 
 In file included from 
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/include/drm/drmP.h:52:0,
from 
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c:34:
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/pci.h: In 
 function 'pci_bus_alloc_resource':
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/pci.h:255:6:
  error: large integer implicitly truncated to unsigned type
 *** [drm_agpsupport.o] Error code 1
 
 I realize you only provided an amd64 kernel, the implication being
 i386 might not yet be supported, but I tried it anyway, as the machine
 I'd test with isn't capable of running 64-bit code.
 
 From looking at the code, it's clear you're already aware of the
 issue, given your XXX notation.
 
 error = bus_space_alloc(bst, start, 0xULL /* XXX */,
  size, align, 0, 0, resource-start, resource-r_bsh);
 
 
 If this is of interest to anyone, I opened a PR detailing some issues
 that prevent this code from being used on i386. (The PR is 48676.)
 
 Dave

Recent changes by riastradh@ have made i386 kernels with drm2 enabled
buildable, so I've now tested on my somewhat aged machine with an
i945GME chipset. Details follow for the curious.

With is_console=1 set in src/sys/external/bsd/drm2/i915drm/i915_pci.c
the kernel tries to probe/attach to the graphics chipset (I'm not
sure exactly how far it gets, the messages flash by too fast) and
then fails, causing an apparent kernel panic (or at least a freeze).
I'm not able to get any dmesg output saved from it, and the screen
simply goes black. The machine doesn't respond to network activity.

With is_console=0 set, the kernel boots successfully, but the console
is unusable. (A small, fixed white cursor appears in the top left of
the screen, and I cannot switch VTs to other text consoles.) The
machine does boot multi-user, though, and responds to network
activity, so I've gleaned the following dmesg details.

Regards,

Dave

: vendor 0x8086 product 0x27ac (rev. 0x03)
agp0 at pchb0: detected 7932k stolen memory
agp0: aperture at 0xc000, size 0x1000
i915drmkms0 at pci0 dev 2 function 0
: vendor 0x8086 product 0x27ae (rev. 0x03)
drmkms0 at i915drmkms0
drm: Memory usable by graphics device = 256M
drm: MTRR allocation failed.  Graphics performance may suffer.
drm: Supports vblank timestamp caching Rev 1 (10.10.2010).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: unable to map ROM
drm: failed to find VBIOS tables
i915drmkms0: unable to map VGA registersdrm kern warning: composite sync not 
supported
drm: initialized overlay support
drmkms0: interrupting at ioapic0 pin 16 (i915)

snip

drm kern warning: composite sync not supported
render error detected, EIR: 0x0010
page table error
  PGTBL_ER: 0x0100
DRM error in i915_report_and_clear_eir: EIR stuck: 0x0010, masking
render error detected, EIR: 0x0010
page table error
  PGTBL_ER: 0x0100
i915drmkms0: framebuffer at 0xda82b000, size 1024x600, depth 32, stride 4096
wsdisplay1 at i915drmkms0 kbdmux 1
wsmux1: connecting to wsdisplay1
fixme: max PWM is zero
drmkms0: info: registered panic notifier




Re: HEADS UP: riastradh-drm2 branch merged

2014-04-02 Thread Ryo ONODERA
From: NONAKA Kimihiro nona...@gmail.com, Date: Sun, 30 Mar 2014 00:33:50 +0900

 Hi,
 
 I've updated my i915drmkms patch.
 Now xf86-video-intel driver work with simple xinitrc (xterm*1,
 xclock*1), but xfce4 not work yet.
 
 for src:
 http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-src.diff
 http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-src-xsrc.diff
 
 for xsrc:
 http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-xsrc.diff

Hi,

build fails with following error.
Could you take a look?

Thank you.

r/xsrc/external/mit/xf86-video-intel/dist/src/render_program -I/usr/xsrc/externa
l/mit/xf86-video-intel/dist/xvmc  -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO -I/u
sr/NewWorld/amd64/usr/X11R7/include -D__AMD64__ -I/usr/NewWorld/amd64/usr/X11R7/
include/X11  -I/usr/NewWorld/amd64/usr/X11R7/include/X11/dri  -I/usr/NewWorld/am
d64/usr/X11R7/include/xorg  -I/usr/NewWorld/amd64/usr/X11R7/include/pixman-1  -I
/usr/xsrc/external/mit/xorg-server/dist/../include  -DMITMISC -DXTEST -DXTRAP -D
XSYNC -DXCMISC  -DXRECORD -DMITSHM -DBIGREQS -DXF86VIDMODE  -DXF86MISC -DDPMSExt
ension -DEVI  -DSCREENSAVER -DXV -DXVMC -DGLXEXT  -DRES  -DSHAPE -DXINPUT -DXKB
-DLBX -DXAPPGROUP  -DXCSECURITY -DTOGCUP -DXF86BIGFONT  -DDPMSExtension -DPIXPRI
V -DPANORAMIX  -DRENDER -DRANDR -DXFIXES -DDAMAGE  -DCOMPOSITE -DXEVIE -DGLXEXT
-DXF86DRI -DGLX_DIRECT_RENDERING  -DGLX_USE_DLOPEN -DGLX_USE_MESA -DXF86VIDMODE
-D__GLX_ALIGN64  -DSHAPE -DXKB -DLBX -DXAPPGROUP -DXCSECURITY  -DTOGCUP -DXF86BI
GFONT -DDPMSExtension -DPIXPRIV  -DPANORAMIX -DRENDER -DRANDR -DGCCUSESGAS  -DAV
OID_GLYPHBLT -DSINGLEDEPTH -DXvExtension  -DXFree86Server -DXvMCExtension -DSMAR
T_SCHEDULE  -DBUILDDEBUG -DXResExtension -DNDEBUG -DXINPUT -DXFreeXDGA -DXF86VID
MODE -D_XSERVER64  -DHAVE_XORG_SERVER_1_1_0  -DSERVER_1_5  -DXSERVER_LIBPCIACCES
S  -DXFree86LOADER  -DHAVE_XEXTPROTO_71 -DPACKAGE_VERSION_MAJOR=2 -DPACKAGE_VERS
ION_MINOR=21 -DPACKAGE_VERSION_PATCHLEVEL=15 -DXORG_VERSION_CURRENT=(((1) * 100
0) + ((10) * 10) + ((6) * 1000) + 0) /usr/xsrc/external/mit/xf86-vi
deo-intel/dist/src/sna/blt.c   mv blt.d.tmp blt.d
/usr/xsrc/external/mit/xf86-video-intel/dist/src/sna/blt.c:29:20: fatal error: c
onfig.h: No such file or directory
 #include config.h
^
compilation terminated.
nbmkdep: compile failed.
*** [blt.d] Error code 1

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: HEADS UP: riastradh-drm2 branch merged

2014-04-02 Thread Ryo ONODERA
Hi,

From: Thomas Klausner w...@netbsd.org, Date: Thu, 3 Apr 2014 00:26:28 +0200

 On Thu, Apr 03, 2014 at 06:06:33AM +0900, Ryo ONODERA wrote:
 /usr/xsrc/external/mit/xf86-video-intel/dist/src/sna/blt.c:29:20: fatal 
 error: config.h: No such file or directory
  #include config.h
 ^
 
 Try making that:
 
 #ifdef HAVE_CONFIG_H
 #include config.h
 #endif
 
 instead. That's the usual way to solve these.

Hmm...
xsrc/external/mit/xf86-video-intel/dist/src/sna/blt.c has

#ifdef HAVE_CONFIG_H
#include config.h
#endif

in it.

Thank you.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-29 Thread NONAKA Kimihiro
Hi,

I've updated my i915drmkms patch.
Now xf86-video-intel driver work with simple xinitrc (xterm*1,
xclock*1), but xfce4 not work yet.

for src:
http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-src.diff
http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-src-xsrc.diff

for xsrc:
http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-xsrc.diff

Regards,
-- 
NONAKA Kimihiro


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-26 Thread NONAKA Kimihiro
Hi,

Update i915drmkms console patch.
config_interrupts(9) is no longer required to be attached framebuffer.

http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-console.diff

Regards,
-- 
NONAKA Kimihiro


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-26 Thread Ryo ONODERA
Hi,

From: NONAKA Kimihiro nona...@gmail.com, Date: Wed, 26 Mar 2014 23:10:01 +0900

 Hi,
 
 Update i915drmkms console patch.
 config_interrupts(9) is no longer required to be attached framebuffer.
 
 http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-console.diff

Thanks for your patch.
On my MacBook Air 11-inch mid 2012, drmksm console works fine.
I can finally get high resolution console!

Xwsfb works, but sometimes mouse cursor creates black blocks.
Especially when mouse cursor moves to right end of LCD, mouse cursor jumps
to left side (like cylinder), and black blocks are drawn.
After another cylindrical behavior, black blocks drawing is ended.
So everything became to work normally.

Here is black blocks picture.
http://www.netbsd.org/~ryoon/20140327-nonaka-patched-drmkms-wsfb-black-bloacks.jpg

Thank you.

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-26 Thread Ryo ONODERA
Hi,

I have mistake.

From: Ryo ONODERA ryo...@yk.rim.or.jp, Date: Thu, 27 Mar 2014 00:08:05 +0900 
(JST)

 Hi,
 
 From: NONAKA Kimihiro nona...@gmail.com, Date: Wed, 26 Mar 2014 23:10:01 
 +0900
 
 Hi,
 
 Update i915drmkms console patch.
 config_interrupts(9) is no longer required to be attached framebuffer.
 
 http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-console.diff
 
 Thanks for your patch.
 On my MacBook Air 11-inch mid 2012, drmksm console works fine.
 I can finally get high resolution console!
 
 Xwsfb works, but sometimes mouse cursor creates black blocks.
 Especially when mouse cursor moves to right end of LCD, mouse cursor jumps
^ here is left
 to left side (like cylinder), and black blocks are drawn.
 After another cylindrical behavior, black blocks drawing is ended.
 So everything became to work normally.
 
 Here is black blocks picture.
 http://www.netbsd.org/~ryoon/20140327-nonaka-patched-drmkms-wsfb-black-bloacks.jpg
 
 Thank you.
 
 --
 Ryo ONODERA // ryo...@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-26 Thread Ryo ONODERA
From: Ryo ONODERA ryo...@yk.rim.or.jp, Date: Thu, 27 Mar 2014 00:26:52 +0900 
(JST)

 Hi,
 
 I have mistake.
 
 From: Ryo ONODERA ryo...@yk.rim.or.jp, Date: Thu, 27 Mar 2014 00:08:05 
 +0900 (JST)
 
 Hi,
 
 From: NONAKA Kimihiro nona...@gmail.com, Date: Wed, 26 Mar 2014 23:10:01 
 +0900
 
 Hi,
 
 Update i915drmkms console patch.
 config_interrupts(9) is no longer required to be attached framebuffer.
 
 http://ftp.netbsd.org/pub/NetBSD/misc/nonaka/drmkms/i915drmkms-console.diff
 
 Thanks for your patch.
 On my MacBook Air 11-inch mid 2012, drmksm console works fine.
 I can finally get high resolution console!
 
 Xwsfb works, but sometimes mouse cursor creates black blocks.
 Especially when mouse cursor moves to right end of LCD, mouse cursor jumps
 ^ here is left
 to left side (like cylinder), and black blocks are drawn.
 After another cylindrical behavior, black blocks drawing is ended.
 So everything became to work normally.
 
 Here is black blocks picture.
 http://www.netbsd.org/~ryoon/20140327-nonaka-patched-drmkms-wsfb-black-bloacks.jpg
 
 Thank you.

And I have no cursor option in my /etc/X11/xorg.conf.
Here is my xorg.conf
http://www.netbsd.org/~ryoon/20140327-xorg.conf .

--
Ryo ONODERA // ryo...@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-25 Thread NONAKA Kimihiro
Hi,

2014-03-25 1:08 GMT+09:00 NONAKA Kimihiro nona...@gmail.com:

 I wrote a small patch to be i915drmkms as a console.

I've update patch.
My ThinkPad E430 with1600x900 Dual-Link LVDS panel works fine.

Index: sys/external/bsd/drm2/dist/drm/i915/intel_bios.c
===
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/i915/intel_bios.c,v
retrieving revision 1.2
diff -u -r1.2 intel_bios.c
--- sys/external/bsd/drm2/dist/drm/i915/intel_bios.c18 Mar 2014
18:20:42 -1.2
+++ sys/external/bsd/drm2/dist/drm/i915/intel_bios.c25 Mar 2014
13:19:56 -
@@ -30,6 +30,13 @@
 #include drm/i915_drm.h
 #include i915_drv.h
 #include intel_bios.h
+#if defined(__i386__) || defined(__x86_64__)
+#include dev/isa/isareg.h
+#include dev/isa/isavar.h
+
+#define VGA_BIOS_ADDR0xc
+#define VGA_BIOS_SIZE0x1
+#endif

 #defineSLAVE_ADDR10x70
 #defineSLAVE_ADDR20x72
@@ -719,6 +726,34 @@
 }
 #endif

+#if defined(__i386__) || defined(__x86_64__)
+/* from OpenBSD */
+if (bdb == NULL) {
+struct vbt_header *vbt = NULL;
+u8 __iomem *vgabios;
+size_t size;
+int i;
+
+vgabios = (u8 *)ISA_HOLE_VADDR(VGA_BIOS_ADDR);
+size = VGA_BIOS_SIZE;
+
+/* Scour memory looking for the VBT signature */
+for (i = 0; i + 4  size; i++) {
+if (!memcmp(vgabios + i, $VBT, 4)) {
+vbt = (struct vbt_header *)(vgabios + i);
+break;
+}
+}
+
+if (vbt != NULL) {
+DRM_DEBUG_KMS(Using VBT from VGA BIOS: %20s\n,
+vbt-signature);
+bdb = (struct bdb_header *)
+(vgabios + i + vbt-bdb_offset);
+}
+}
+#endif
+
 if (bdb == NULL) {
 struct vbt_header *vbt = NULL;
 size_t size;
Index: sys/external/bsd/drm2/i915drm/i915_pci.c
===
RCS file: /cvsroot/src/sys/external/bsd/drm2/i915drm/i915_pci.c,v
retrieving revision 1.2
diff -u -r1.2 i915_pci.c
--- sys/external/bsd/drm2/i915drm/i915_pci.c18 Mar 2014 18:20:42
-1.2
+++ sys/external/bsd/drm2/i915drm/i915_pci.c25 Mar 2014 13:19:56 -
@@ -167,6 +167,12 @@
 i915_drm_driver-driver_features =~ DRIVER_USE_AGP;
 }

+#if 1 /* XXX NONAKA */
+wsdisplay_cndetach();
+extern int vga_cndetach(void);
+vga_cndetach();
+#endif /* XXX NONAKA */
+
 /* Initialize the drm pci driver state.  */
 sc-sc_drm_dev.driver = i915_drm_driver;
 drm_pci_attach(self, pa, sc-sc_pci_dev, sc-sc_drm_dev);
@@ -416,7 +422,7 @@
 goto fail3;
 }

-prop_dictionary_set_bool(dict, is_console, 0); /* XXX */
+prop_dictionary_set_bool(dict, is_console, true /*0*/); /* XXX
*/ /*NONAKA*/
 prop_dictionary_set_uint32(dict, width, mode_cmd.width);
 prop_dictionary_set_uint32(dict, height, mode_cmd.height);
 prop_dictionary_set_uint8(dict, depth, sizes-surface_bpp);
Index: sys/dev/pci/hdaudio/hdafg.c
===
RCS file: /cvsroot/src/sys/dev/pci/hdaudio/hdafg.c,v
retrieving revision 1.18
diff -u -r1.18 hdafg.c
--- sys/dev/pci/hdaudio/hdafg.c16 Oct 2013 18:13:00 -1.18
+++ sys/dev/pci/hdaudio/hdafg.c25 Mar 2014 13:19:56 -
@@ -4263,7 +4263,9 @@
 for (j = 0; j  HDAUDIO_MAXPINS; j++) {
 if (as[i].as_pins[j] == 0)
 continue;
+#if 0/* XXX */
 hdafg_assoc_dump_dd(sc, as[i], j);
+#endif
 }
 }
 break;

Regards
-- 
NONAKA Kimihiro


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-23 Thread David H . Gutteridge
On 2014-03-20, at 6:27 PM, David H. Gutteridge wrote:
 On Tue, 18 Mar 2014 at 19:17:01, Taylor R Campbell wrote:
 I merged the riastradh-drm2 branch to HEAD today.  This shouldn't
 cause any problems for anyone, because it touched very little outside
 sys/external/bsd/drm2 -- it's not hooked into any kernels other than
 the new amd64/DRMKMS one.  But let me know if you observe any fallout.
 
 Update to userland X.org should be coming soon, so that userlands can
 take advantage of the new DRM/KMS drivers.
 
 Hello,
 
 I doubt I'm telling you anything you don't already know, but I tried
 compiling a DRMKMS kernel for both amd64 and i386 to test, and
 neither compiled.

 With i386, I hit this first:
 
 In file included from 
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/include/drm/drmP.h:52:0,
 from 
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c:34:
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/pci.h: In 
 function 'pci_bus_alloc_resource':
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/pci.h:255:6:
  error: large integer implicitly truncated to unsigned type
 *** [drm_agpsupport.o] Error code 1
 
 I realize you only provided an amd64 kernel, the implication being
 i386 might not yet be supported, but I tried it anyway, as the machine
 I'd test with isn't capable of running 64-bit code.
 
 From looking at the code, it's clear you're already aware of the
 issue, given your XXX notation.
 
 error = bus_space_alloc(bst, start, 0xULL /* XXX */,
   size, align, 0, 0, resource-start, resource-r_bsh);
 

If this is of interest to anyone, I opened a PR detailing some issues
that prevent this code from being used on i386. (The PR is 48676.)

Dave



Re: HEADS UP: riastradh-drm2 branch merged

2014-03-21 Thread Joerg Sonnenberger
On Fri, Mar 21, 2014 at 08:23:54AM +, David Laight wrote:
 On Thu, Mar 20, 2014 at 06:27:55PM -0400, David H. Gutteridge wrote:
  On Tue, 18 Mar 2014 at 19:17:01, Taylor R Campbell wrote:
  From looking at the code, it's clear you're already aware of the
  issue, given your XXX notation.
  
  error = bus_space_alloc(bst, start, 0xULL /* XXX */,
  size, align, 0, 0, resource-start, resource-r_bsh);
  
  I don't know if it's the preferred NetBSD way to handle this, but I'd
  be inclined to add a macro that defines that literal value differently
  depending on whether it's an amd64/i386 PAE build or a plain i386
  build.
 
   ((uint64_t)0xul  32 | 0x)
 works for both.

UINT64_C(0x)

Joerg


Re: HEADS UP: riastradh-drm2 branch merged

2014-03-21 Thread David H . Gutteridge
On 2014-03-20, at 6:27 PM, David H. Gutteridge wrote:
 On Tue, 18 Mar 2014 at 19:17:01, Taylor R Campbell wrote:
 I merged the riastradh-drm2 branch to HEAD today.  This shouldn't
 cause any problems for anyone, because it touched very little outside
 sys/external/bsd/drm2 -- it's not hooked into any kernels other than
 the new amd64/DRMKMS one.  But let me know if you observe any fallout.
 
 Update to userland X.org should be coming soon, so that userlands can
 take advantage of the new DRM/KMS drivers.
 
 Hello,
 
 I doubt I'm telling you anything you don't already know, but I tried
 compiling a DRMKMS kernel for both amd64 and i386 to test, and
 neither compiled.
 
 With amd64, I hit this:
 
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c: In 
 function 'do_cvt_mode':
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:1399:13:
  error: 'width' may be used uninitialized in this function 
 [-Werror=maybe-uninitialized]
 newmode = drm_cvt_mode(dev, width, height,
 ^
 In file included from 
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:30:0:
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:1375:25:
  note: 'width' was declared here
   int uninitialized_var(width), height;
 ^
 /usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/kernel.h:47:30:
  note: in definition of macro 'uninitialized_var'
 #define uninitialized_var(x) x
  ^
 cc1: all warnings being treated as errors
 *** [drm_edid.o] Error code 1
 
 I assume this must simply be fallout from GCC being upgraded to 4.8.3.

After the commit referenced below, I'm able to build the amd64 kernel.

Regards,

Dave

Module Name:src
Committed By:   riastradh
Date:   Fri Mar 21 02:25:05 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/linux: kernel.h

Log Message:
Make uninitialized_var kludge expand to `x = 0'.

Forgot to commit this the other day.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/include/linux/kernel.h



Re: HEADS UP: riastradh-drm2 branch merged

2014-03-20 Thread David H. Gutteridge
On Tue, 18 Mar 2014 at 19:17:01, Taylor R Campbell wrote:
I merged the riastradh-drm2 branch to HEAD today.  This shouldn't
cause any problems for anyone, because it touched very little outside
sys/external/bsd/drm2 -- it's not hooked into any kernels other than
the new amd64/DRMKMS one.  But let me know if you observe any fallout.

Update to userland X.org should be coming soon, so that userlands can
take advantage of the new DRM/KMS drivers.

Hello,

I doubt I'm telling you anything you don't already know, but I tried
compiling a DRMKMS kernel for both amd64 and i386 to test, and
neither compiled.

With amd64, I hit this:

/usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c: In 
function 'do_cvt_mode':
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:1399:13:
 error: 'width' may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
 newmode = drm_cvt_mode(dev, width, height,
 ^
In file included from 
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:30:0:
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_edid.c:1375:25:
 note: 'width' was declared here
   int uninitialized_var(width), height;
 ^
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/kernel.h:47:30:
 note: in definition of macro 'uninitialized_var'
 #define uninitialized_var(x) x
  ^
cc1: all warnings being treated as errors
*** [drm_edid.o] Error code 1

I assume this must simply be fallout from GCC being upgraded to 4.8.3.

With i386, I hit this first:

In file included from 
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/include/drm/drmP.h:52:0,
 from 
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c:34:
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/pci.h: In 
function 'pci_bus_alloc_resource':
/usr/builds/netbsd-current/src/sys/external/bsd/drm2/include/linux/pci.h:255:6: 
error: large integer implicitly truncated to unsigned type
*** [drm_agpsupport.o] Error code 1

I realize you only provided an amd64 kernel, the implication being
i386 might not yet be supported, but I tried it anyway, as the machine
I'd test with isn't capable of running 64-bit code.

From looking at the code, it's clear you're already aware of the
issue, given your XXX notation.

error = bus_space_alloc(bst, start, 0xULL /* XXX */,
size, align, 0, 0, resource-start, resource-r_bsh);

I don't know if it's the preferred NetBSD way to handle this, but I'd
be inclined to add a macro that defines that literal value differently
depending on whether it's an amd64/i386 PAE build or a plain i386
build.

Regards,

Dave

Re: HEADS UP: riastradh-drm2 branch merged

2014-03-20 Thread Rhialto
On Thu 20 Mar 2014 at 18:27:55 -0400, David H. Gutteridge wrote:
 I doubt I'm telling you anything you don't already know, but I tried
 compiling a DRMKMS kernel for both amd64 and i386 to test, and
 neither compiled.

Just a note that I see the same (I only tried amd64).

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl-- 'this bath is too hot.'


pgpdG93nItReA.pgp
Description: PGP signature