Merge amd-staging into amd-master 20241106

Signed-off-by: Zhang Ava <niandong.zhang@amd.com>
Change-Id: Ib125dee62e5a893871f5c6df7715177973361a02
Tento commit je obsažen v:
Zhang Ava
2024-11-08 08:42:13 +08:00
4 změnil soubory, kde provedl 44 přidání a 11 odebrání
+11 -8
Zobrazit soubor
@@ -89,14 +89,17 @@ validClockNames.sort()
def driverInitialized():
""" Returns true if amdgpu is found in the list of initialized modules
"""
driverInitialized = ''
try:
driverInitialized = str(subprocess.check_output("cat /sys/module/amdgpu/initstate |grep live", shell=True))
except subprocess.CalledProcessError:
pass
if len(driverInitialized) > 0:
return True
return False
driverInitialized = False
if os.path.exists("/sys/module/amdgpu") :
if os.path.exists("/sys/module/amdgpu/initstate"):
# amdgpu is loadable module
with open("/sys/module/amdgpu/initstate") as initstate:
if 'live' in initstate.read():
driverInitialized = True
else:
# amdgpu is built into the kernel
driverInitialized = True
return driverInitialized
def formatJson(device, log):