mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 21:58:27 +00:00
m1n1.agx: Add show_stats to disable stats printing
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
0b37f5599c
commit
8a3aad19e9
2 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,7 @@ class AGX:
|
|||
self.p = u.proxy
|
||||
|
||||
self.iface = u.iface
|
||||
self.show_stats = False
|
||||
|
||||
self.asc_dev = u.adt["/arm-io/gfx-asc"]
|
||||
self.sgx_dev = u.adt["/arm-io/sgx"]
|
||||
|
@ -165,7 +166,8 @@ class AGX:
|
|||
for chan in self.ch.log:
|
||||
chan.poll()
|
||||
self.ch.ktrace.poll()
|
||||
self.ch.stats.poll()
|
||||
if self.show_stats:
|
||||
self.ch.stats.poll()
|
||||
self.ch.event.poll()
|
||||
|
||||
def kick_firmware(self):
|
||||
|
|
|
@ -98,4 +98,5 @@ class GPUStatsChannel(GPURXChannel):
|
|||
MSG_CLASS = StatsMsg
|
||||
|
||||
def handle_message(self, msg):
|
||||
self.log(f"stat {msg}")
|
||||
if self.agx.show_stats:
|
||||
self.log(f"stat {msg}")
|
||||
|
|
Loading…
Add table
Reference in a new issue