drm/i915/dmc: Do not try loading wrong DMC version
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 23 Feb 2022 21:09:33 +0000 (13:09 -0800)
committerRamalingam C <ramalingam.c@intel.com>
Fri, 25 Feb 2022 13:03:37 +0000 (18:33 +0530)
commit2ff5560e23c863b22afb7db01208a76d9f1d1046
tree51bdcfe50826a5fab8b4a644e8ae09cfc31e6b92
parentb4eb76d82a0ea92241f5079874a7aea10c5cc4ae
drm/i915/dmc: Do not try loading wrong DMC version

Checking by >= DISPLAY_VER(12) made sense when the support for Tiger
Lake was added. However now it only leads to wrong behavior when adding
more platforms since it's expected they either don't have DMC to load
or they have their own blob.

Logs from DG2 loading on a CFL host, without having a DMC firmware
defined:

<6>[    0.000000] DMI: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWR1.R00.X220.B00.2103302221 03/30/2021
...
<6>[    2.706607] pci 0000:03:00.0: [8086:56a0] type 00 class 0x030000
...
<7>[    6.340397] i915 0000:03:00.0: [drm:intel_dmc_ucode_init [i915]] Loading i915/tgl_dmc_ver2_12.bin
<7>[    6.341841] i915 0000:03:00.0: [drm:intel_fbc_init [i915]] Sanitized enable_fbc value: 1
<3>[    6.342432] genirq: Flags mismatch irq 0. 00000080 (i915) vs. 00015a00 (timer)
<6>[    6.346283] i915 0000:03:00.0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_12.bin (v2.12)
<3>[    6.385756] i915 0000:03:00.0: Device initialization failed (-16)
<5>[    6.385778] i915 0000:03:00.0: Please file a bug on drm/i915; see https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs for details.
<4>[    6.385782] i915: probe of 0000:03:00.0 failed with error -16

TGL is the only platform left with DISPLAY_VER() == 12 that is not
handled already in the if/else ladder, so handle it specifically.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220223210933.3049143-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_dmc.c