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
failures.

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

BUG=b:160248414
TEST=Tested on eve/hatch/trogdor/puff/cheza

Change-Id: I797d10d676d972ffe5b41f94983be50fdcf0a23a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2354392
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Sean Paul <seanpaul@chromium.org>
1 file changed