Re: HEADS UP: Merging drm update

2021-12-26 Thread Martin Husemann
On Mon, Dec 27, 2021 at 12:34:10PM +0900, Ryo ONODERA wrote:
> "panic: i915drmkms0: notice: DMC firmware homepage: 

Where would the firmware need to be?

/libdata/firmware/i915/skl_dmc_ver1_27.bin

obviously is not the right place.

Martin


Re: Filesystem corruption in current 9.99.92 (posix1eacl & log enabled FFSv2)

2021-12-26 Thread Matthias Petermann

Hello Chuck,

On 24.12.21 01:10, Matthias Petermann wrote:
thanks for the good explanation which helped me a lot, and the tip how 
to break the infinite loop. I will definitely try that. In the meantime 
I have mounted the filesystem without the posix1eacls option. In this 
mode the "find /export" command runs cleanly. So your tip regarding the 
ACLs / extended attributes seems completely right. Currently I transfer 
the data from there to another filesystem to compare it from there 
against the most recent backup. Unfortunately this also means that I 
don't know at the moment if I will get back the state I had before after 
a new mount with the posix1eacls option. I hope so though, because I 
would like to find out more about this.


I'll get back to you as soon as I'm ready.
I finally managed to get the testing done here and I can confirm that 
with your patch, the infinite loop does not occur when I access the 
affected directory.


So to summarize this up:

a) with unpatched kernel

```
# cd /export/project/A

--> infinite loop
```

b) with your patch

```
# cd /export/project/A

--> ok
```

I did not try to move the file around as you recommended because I would 
like to ask if there is anything I can do at this point to gather more 
diagnostic data to help understand the root cause?


What I tried already is to list the extended attributes for the 
"affected" directory and another "unaffected" directory located side by 
side:


# lsextattr system /expotr/project/A 



A/
# lsextattr system /export/project/B 



B/posix1e.acl_access  posix1e.acl_default security.NTACL

I guess this proves your theory the extended attributes block got 
corrupted somehow...


Kind regard
Matthias


Re: HEADS UP: Merging drm update

2021-12-26 Thread Ryo ONODERA
Hi,

Taylor R Campbell  writes:

> Can you try the attached patch?  Also, if you haven't already, can you
> try running a DIAGNOSTIC/DEBUG/LOCKDEBUG kernel?

Thanks for your patch.
It seems that it is already in src tree.

My laptop has no Intel AMT support.
I have added as follows:

options DDB_COMMANDONENTER="bt;sync"
options DIAGNOSTIC
options DEBUG
options LOCKDEBUG

And I have gotten the following dmesg.
"panic: i915drmkms0: notice: DMC firmware homepage: 
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915kernel
 diagnostic assertion "!(!i915_request_completed(rq))" failed: file 
"/usr/src/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt.c", line 475"
is critical part for my laptop.
I should enable debug mode more earlier...

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
2018, 2019, 2020, 2021 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 9.99.93 (DTRACE7) #7: Mon Dec 27 11:57:21 JST 2021
ryoon@brownie:/usr/world/9.99/amd64/obj/sys/arch/amd64/compile/DTRACE7
total memory = 15961 MB
avail memory = 15405 MB
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
efi: systbl at pa 5697d018
mainbus0 (root)
ACPI: RSDP 0x63FFE014 24 (v02 DELL  )
ACPI: XSDT 0x63F9C188 F4 (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: FACP 0x63FF6000 000114 (v06 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: DSDT 0x63FB3000 03F8DE (v02 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: FACS 0x63EDF000 40
ACPI: SSDT 0x63FFB000 001B61 (v02 CpuRef CpuSsdt  3000 INTL 
20180927)
ACPI: SSDT 0x63FF7000 003C64 (v02 INTEL  DptfTabl 1000 INTL 
20180927)
ACPI: HPET 0x63FF5000 38 (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: APIC 0x63FF4000 00012C (v03 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: MCFG 0x63FF3000 3C (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: SSDT 0x63FB2000 0008D9 (v02 DELL   DellRtd3 1000 INTL 
20180927)
ACPI: NHLT 0x63FB1000 2D (v00 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: SSDT 0x63FB 000CB8 (v02 DELL   UsbCTabl 1000 INTL 
20180927)
ACPI: SSDT 0x63FAF000 000612 (v02 DELL   Tpm2Tabl 1000 INTL 
20180927)
ACPI: TPM2 0x63FAE000 34 (v04 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: LPIT 0x63FAD000 94 (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: SSDT 0x63FAC000 000B75 (v02 DELL   PtidDevc 1000 INTL 
20180927)
ACPI: SSDT 0x63FAB000 000FBB (v02 DELL   TbtTypeC  INTL 
20180927)
ACPI: DBGP 0x63FAA000 34 (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: DBG2 0x63FA9000 54 (v00 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: SLIC 0x63FA8000 000176 (v03 DELL   CBX3 06222004 MSFT 
00010013)
ACPI: BOOT 0x63FA7000 28 (v01 DELL   CBX3 20170001 ??LL 
20160422)
ACPI: MSDM 0x63FA6000 55 (v03 DELL   CBX3 06222004 AMI  
00010013)
ACPI: SSDT 0x63FA4000 001554 (v02 SaSsdt SaSsdt   3000 INTL 
20180927)
ACPI: SSDT 0x63F9D000 006C63 (v02 INTEL  TcssSsdt 1000 INTL 
20180927)
ACPI: DMAR 0x63FFD000 B0 (v02 INTEL  Dell Inc 0002  
0113)
ACPI: SSDT 0x63F9B000 000BE6 (v02 DELL   xh_Dell_  INTL 
20180927)
ACPI: SSDT 0x63F9A000 000156 (v02 Dell   ADebTabl 1000 INTL 
20180927)
ACPI: BGRT 0x63F99000 38 (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: FPDT 0x63F98000 34 (v01 DELL   Dell Inc 20170001 ??LL 
20160422)
ACPI: 12 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x20, 120 pins
x2APIC available but disabled by DMAR table
cpu0 at mainbus0 apid 0
cpu0: Use lfence to serialize rdtsc
cpu0: CPU base freq 15 Hz
cpu0: CPU max freq 39 Hz
cpu0: TSC freq CPUID 149760 Hz
cpu0: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, id 0x706e5
cpu0: node 0, package 0, core 0, smt 0
cpu1 at mainbus0 apid 2
cpu1: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, id 0x706e5
cpu1: node 0, package 0, core 1, smt 0
cpu2 at mainbus0 apid 4
cpu2: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, id 0x706e5
cpu2: node 0, package 0, core 2, smt 0
cpu3 at mainbus0 apid 6
cpu3: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, id 0x706e5
cpu3: node 0, package 0, core 3, smt 0
cpu4 at mainbus0 apid 1
cpu4: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, id 0x706e5
cpu4: node 0, package 0, core 0, smt 1
cpu5 at mainbus0 apid 3
cpu5: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz, id 0x706e5
cpu5: node 0, package 0, core 1, smt 1
cpu6 at mainbus0 apid

daily CVS update output

2021-12-26 Thread NetBSD source update


Updating src tree:
P src/distrib/amd64/installimage/Makefile
P src/distrib/amd64/installimage-bios/Makefile
P src/share/man/man4/man4.amiga/xsh.4
P src/share/man/man9/namei.9
P src/sys/arch/amd64/amd64/machdep.c
P src/sys/arch/amiga/dev/grf_cl.c
P src/sys/arch/amiga/dev/grf_cv.c
P src/sys/arch/amiga/dev/grf_cv3d.c
P src/sys/arch/amiga/dev/grf_et.c
P src/sys/arch/arm/include/mutex.h
P src/sys/arch/arm/iomd/vidcvideo.c
P src/sys/arch/arm/xscale/pxa2x0reg.h
P src/sys/arch/evbmips/conf/CPMBR1400
P src/sys/arch/evbmips/conf/LINKITSMART7688
P src/sys/arch/evbmips/conf/ZYXELKX
P src/sys/arch/ews4800mips/conf/GENERIC
P src/sys/arch/hpcarm/conf/NETBOOKPRO
P src/sys/arch/i386/i386/machdep.c
P src/sys/arch/i386/include/frame.h
P src/sys/arch/luna68k/conf/files.luna68k
P src/sys/arch/macppc/conf/POWERMAC_G5
P src/sys/arch/pmax/ibus/siivar.h
P src/sys/arch/sparc64/sparc64/machdep.c
P src/sys/dev/acpi/acpi_util.c
P src/sys/dev/acpi/acpivar.h
P src/sys/dev/acpi/ohci_acpi.c
P src/sys/dev/pci/cmdide.c
P src/sys/dev/pci/pciidevar.h
P src/sys/dev/usb/ukbd.c
P src/sys/external/bsd/drm2/dist/drm/drm_vblank.c
P src/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm.c
P src/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
P src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c
P src/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c
P src/sys/external/bsd/drm2/linux/linux_ww_mutex.c
P src/usr.bin/mixerctl/mixerctl.c
P src/usr.bin/xlint/lint1/cgram.y
P src/usr.bin/xlint/lint1/lex.c

Updating xsrc tree:


Killing core files:



Updating release-8 src tree (netbsd-8):

Updating release-8 xsrc tree (netbsd-8):



Updating release-9 src tree (netbsd-9):

Updating release-9 xsrc tree (netbsd-9):




Updating file list:
-rw-rw-r--  1 srcmastr  netbsd  41227707 Dec 27 03:11 ls-lRA.gz


Re: HEADS UP: Merging drm update

2021-12-26 Thread Taylor R Campbell
Can you try the attached patch?  Also, if you haven't already, can you
try running a DIAGNOSTIC/DEBUG/LOCKDEBUG kernel?
>From 025745d6f43aff21c88bc9e3b393ce146fc9af04 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell 
Date: Sun, 26 Dec 2021 16:05:20 +
Subject: [PATCH] drm: Fix locking around accurate vblank counts.

- Make drm_crtc_accurate_vblank_count require the caller to hold the
  event lock, rather than take it internally.

- Fix locking around drm_crtc_accurate_vblank_count and related
  operations in amdgpu and nouveau interrupt handlers.

- Use drm_crtc_vblank_put_locked, not drm_crtc_vblank_put, when we
  already hold the event lock.
---
 .../dist/drm/amd/display/amdgpu_dm/amdgpu_dm.c|  2 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c |  2 ++
 sys/external/bsd/drm2/dist/drm/drm_vblank.c   | 15 ++-
 .../drm/nouveau/dispnv50/nouveau_dispnv50_disp.c  |  2 +-
 4 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c8cbf7a6f68e..d0386f514457 100644
--- a/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -361,7 +361,7 @@ static void dm_pflip_high_irq(void *interrupt_params)
drm_crtc_send_vblank_event(&amdgpu_crtc->base, e);
 
/* Event sent, so done with vblank for this flip */
-   drm_crtc_vblank_put(&amdgpu_crtc->base);
+   drm_crtc_vblank_put_locked(&amdgpu_crtc->base);
}
} else if (e) {
/* VRR active and inside front-porch: vblank count and
diff --git 
a/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c 
b/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
index 79cb94ea67dc..5a154037c524 100644
--- a/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
+++ b/sys/external/bsd/drm2/dist/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
@@ -319,7 +319,9 @@ void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc)
   &crcs[0], &crcs[1], &crcs[2]))
return;
 
+   spin_lock(&crtc->dev->event_lock);
drm_crtc_add_crc_entry(crtc, true,
   drm_crtc_accurate_vblank_count(crtc), 
crcs);
+   spin_unlock(&crtc->dev->event_lock);
}
 }
diff --git a/sys/external/bsd/drm2/dist/drm/drm_vblank.c 
b/sys/external/bsd/drm2/dist/drm/drm_vblank.c
index 9ced81bd7ed8..ec91bbe9391b 100644
--- a/sys/external/bsd/drm2/dist/drm/drm_vblank.c
+++ b/sys/external/bsd/drm2/dist/drm/drm_vblank.c
@@ -337,7 +337,7 @@ static u64 drm_vblank_count(struct drm_device *dev, 
unsigned int pipe)
  * This is mostly useful for hardware that can obtain the scanout position, but
  * doesn't have a hardware frame counter.
  */
-static u64 drm_crtc_accurate_vblank_count_locked(struct drm_crtc *crtc)
+u64 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc)
 {
struct drm_device *dev = crtc->dev;
unsigned int pipe = drm_crtc_index(crtc);
@@ -358,17 +358,6 @@ static u64 drm_crtc_accurate_vblank_count_locked(struct 
drm_crtc *crtc)
 
return vblank;
 }
-
-u64 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc)
-{
-   u64 vblank;
-
-   spin_lock(&crtc->dev->event_lock);
-   vblank = drm_crtc_accurate_vblank_count_locked(crtc);
-   spin_unlock(&crtc->dev->event_lock);
-
-   return vblank;
-}
 EXPORT_SYMBOL(drm_crtc_accurate_vblank_count);
 
 static void __disable_vblank(struct drm_device *dev, unsigned int pipe)
@@ -972,7 +961,7 @@ void drm_crtc_arm_vblank_event(struct drm_crtc *crtc,
assert_spin_locked(&dev->event_lock);
 
e->pipe = pipe;
-   e->sequence = drm_crtc_accurate_vblank_count_locked(crtc) + 1;
+   e->sequence = drm_crtc_accurate_vblank_count(crtc) + 1;
list_add_tail(&e->base.link, &dev->vblank_event_list);
 }
 EXPORT_SYMBOL(drm_crtc_arm_vblank_event);
diff --git 
a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c 
b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c
index b9423cdc84fb..f49bb2ddf56d 100644
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c
@@ -2136,9 +2136,9 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state 
*state)
if (new_crtc_state->event) {
unsigned long flags;
/* Get correct count/ts if racing with vblank irq */
+   spin_lock_irqsave(&crtc->dev->event_lock, flags);
if (new_crtc_state->active)
drm_crtc_accurate_vblank_count(crtc);
-   spin_lock_irqsave(&crtc->dev->eve

Re: HEADS UP: Merging drm update

2021-12-26 Thread iquiw
Hi,

New drm works great with my NVIDIA GT 710.
Manual scaling by xrandr, which is required before, is no longer necessary.
Boot time gets faster, and I have better font looking.

Thank you so much!!

On Sun, Dec 19, 2021 at 2:06 AM Taylor R Campbell  wrote:
>
> I'm planning to merge the drm update this weekend -- a cvs import and
> merge commit, plus about 1300 commits on top of that from the git
> repository.
>
> Please don't commit anything to the following subtrees until done --
> if you do, your changes will be lost:
>
> sys/external/bsd/drm2
> sys/external/bsd/common
>
> Please don't touch the following additional files outside those
> subtrees:
>
> sys/arch/arm/nvidia/tegra_drm.c
> sys/arch/arm/nvidia/tegra_drm.h
> sys/arch/arm/nvidia/tegra_drm_fb.c
> sys/arch/arm/nvidia/tegra_drm_mode.c
> sys/arch/arm/nvidia/tegra_fb.c
> sys/arch/arm/nvidia/tegra_nouveau.c
> sys/arch/arm/nxp/imx6_dwhdmi.c
> sys/arch/arm/rockchip/rk_anxdp.c
> sys/arch/arm/rockchip/rk_drm.c
> sys/arch/arm/rockchip/rk_drm.h
> sys/arch/arm/rockchip/rk_dwhdmi.c
> sys/arch/arm/rockchip/rk_fb.c
> sys/arch/arm/rockchip/rk_vop.c
> sys/arch/arm/sunxi/sunxi_drm.c
> sys/arch/arm/sunxi/sunxi_drm.h
> sys/arch/arm/sunxi/sunxi_dwhdmi.c
> sys/arch/arm/sunxi/sunxi_fb.c
> sys/arch/arm/sunxi/sunxi_hdmiphy.h
> sys/arch/arm/sunxi/sunxi_lcdc.c
> sys/arch/arm/sunxi/sunxi_mixer.c
> sys/arch/arm/ti/ti_fb.c
> sys/arch/arm/ti/ti_lcdc.c
> sys/arch/arm/ti/ti_lcdc.h
> sys/dev/fdt/fdt_panel.c
> sys/dev/fdt/hdmi_connector.c
> sys/dev/i2c/anxedp.c
> sys/dev/i2c/tda19988.c
> sys/dev/ic/anx_dp.c
> sys/dev/ic/anx_dp.h
> sys/dev/ic/dw_hdmi.c
> sys/dev/ic/dw_hdmi.h
> sys/dev/ic/dw_hdmi_phy.c
> sys/dev/videomode/edidvar.h
> sys/modules/*drmkms*
> sys/sys/agpio.h