From 7cbab2dea5176e46fb31f543fd05e95bfc9921c8 Mon Sep 17 00:00:00 2001 From: Taylor Nelms Date: Wed, 29 Jan 2025 17:13:35 -0500 Subject: [PATCH] display: add drm_atomic_state to debug-build bugreport AVC Error Log Justification: [ 157.933663] type=1400 audit(1738255720.900:459): avc: denied { read } for comm="dump_pixel_disp" name="state" dev="debugfs" ino=105961 scontext=u:r:dump_pixel_display:s0 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0 Bug: 393355365 Test: `adb bugreport`, check for "DRM State" entry Flag: EXEMPT bugfix Change-Id: Ibbf3fe022863644ecc137ab28d3a2409e701e104 Signed-off-by: Taylor Nelms --- display/pixel/dump_display.cpp | 1 + display/sepolicy/pixel/genfs_contexts | 1 + 2 files changed, 2 insertions(+) diff --git a/display/pixel/dump_display.cpp b/display/pixel/dump_display.cpp index 1014977..b4a2d25 100644 --- a/display/pixel/dump_display.cpp +++ b/display/pixel/dump_display.cpp @@ -19,6 +19,7 @@ int main() { setbuf(stdout, NULL); dumpFileContent("CRTC-0 status", "/sys/kernel/debug/dri/0/crtc-0/status"); + dumpFileContent("DRM State", "/sys/kernel/debug/dri/0/state"); runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v"); dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name"); diff --git a/display/sepolicy/pixel/genfs_contexts b/display/sepolicy/pixel/genfs_contexts index 7c46278..4237cc5 100644 --- a/display/sepolicy/pixel/genfs_contexts +++ b/display/sepolicy/pixel/genfs_contexts @@ -1,3 +1,4 @@ genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0 +genfscon debugfs /dri/0/state u:object_r:vendor_dri_debugfs:s0 genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0