Working snapshot before the OpenVINO MetricGAN GPU spike: thread-capped SpeechBrain DelaySum+MetricGAN on CPU, hop 200 ms, video hold for A/V sync, Arc VAAPI H.264, headless kmssink wall. 32 tests passing. Do not treat this as a GPU audio path.
55 lines
2.1 KiB
Python
55 lines
2.1 KiB
Python
#!/usr/bin/env python3
|
|
"""Print a compact DRM connector/CRTC/plane map from drm_info -j."""
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def main() -> int:
|
|
raw = subprocess.check_output(["drm_info", "-j"], text=True)
|
|
data = json.loads(raw)
|
|
for node, info in data.items():
|
|
driver = info.get("driver", {}).get("name") or info.get("driver_name")
|
|
device = info.get("device", {})
|
|
print(f"NODE {node} driver={driver} device={device}")
|
|
conns = info.get("connectors") or info.get("Connector") or []
|
|
if isinstance(conns, dict):
|
|
conns = list(conns.values())
|
|
crtcs = info.get("crtcs") or []
|
|
planes = info.get("planes") or []
|
|
print(f" crtcs={len(crtcs)} planes={len(planes)} connectors={len(conns)}")
|
|
if conns and isinstance(conns[0], dict):
|
|
print(" connector keys:", sorted(conns[0].keys())[:20])
|
|
for c in conns:
|
|
if not isinstance(c, dict):
|
|
print(" conn", c)
|
|
continue
|
|
cid = c.get("id") or c.get("object_id")
|
|
typ = c.get("type") or c.get("connector_type")
|
|
name = c.get("name")
|
|
st = c.get("status")
|
|
modes = c.get("modes") or []
|
|
mode0 = None
|
|
if modes:
|
|
m = modes[0]
|
|
if isinstance(m, dict):
|
|
mode0 = f"{m.get('name') or m.get('clock')} {m.get('hdisplay')}x{m.get('vdisplay')}"
|
|
else:
|
|
mode0 = str(m)[:80]
|
|
print(f" connector id={cid} type={typ} name={name} status={st} mode0={mode0}")
|
|
if planes and isinstance(planes[0], dict):
|
|
print(" plane keys:", sorted(planes[0].keys())[:20])
|
|
for p in planes[:8]:
|
|
print(" plane", {k: p.get(k) for k in list(p)[:12]})
|
|
if crtcs and isinstance(crtcs[0], dict):
|
|
print(" crtc keys:", sorted(crtcs[0].keys())[:20])
|
|
for cr in crtcs:
|
|
print(" crtc", {k: cr.get(k) for k in list(cr)[:12]})
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|