Add drm.trace to kernel command line

In newer kernels (5.4+), we use tracefs for the drm_trace. Instead of
being configured via debugfs node, the trace_mask is now a module
parameter of drm. As such, we must either configure it via kernel
command line or sysfs.

This patch adds the trace mask to kernel command line instead of sysfs
to ensure we capture _all_ drm traces instead of only those occurring
after UI starts up. This is helpful in diagnosing early display/gpu

For kernels older than 5.4, this argument will be ignored.

For boot time impact, I measured the time from when kernel is loaded to
when the login screen appears using the seconds_kernel_to_login metric
from platform_BootPerf. 100 reboot cycles were run with this argument
enabled and again with it disabled. I chose trogdor as the platform
since it is the most chatty on the trace. Average time was the same for
both: 9.64s

TEST=Tested on eve/hatch/trogdor/puff/cheza

Change-Id: I797d10d676d972ffe5b41f94983be50fdcf0a23a
Reviewed-by: Mike Frysinger <>
Tested-by: Sean Paul <>
Commit-Queue: Sean Paul <>
1 file changed