NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-amd64/56815 (Lenovo ThinkCentre with i915drmkms graphics fails to boot)
The following reply was made to PR port-amd64/56815; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Jarle Greipsland <jarle.greipsland%norid.no@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: port-amd64/56815 (Lenovo ThinkCentre with i915drmkms graphics
fails to boot)
Date: Sun, 21 Jan 2024 14:59:58 +0000
This is a multi-part message in MIME format.
--=_cEFiPfdk98xHDMxf5dg4ZFdv6SEdn8RA
> Date: Sun, 21 Jan 2024 15:24:15 +0100 (CET)
> From: Jarle Greipsland <jarle.greipsland%norid.no@localhost>
>
> I noticed some fresh commits touching the interaction between the
> Intel graphics chipsets and the NetBSD memory handling system. I
> therefore decided to try out a fresh kernel on my little
> ThinkCentre. Unfortunately, the (LOCKDEBUG) kernel panics in the
> same place as before, and with the same backtrace.
Yes, unfortunately, this issue is clearly not related to the recent
commits.
Can you please try the attached patch and share the dmesg output when
it panics? It won't fix anything but it may help to track down what's
going wrong.
--=_cEFiPfdk98xHDMxf5dg4ZFdv6SEdn8RA
Content-Type: text/plain; charset="ISO-8859-1"; name="pr56815-i915rpsmutexinit-printfs"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="pr56815-i915rpsmutexinit-printfs.patch"
From 5f23bd50408ce9976faf1e04b6ebd14f5259b512 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Date: Sun, 21 Jan 2024 14:50:57 +0000
Subject: [PATCH] WIP: PR 56815: sprinkle debug messages to see what gets
called when
---
.../bsd/drm2/dist/drm/i915/gt/intel_gt.c | 40 +++++++++----------
.../bsd/drm2/dist/drm/i915/gt/intel_gt_pm.c | 2 +-
.../bsd/drm2/dist/drm/i915/gt/intel_rps.c | 12 +++---
.../bsd/drm2/dist/drm/i915/i915_drv.c | 22 +++++-----
4 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt.c b/sys/extern=
al/bsd/drm2/dist/drm/i915/gt/intel_gt.c
index 20fa85000ca8..87f17c09e153 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt.c
@@ -26,7 +26,7 @@ __KERNEL_RCSID(0, "$NetBSD: intel_gt.c,v 1.3 2021/12/19 1=
1:39:55 riastradh Exp $
#include "intel_pm.h"
=20
void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i91=
5)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
gt->i915 =3D i915;
gt->uncore =3D &i915->uncore;
=20
@@ -563,12 +563,12 @@ static void __intel_gt_disable(struct intel_gt *gt)
}
=20
int intel_gt_init(struct intel_gt *gt)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
int err;
=20
err =3D i915_inject_probe_error(gt->i915, -ENODEV);
- if (err)
- return err;
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ return err; }
=20
/*
* This is just a security blanket to placate dragons.
@@ -580,39 +580,39 @@ int intel_gt_init(struct intel_gt *gt)
intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
=20
err =3D intel_gt_init_scratch(gt, IS_GEN(gt->i915, 2) ? SZ_256K : SZ_4K);
- if (err)
- goto out_fw;
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto out_fw; }
=20
intel_gt_pm_init(gt);
=20
gt->vm =3D kernel_vm(gt);
- if (!gt->vm) {
+ if (!gt->vm) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
err =3D -ENOMEM;
goto err_pm;
}
=20
err =3D intel_engines_init(gt);
- if (err)
- goto err_engines;
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_engines; }
=20
intel_uc_init(>->uc);
=20
err =3D intel_gt_resume(gt);
- if (err)
- goto err_uc_init;
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_uc_init; }
=20
err =3D __engines_record_defaults(gt);
- if (err)
- goto err_gt;
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_gt; }
=20
err =3D __engines_verify_workarounds(gt);
- if (err)
- goto err_gt;
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_gt; }
=20
err =3D i915_inject_probe_error(gt->i915, -EIO);
- if (err)
- goto err_gt;
-
+ if (err) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_gt; }
+ printf("%s:%d: %s ok\n", __FILE__, __LINE__, __func__);
goto out_fw;
err_gt:
__intel_gt_disable(gt);
@@ -626,8 +626,8 @@ err_pm:
intel_gt_pm_fini(gt);
intel_gt_fini_scratch(gt);
out_fw:
- if (err)
- intel_gt_set_wedged_on_init(gt);
+ if (err) { printf("%s:%d: %s err=3D%d\n", __FILE__, __LINE__, __func__, e=
rr);
+ intel_gt_set_wedged_on_init(gt); }
intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
return err;
}
diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt_pm.c b/sys/ext=
ernal/bsd/drm2/dist/drm/i915/gt/intel_gt_pm.c
index 5441ec62120b..3bdbcc2b192d 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt_pm.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gt_pm.c
@@ -113,7 +113,7 @@ void intel_gt_pm_init_early(struct intel_gt *gt)
}
=20
void intel_gt_pm_init(struct intel_gt *gt)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
/*
* Enabling power-management should be "self-healing". If we cannot
* enable a feature, simply leave it disabled with a notice to the
diff --git a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_rps.c b/sys/exter=
nal/bsd/drm2/dist/drm/i915/gt/intel_rps.c
index d3faefcffe98..6afd4eab71c4 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_rps.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_rps.c
@@ -537,7 +537,7 @@ static u32 rps_limits(struct intel_rps *rps, u8 val)
}
=20
static void rps_set_power(struct intel_rps *rps, int new_power)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
struct intel_uncore *uncore =3D rps_to_uncore(rps);
struct drm_i915_private *i915 =3D rps_to_i915(rps);
u32 threshold_up =3D 0, threshold_down =3D 0; /* in % */
@@ -610,7 +610,7 @@ skip_hw_write:
}
=20
static void gen6_rps_set_thresholds(struct intel_rps *rps, u8 val)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
int new_power;
=20
new_power =3D rps->power.mode;
@@ -650,7 +650,7 @@ static void gen6_rps_set_thresholds(struct intel_rps *r=
ps, u8 val)
}
=20
void intel_rps_mark_interactive(struct intel_rps *rps, bool interactive)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
mutex_lock(&rps->power.mutex);
if (interactive) {
if (!rps->power.interactive++ && rps->active)
@@ -1617,7 +1617,7 @@ void gen5_rps_irq_handler(struct intel_rps *rps)
}
=20
void intel_rps_init_early(struct intel_rps *rps)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
mutex_init(&rps->lock);
mutex_init(&rps->power.mutex);
=20
@@ -1627,7 +1627,7 @@ void intel_rps_init_early(struct intel_rps *rps)
}
=20
void intel_rps_init(struct intel_rps *rps)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
struct drm_i915_private *i915 =3D rps_to_i915(rps);
=20
if (IS_CHERRYVIEW(i915))
@@ -1678,7 +1678,7 @@ void intel_rps_init(struct intel_rps *rps)
}
=20
void intel_rps_fini(struct intel_rps *rps)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
=20
mutex_destroy(&rps->power.mutex);
mutex_destroy(&rps->lock);
diff --git a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c b/sys/external/=
bsd/drm2/dist/drm/i915/i915_drv.c
index bf64ff40059f..052bef78f1e2 100644
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
@@ -511,11 +511,11 @@ static void sanitize_gpu(struct drm_i915_private *i91=
5)
* function hooks not requiring accessing the device.
*/
static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
-{
+{ printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
int ret =3D 0;
=20
- if (i915_inject_probe_failure(dev_priv))
- return -ENODEV;
+ if (i915_inject_probe_failure(dev_priv)) { printf("%s:%d: %s\n", __FILE__=
, __LINE__, __func__);
+ return -ENODEV; }
=20
intel_device_info_subplatform_init(dev_priv);
=20
@@ -539,12 +539,12 @@ static int i915_driver_early_probe(struct drm_i915_pr=
ivate *dev_priv)
intel_runtime_pm_init_early(&dev_priv->runtime_pm);
=20
ret =3D i915_workqueues_init(dev_priv);
- if (ret < 0)
- return ret;
+ if (ret < 0) { printf("%s:%d: %s ret=3D%d\n", __FILE__, __LINE__, __func_=
_, ret);
+ return ret; }
=20
ret =3D vlv_alloc_s0ix_state(dev_priv);
- if (ret < 0)
- goto err_workqueues;
+ if (ret < 0) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_workqueues; }
=20
intel_wopcm_init_early(&dev_priv->wopcm);
=20
@@ -558,8 +558,8 @@ static int i915_driver_early_probe(struct drm_i915_priv=
ate *dev_priv)
intel_pm_setup(dev_priv);
intel_init_dpio(dev_priv);
ret =3D intel_power_domains_init(dev_priv);
- if (ret < 0)
- goto err_gem;
+ if (ret < 0) { printf("%s:%d: %s\n", __FILE__, __LINE__, __func__);
+ goto err_gem; }
intel_irq_init(dev_priv);
intel_init_display_hooks(dev_priv);
intel_init_clock_gating_hooks(dev_priv);
@@ -567,14 +567,14 @@ static int i915_driver_early_probe(struct drm_i915_pr=
ivate *dev_priv)
intel_display_crc_init(dev_priv);
=20
intel_detect_preproduction_hw(dev_priv);
-
+ printf("%s:%d: %s ok\n", __FILE__, __LINE__, __func__);
return 0;
=20
err_gem:
i915_gem_cleanup_early(dev_priv);
intel_gt_driver_late_release(&dev_priv->gt);
vlv_free_s0ix_state(dev_priv);
-err_workqueues:
+err_workqueues: printf("%s:%d: %s ret=3D%d\n", __FILE__, __LINE__, __func_=
_, ret);
i915_workqueues_cleanup(dev_priv);
mutex_destroy(&dev_priv->hdcp_comp_mutex);
mutex_destroy(&dev_priv->pps_mutex);
--=_cEFiPfdk98xHDMxf5dg4ZFdv6SEdn8RA--
Home |
Main Index |
Thread Index |
Old Index