daily CVS update output

2019-01-14 Thread NetBSD source update


Updating src tree:
P src/lib/libc/gen/ctype.3
P src/lib/libwrap/expandm.c
P src/share/man/man8/compat_netbsd32.8
P src/share/man/man9/pmap.9
P src/share/misc/acronyms.comp
P src/sys/arch/x86/x86/dbregs.c
P src/sys/dev/fdt/fdt_pinctrl.c
P src/sys/dev/ic/ahcisatareg.h
P src/sys/dev/ic/ahcisatavar.h
P src/sys/dev/pci/ahcisata_pci.c
P src/sys/dev/pci/if_vioif.c
P src/sys/dev/pci/virtio.c
P src/sys/dev/pci/virtio_pci.c
P src/sys/dev/pci/virtiovar.h
P src/sys/kern/subr_prf.c
P src/sys/netinet6/ip6_input.c

Updating xsrc tree:


Killing core files:




Updating file list:
-rw-rw-r--  1 srcmastr  netbsd  51764036 Jan 15 03:03 ls-lRA.gz


Re: Brightness buttons don't work in current

2019-01-14 Thread Fekete Zoltán

Hi There,

As nobody could help me, finally I successfully patched the kernel to handle 
the brightness buttons on my Dell laptop.
I used the pmf system to notify the driver about the key events.

Please find the patch attached.

Some drawbacks in which I need help to improve:

 * I had to add a new field into struct device in sys/device.h. The new field 
has a name dv_payload.
   I couldn't find a better solution to save the original drm_device structure 
for the new callbacks,
   however I think there should be one;
   
 * In both callback functions in intel_panel.c I had to break the connector's loop after the 1st

   iteration. Otherwise the system simply crashes. I have to find out why is 
that.


So, plase read the patch, try it out.

I could try only on my Dell Latitude E6220, which uses the PCH line. With this 
patch it works as expected.
Other chips may not work.

Regards,

FeZ
Index: dev/acpi/wmi/wmi_dell.c
===
RCS file: /cvsroot/src/sys/dev/acpi/wmi/wmi_dell.c,v
retrieving revision 1.11
diff -u -r1.11 wmi_dell.c
--- dev/acpi/wmi/wmi_dell.c 3 Dec 2017 23:43:00 -   1.11
+++ dev/acpi/wmi/wmi_dell.c 14 Jan 2019 21:24:31 -
@@ -96,6 +96,8 @@
/* type 0x10 */
{WMI_DELLA_PMF, 0x0010, 0x0057, PMFE_DISPLAY_BRIGHTNESS_DOWN},
{WMI_DELLA_PMF, 0x0010, 0x0058, PMFE_DISPLAY_BRIGHTNESS_UP},
+   {WMI_DELLA_PMF, 0x0010, 0x0050, PMFE_DISPLAY_BRIGHTNESS_DOWN},
+   {WMI_DELLA_PMF, 0x0010, 0x0048, PMFE_DISPLAY_BRIGHTNESS_UP},
{WMI_DELLA_IGN, 0x0010, 0x0151, 0}, /* Fn-lock */
{WMI_DELLA_IGN, 0x0010, 0x0152, 0}, /* keyboard illumination */
{WMI_DELLA_PMF, 0x0010, 0x0153, PMFE_RADIO_TOGGLE},
Index: external/bsd/drm2/dist/drm/i915/intel_panel.c
===
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c,v
retrieving revision 1.12
diff -u -r1.12 intel_panel.c
--- external/bsd/drm2/dist/drm/i915/intel_panel.c   6 Oct 2018 15:33:35 
-   1.12
+++ external/bsd/drm2/dist/drm/i915/intel_panel.c   14 Jan 2019 21:24:40 
-
@@ -1865,12 +1866,72 @@
panel->downclock_mode);
 }
 
-void intel_backlight_register(struct drm_device *dev)
+static void
+intel_panel_backlight_display_brightness_up(device_t dev)
 {
-   struct intel_connector *connector;
+  struct drm_device* parent = dev->dv_payload;
+  u32 level = 0;
+  u32 max_level = 0;
+  u32 step = 0;
+  struct intel_connector *connector;
+  struct intel_panel *panel;
+  list_for_each_entry(connector, &parent->mode_config.connector_list, 
base.head)
+{
+  panel = &connector->panel;
+  max_level = panel->backlight.max;
+  step = max_level / 10;
+  level = pch_get_backlight(connector);
+  level += step;
+  if (level > max_level)
+   {
+ level = max_level;
+   }
+  panel->backlight.set(connector, level);
+  break;
+}
+  return;
+}
 
-   list_for_each_entry(connector, &dev->mode_config.connector_list, 
base.head)
-   intel_backlight_device_register(connector);
+static void
+intel_panel_backlight_display_brightness_down(device_t dev)
+{
+  struct drm_device* parent = dev->dv_payload;
+  u32 level = 0;
+  u32 max_level = 0;
+  u32 step = 0;
+  struct intel_connector *connector;
+  struct intel_panel *panel;
+  list_for_each_entry(connector, &parent->mode_config.connector_list, 
base.head)
+{
+  panel = &connector->panel;
+  max_level = panel->backlight.max;
+  step = max_level / 10;
+  level = pch_get_backlight(connector);
+  level -= step;
+  if (level < step)
+   {
+ level = step;
+   }
+  panel->backlight.set(connector, level);
+  break;
+}
+  return;
+}
+
+
+void intel_backlight_register(struct drm_device *dev)
+{
+  struct intel_connector *connector;
+  list_for_each_entry(connector, &dev->mode_config.connector_list, base.head)
+intel_backlight_device_register(connector);
+
+  struct device* child = dev->dev;
+  child->dv_payload = (void*)dev;
+  pmf_event_register(dev->dev, PMFE_DISPLAY_BRIGHTNESS_UP,
+intel_panel_backlight_display_brightness_up, true);
+  pmf_event_register(dev->dev, PMFE_DISPLAY_BRIGHTNESS_DOWN,
+intel_panel_backlight_display_brightness_down, true);
+  
 }
 
 void intel_backlight_unregister(struct drm_device *dev)
Index: sys/device.h
===
RCS file: /cvsroot/src/sys/sys/device.h,v
retrieving revision 1.157
diff -u -r1.157 device.h
--- sys/device.h1 Dec 2018 01:51:38 -   1.157
+++ sys/device.h14 Jan 2019 21:24:48 -
@@ -162,6 +162,7 @@
int dv_depth;   /* number of parents until root */
int dv_flags;   /* misc. flags; see below */
void*dv_private;/* this device's private sto

Re: Automated report: NetBSD-current/i386 test failure

2019-01-14 Thread Andreas Gustafsson
The NetBSD Test Fixture wrote:
> The newly failing test cases are:
> 
> lib/libc/sys/t_ptrace_wait3:dbregs_dr0_dont_inherit_execve
> lib/libc/sys/t_ptrace_wait3:dbregs_dr0_dont_inherit_lwp
(etc, more than 300 failing test cases)

These are also failing on real i386 hardware, but not on amd64.  Looks
like the problem started with these commits:

>2019.01.13.10.01.07 maxv src/sys/arch/x86/include/dbregs.h,v 1.8
>2019.01.13.10.01.07 maxv src/sys/arch/x86/x86/dbregs.c,v 1.13

-- 
Andreas Gustafsson, g...@gson.org


correction (Re: PCI_PRODUCT(pa->pa_id) is wrong (Re: kern info: [drm] failed to find VBIOS tablesIn-Reply-To:

2019-01-14 Thread Makoto Fujiwara
(I'm sending this twice, sorry if it duplicates),

I was probably wrong.
I have several Let's Note CF,
the model LCD works may have unmatched number:

 rom.rom_product
   PCI_PRODCUT(pa->pa_id) 
   LCD works
J10 46   46OK
SX2106  166--
SX3406  a16OK
N10106  126OK

values are in hexadecimal

So, the mismatch does not seem to be important.
-- 
Makoto Fujiwara
m...@netbsd.org
mak...@if.t.u-tokyo.ac.jp
mak...@ki.nu


Automated report: NetBSD-current/i386 test failure

2019-01-14 Thread NetBSD Test Fixture
This is an automatically generated notice of new failures of the
NetBSD test suite.

The newly failing test cases are:

lib/libc/sys/t_ptrace_wait3:dbregs_dr0_dont_inherit_execve
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_dont_inherit_lwp
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_code
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_readwrite_read_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_readwrite_read_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_readwrite_read_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_readwrite_write_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_readwrite_write_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_readwrite_write_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_writeonly_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_writeonly_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr0_trap_variable_writeonly_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_dont_inherit_execve
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_dont_inherit_lwp
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_code
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_readwrite_read_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_readwrite_read_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_readwrite_read_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_readwrite_write_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_readwrite_write_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_readwrite_write_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_writeonly_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_writeonly_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr1_trap_variable_writeonly_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_dont_inherit_execve
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_dont_inherit_lwp
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_code
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_readwrite_read_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_readwrite_read_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_readwrite_read_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_readwrite_write_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_readwrite_write_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_readwrite_write_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_writeonly_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_writeonly_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr2_trap_variable_writeonly_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_dont_inherit_execve
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_dont_inherit_lwp
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_code
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_readwrite_read_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_readwrite_read_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_readwrite_read_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_readwrite_write_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_readwrite_write_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_readwrite_write_byte
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_writeonly_2bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_writeonly_4bytes
lib/libc/sys/t_ptrace_wait3:dbregs_dr3_trap_variable_writeonly_byte
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr0
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr0_continued
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr0_yield
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr1
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr1_continued
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr1_yield
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr2
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr2_continued
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr2_yield
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr3
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr3_continued
lib/libc/sys/t_ptrace_wait3:dbregs_preserve_dr3_yield
lib/libc/sys/t_ptrace_wait3:x86_cve_2018_8897
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_dont_inherit_execve
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_dont_inherit_lwp
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_code
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_variable_readwrite_read_2bytes
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_variable_readwrite_read_4bytes
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_variable_readwrite_read_byte
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_variable_readwrite_write_2bytes
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_variable_readwrite_write_4bytes
lib/libc/sys/t_ptrace_wait4:dbregs_dr0_trap_variable_readwrite_write_byte
lib/libc/sys