diff mbox series

[2/2] drm/i915/dmc: Use unversioned path for ADLP

Message ID 20230123182021.31239-3-gustavo.sousa@intel.com (mailing list archive)
State New, archived
Headers show
Series Use unversioned blob path for ADLP DMC | expand

Commit Message

Gustavo Sousa Jan. 23, 2023, 6:20 p.m. UTC
The new DMC release for ADLP (v2.18) in linux-firmware adopted the new
convention of using unversioned filenames, so update the driver code for
that new release. Keep the latest versioned path as fallback so we do
not cause regressions.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dmc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Rodrigo Vivi Jan. 23, 2023, 8:50 p.m. UTC | #1
On Mon, Jan 23, 2023 at 03:20:21PM -0300, Gustavo Sousa wrote:
> The new DMC release for ADLP (v2.18) in linux-firmware adopted the new
> convention of using unversioned filenames, so update the driver code for
> that new release. Keep the latest versioned path as fallback so we do
> not cause regressions.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dmc.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
> index 2464796c769d..257aa2b7cf20 100644
> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> @@ -63,8 +63,10 @@
>  #define DG2_DMC_PATH			DMC_LEGACY_PATH(dg2, 2, 08)
>  MODULE_FIRMWARE(DG2_DMC_PATH);
>  
> -#define ADLP_DMC_PATH			DMC_LEGACY_PATH(adlp, 2, 16)
> +#define ADLP_DMC_PATH			DMC_PATH(adlp)
> +#define ADLP_DMC_FALLBACK_PATH		DMC_LEGACY_PATH(adlp, 2, 16)
>  MODULE_FIRMWARE(ADLP_DMC_PATH);
> +MODULE_FIRMWARE(ADLP_DMC_FALLBACK_PATH);

I'm glad this works without warning on the intrd/intramfs generators.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

>  
>  #define ADLS_DMC_PATH			DMC_LEGACY_PATH(adls, 2, 01)
>  MODULE_FIRMWARE(ADLS_DMC_PATH);
> @@ -855,7 +857,9 @@ static void intel_dmc_runtime_pm_put(struct drm_i915_private *dev_priv)
>  
>  static const char *dmc_fallback_path(struct drm_i915_private *i915)
>  {
> -	/* No fallback paths for now. */
> +	if (IS_ALDERLAKE_P(i915))
> +		return ADLP_DMC_FALLBACK_PATH;
> +
>  	return NULL;
>  }
>  
> -- 
> 2.39.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index 2464796c769d..257aa2b7cf20 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -63,8 +63,10 @@ 
 #define DG2_DMC_PATH			DMC_LEGACY_PATH(dg2, 2, 08)
 MODULE_FIRMWARE(DG2_DMC_PATH);
 
-#define ADLP_DMC_PATH			DMC_LEGACY_PATH(adlp, 2, 16)
+#define ADLP_DMC_PATH			DMC_PATH(adlp)
+#define ADLP_DMC_FALLBACK_PATH		DMC_LEGACY_PATH(adlp, 2, 16)
 MODULE_FIRMWARE(ADLP_DMC_PATH);
+MODULE_FIRMWARE(ADLP_DMC_FALLBACK_PATH);
 
 #define ADLS_DMC_PATH			DMC_LEGACY_PATH(adls, 2, 01)
 MODULE_FIRMWARE(ADLS_DMC_PATH);
@@ -855,7 +857,9 @@  static void intel_dmc_runtime_pm_put(struct drm_i915_private *dev_priv)
 
 static const char *dmc_fallback_path(struct drm_i915_private *i915)
 {
-	/* No fallback paths for now. */
+	if (IS_ALDERLAKE_P(i915))
+		return ADLP_DMC_FALLBACK_PATH;
+
 	return NULL;
 }