drm/i915/dmc: change how to disable DMC firmware using module param
authorJani Nikula <jani.nikula@intel.com>
Fri, 19 Apr 2024 09:41:57 +0000 (12:41 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 22 Apr 2024 13:48:13 +0000 (16:48 +0300)
commit068d6e9e7629875bd81583e5dbe65891165254b0
tree8727ceaff26dc8e9fb2e353713ec20530e9a31cd
parent3ffccdd94d6af647c64233ab37fda1a0c1a908c9
drm/i915/dmc: change how to disable DMC firmware using module param

The distinction between the dmc_firmware_path module param being NULL
and the empty string "" is problematic. It's not possible to set the
parameter back to NULL via sysfs or debugfs. Remove the distinction, and
consider NULL and the empty string to be the same thing, and use the
platform default for them.

This removes the possibility to disable DMC (and runtime PM) via
i915.dmc_firmware_path="". Instead, use "/dev/null" as the magic
firmware path to skip DMC firmware loading and disable runtime PM.

v2: Add support for i915.dmc_firmware_path="/dev/null" (Gustavo)

Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8695aca8a6643e36bb680bc2dcab97c637e70b00.1713519628.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dmc.c
drivers/gpu/drm/i915/i915_params.c