On Tue, May 04, 2021 at 03:44:54PM +0200, [email protected] wrote:
> Thanks for the quick help. I built a kernel with your fix.
> The system is booting up with a warning, now.
>
> ...
> scsibus3 at softraid0: 256 targets
> sd2 at scsibus3 targ 1 lun 0: <OPENBSD, SR RAID 1, 006>
> sd2: 122103MB, 512 bytes/sector, 250067198 sectors
> root on sd2a (da12fadb67cf7a4d.a) swap on sd2b dump on sd2b
> drm : drm_WARN_ON(d->wake_count)drm : drm_WARN_ON(d->wake_count)Device
> initialization failed (-22)
> Automatic boot in progress: starting file system checks.
> /dev/sd2a (da12fadb67cf7a4d.a): file system is clean; not checking
> ...
Thanks, can you try this?
The vma should be set by
gen6_ppgtt_create ppgtt->vma = pd_vma_create(...
__ppgtt_create
i915_ppgtt_create
init_aliasing_ppgtt
i915_init_ggtt
i915_gem_init
which runs before the intel_gt_init path in i915_gem_init
Index: sys/dev/pci/drm/i915/i915_vma.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_vma.c,v
retrieving revision 1.5
diff -u -p -r1.5 i915_vma.c
--- sys/dev/pci/drm/i915/i915_vma.c 11 Oct 2020 05:45:33 -0000 1.5
+++ sys/dev/pci/drm/i915/i915_vma.c 17 May 2021 06:52:19 -0000
@@ -1029,8 +1029,14 @@ static void flush_idle_contexts(struct i
int i915_ggtt_pin(struct i915_vma *vma, u32 align, unsigned int flags)
{
- struct i915_address_space *vm = vma->vm;
+ struct i915_address_space *vm;
int err;
+
+ if (vma == NULL) {
+ printf("\n%s called with NULL vma\n", __func__);
+ return -EINVAL;
+ }
+ vm = vma->vm;
GEM_BUG_ON(!i915_vma_is_ggtt(vma));
Index: sys/dev/pci/drm/i915/display/intel_display_power.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/display/intel_display_power.c,v
retrieving revision 1.1
diff -u -p -r1.1 intel_display_power.c
--- sys/dev/pci/drm/i915/display/intel_display_power.c 8 Jun 2020 04:48:12
-0000 1.1
+++ sys/dev/pci/drm/i915/display/intel_display_power.c 17 May 2021 07:17:06
-0000
@@ -1357,8 +1357,6 @@ static void vlv_display_power_well_deini
/* Prevent us from re-enabling polling on accident in late suspend */
#ifdef __linux__
if (!dev_priv->drm.dev->power.is_suspended)
-#else
- if (!cold)
#endif
intel_hpd_poll_init(dev_priv);
}
Index: sys/dev/pci/drm/i915/gt/gen6_ppgtt.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/gt/gen6_ppgtt.c,v
retrieving revision 1.1
diff -u -p -r1.1 gen6_ppgtt.c
--- sys/dev/pci/drm/i915/gt/gen6_ppgtt.c 8 Jun 2020 04:48:13 -0000
1.1
+++ sys/dev/pci/drm/i915/gt/gen6_ppgtt.c 17 May 2021 06:43:05 -0000
@@ -354,8 +354,10 @@ static struct i915_vma *pd_vma_create(st
GEM_BUG_ON(size > ggtt->vm.total);
vma = i915_vma_alloc();
- if (!vma)
+ if (!vma) {
+ printf("\n%s i915_vma_alloc() returned NULL\n", __func__);
return ERR_PTR(-ENOMEM);
+ }
i915_active_init(&vma->active, NULL, NULL);
Index: sys/dev/pci/drm/i915/gt/intel_ggtt.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/gt/intel_ggtt.c,v
retrieving revision 1.1
diff -u -p -r1.1 intel_ggtt.c
--- sys/dev/pci/drm/i915/gt/intel_ggtt.c 8 Jun 2020 04:48:13 -0000
1.1
+++ sys/dev/pci/drm/i915/gt/intel_ggtt.c 17 May 2021 06:42:06 -0000
@@ -699,8 +699,11 @@ int i915_init_ggtt(struct drm_i915_priva
if (INTEL_PPGTT(i915) == INTEL_PPGTT_ALIASING) {
ret = init_aliasing_ppgtt(&i915->ggtt);
- if (ret)
+ if (ret) {
+ printf("\n%s init_aliasing_ppgtt() returned %d\n",
+ __func__, ret);
cleanup_init_ggtt(&i915->ggtt);
+ }
}
return 0;