drm/i915/dmc: Prepare to use unversioned paths
authorGustavo Sousa <gustavo.sousa@intel.com>
Mon, 23 Jan 2023 18:20:20 +0000 (15:20 -0300)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 24 Jan 2023 19:43:06 +0000 (14:43 -0500)
commitff6f11afd792b59563b12b382d496279d63a55c0
treed0fbad82cbfa7a491613277865d4b7ba3b83acf6
parent21e18febba163b816e66f85f97b04732fdb9e3f9
drm/i915/dmc: Prepare to use unversioned paths

New DMC releases in linux-firmware will stop using version number in
blob filenames. This new convention provides the following benefits:

  1. It simplifies code maintenance, as new DMC releases for a platform
     using the new convention will always use the same filename for the
     blob.

  2. It allows DMC to be loaded even if the target system does not have
     the most recent firmware installed.

Prepare the driver by:

  - Using the new convention for DMC_PATH() and renaming the currently
    used one to make it clear it is for the legacy scheme.

  - Implementing a fallback mechanism for future transitions from
    versioned to unversioned paths so that we do not cause a regression
    for systems not having the most up-to-date linux-firmware files.

v2:
  - Keep using request_firmware() instead of firmware_request_nowarn().
    (Jani)
v3:
  - Keep current DMC paths instead of directly using unversioned ones,
    so that we do not disturb initrd generation.
    (Lucas, Rodrigo)

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230123182021.31239-2-gustavo.sousa@intel.com
drivers/gpu/drm/i915/display/intel_dmc.c