Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176980552
D59674.1793685442.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D59674.1793685442.diff
View Options
diff --git a/sys/dev/amdsmu/amdsmu.h b/sys/dev/amdsmu/amdsmu.h
--- a/sys/dev/amdsmu/amdsmu.h
+++ b/sys/dev/amdsmu/amdsmu.h
@@ -115,6 +115,23 @@
*/
};
+static const struct amdsmu_diagnostics {
+ const char *blocking_ip_block;
+ bool ignore;
+ const char *expected_module;
+} amdsmu_diagnostics[] = {
+ { "GFX", false, "amdgpu" },
+ { "DISPLAY", false, "amdgpu" },
+ /*
+ * On Phoenix, these seem to report USB4, not USB3 as their names would
+ * suggest.
+ */
+ { "USB3_0", false, "thunderbolt" },
+ { "USB3_1", false, "thunderbolt" },
+ /* On Phoenix, the SMU seems to report garbage for this IP block. */
+ { "USB4_0", true, NULL },
+};
+
struct amdsmu_softc {
const struct amdsmu_product *product;
diff --git a/sys/dev/amdsmu/amdsmu.c b/sys/dev/amdsmu/amdsmu.c
--- a/sys/dev/amdsmu/amdsmu.c
+++ b/sys/dev/amdsmu/amdsmu.c
@@ -323,6 +323,7 @@
struct amdsmu_softc *sc = device_get_softc(dev);
struct amdsmu_metrics *m = &sc->metrics;
bool any_blocking = false;
+ const struct amdsmu_diagnostics *d;
if (stype != POWER_STYPE_SUSPEND_TO_IDLE)
return;
@@ -356,6 +357,21 @@
device_printf(dev, " %s (active for %ju us)\n",
sc->product->ip_blocks_names[i],
(uintmax_t)m->ip_block_last_active_time[i]);
+
+ for (size_t j = 0; j < nitems(amdsmu_diagnostics); j++) {
+ d = &amdsmu_diagnostics[j];
+ if (strcmp(d->blocking_ip_block,
+ sc->product->ip_blocks_names[i]) != 0)
+ continue;
+ if (d->ignore || d->expected_module == NULL)
+ break;
+ if (devclass_find(d->expected_module) != NULL)
+ break;
+ device_printf(dev,
+ " hint: load %s to allow this block "
+ "to suspend\n", d->expected_module);
+ break;
+ }
}
if (!any_blocking)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 3, 5:57 AM (10 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38977315
Default Alt Text
D59674.1793685442.diff (1 KB)
Attached To
Mode
D59674: amdsmu: Hints on what to do if IP block blocking S0i3
Attached
Detach File
Event Timeline