Fix compatibility issue for intel_dmc
cover Fix compatibility issue for intel_dmc
This series reverts hacky #ifdefs from intel_dmc
Chaitanya Kumar Borah (6):
Revert "FIXME: drm/i915/dmc: xe way of getting at stepping" drm/i915: Add wrapper for getting display step fixup! drm/xe/display: Implement display support drm/xe: Add intel_step.h compatibility header drm/xe: Add i915_gpu_error.h compatibility header drm/xe: Add intel_uc_fw.h compatibility header
drivers/gpu/drm/i915/display/intel_dmc.c | 19 ++---------------- drivers/gpu/drm/i915/intel_step.c | 5 +++++ drivers/gpu/drm/i915/intel_step.h | 1 + .../gpu/drm/xe/compat-i915-headers/i915_drv.h | 4 +++- .../xe/compat-i915-headers/i915_gpu_error.h | 18 +++++++++++++++++ .../drm/xe/compat-i915-headers/intel_step.h | 20 +++++++++++++++++++ .../drm/xe/compat-i915-headers/intel_uc_fw.h | 12 +++++++++++ 7 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gpu_error.h create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_step.h create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_uc_fw.h
Signature · 1 line
2.25.1
PATCH 1/6 Revert "FIXME: drm/i915/dmc: xe way of getting at stepping"
This reverts commit a0cdbefc3aea03c1d3f30460c1d89678705d57bb.
--- drivers/gpu/drm/i915/display/intel_dmc.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-)
drivers/gpu/drm/i915/display/intel_dmc.c +1 -16
@@ -30,18 +30,6 @@#include "intel_dmc.h" #include "intel_dmc_regs.h" -#ifndef I915 -#include "xe_uc_fw.h" - -#define INTEL_UC_FIRMWARE_URL XE_UC_FIRMWARE_URL - -__printf(2, 3) -static inline void -i915_error_printf (struct drm_i915_error_state_buf *e,const char *f, ...) -{ -} -#endif -/** * DOC: DMC Firmware Support *
@@ -321,11 +309,8 @@ static const struct stepping_info * intel_get_stepping_info(struct drm_i915_private *i915, struct stepping_info *si) { -#ifdef I915 const char *step_name = intel_step_name(RUNTIME_INFO(i915)->step.display_step); -#else -const char *step_name =xe_step_name (i915->info.step.display); -#endif + si->stepping = step_name[0 ]; si->substepping = step_name[1 ];return si;
Signature · 1 line
2.25.1
PATCH 2/6 drm/i915: Add wrapper for getting display step
In reply to Chaitanya Kumar BorahAdd a wrapper around intel_step_name that takes in driver data as an argument. This wrapper will help maintain compatibility with the proposed xe driver.
--- drivers/gpu/drm/i915/display/intel_dmc.c | 2 +- drivers/gpu/drm/i915/intel_step.c | 5 +++++ drivers/gpu/drm/i915/intel_step.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dmc.c +1 -1
@@ -309,7 +309,7 @@ static const struct stepping_info * intel_get_stepping_info(struct drm_i915_private *i915, struct stepping_info *si) { - const char *step_name = intel_step_name(RUNTIME_INFO(i915)->step.display_step); + const char *step_name = intel_display_step_name(i915); si->stepping = step_name[0 ]; si->substepping = step_name[1 ];
drivers/gpu/drm/i915/intel_step.c +5 -0
@@ -353,3 +353,8 @@ const char *intel_step_name(enum intel_step step)return "**" ; } } + +const char *intel_display_step_name (struct drm_i915_private *i915) +{ +return intel_step_name (RUNTIME_INFO (i915)->step.display_step); +}
drivers/gpu/drm/i915/intel_step.h +1 -0
@@ -78,5 +78,6 @@ enum intel_step {void intel_step_init (struct drm_i915_private *i915);const char *intel_step_name (enum intel_step step); +const char *intel_display_step_name (struct drm_i915_private *i915);#endif /* __INTEL_STEP_H__ */
Signature · 1 line
2.25.1
PATCH 3/6 fixup! drm/xe/display: Implement display support
In reply to Chaitanya Kumar BorahRemove redundant macro. Stepping will be handled in a separate compat header.
--- drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h +0 -1
@@ -204,7 +204,6 @@ static inline void intel_runtime_pm_put(struct xe_runtime_pm *pm, bool wakeref)for ((wf) =intel_runtime_pm_get (rpm); (wf); \ intel_runtime_pm_put((rpm), (wf)), (wf) = 0) -#define intel_step_name xe_step_name#define pdev_to_i915 pdev_to_xe_device#define DISPLAY_INFO (xe) ((xe)->info.display)#define RUNTIME_INFO (xe) (&(xe)->info.i915_runtime)
Signature · 1 line
2.25.1
PATCH 4/6 drm/xe: Add intel_step.h compatibility header
In reply to Chaitanya Kumar BorahAdd compatibility header with helpers to get display step name. This is needed to maintain compatibility with intel_dmc code.
--- .../gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 + .../drm/xe/compat-i915-headers/intel_step.h | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_step.h
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h +1 -0
@@ -20,6 +20,7 @@#include "i915_reg_defs.h" #include "i915_utils.h" #include "intel_gt_types.h" +#include "intel_step.h" #include "intel_uncore.h" #include "intel_runtime_pm.h" #include <linux/pm_runtime.h>
drivers/gpu/drm/xe/compat-i915-headers/intel_step.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2023 Intel Corporation +*/ + +#ifndef __INTEL_STEP_H__ +#define __INTEL_STEP_H__ + +#include "xe_device_types.h" +#include "xe_step.h" + +#define intel_display_step_name xe_display_step_name + +static inline +const char *xe_display_step_name (struct xe_device *xe) +{ +return xe_step_name (xe->info.step.display); +} + +#endif /* __INTEL_STEP_H__ */
Signature · 1 line
2.25.1
PATCH 5/6 drm/xe: Add i915_gpu_error.h compatibility header
In reply to Chaitanya Kumar BorahAdd empty definitions for i915_error_printf to get rid of ifdefs from intel_dmc code
--- .../gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 + .../xe/compat-i915-headers/i915_gpu_error.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gpu_error.h
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h +1 -0
@@ -17,6 +17,7 @@#include "xe_step.h" #include "i915_gem.h" #include "i915_gem_stolen.h" +#include "i915_gpu_error.h" #include "i915_reg_defs.h" #include "i915_utils.h" #include "intel_gt_types.h"
drivers/gpu/drm/xe/compat-i915-headers/i915_gpu_error.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2023 Intel Corporation +*/ + +#ifndef _I915_GPU_ERROR_H_ +#define _I915_GPU_ERROR_H_ + +struct drm_i915_error_state_buf ; + +__printf(2, 3) +static inline void +i915_error_printf (struct drm_i915_error_state_buf *e,const char *f, ...) +{ +} + +#endif +
Signature · 1 line
2.25.1
PATCH 6/6 drm/xe: Add intel_uc_fw.h compatibility header
In reply to Chaitanya Kumar BorahAdd definition for INTEL_UC_FIRMWARE_URL to maintain compatibility with intel_dmc code.
--- drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 1 + drivers/gpu/drm/xe/compat-i915-headers/intel_uc_fw.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_uc_fw.h
drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h +1 -0
@@ -22,6 +22,7 @@#include "i915_utils.h" #include "intel_gt_types.h" #include "intel_step.h" +#include "intel_uc_fw.h" #include "intel_uncore.h" #include "intel_runtime_pm.h" #include <linux/pm_runtime.h>
drivers/gpu/drm/xe/compat-i915-headers/intel_uc_fw.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2023 Intel Corporation +*/ + +#ifndef _INTEL_UC_FW_H_ +#define _INTEL_UC_FW_H_ + +#define INTEL_UC_FIRMWARE_URL "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915" + +#endif +
Signature · 1 line
2.25.1
Quoted 1 line · Chaitanya Kumar Borah
This series reverts hacky #ifdefs from
intel_dmc
Quoted 20 lines
Chaitanya Kumar Borah (6):
Revert "FIXME: drm/i915/dmc: xe way of getting at stepping" drm/i915: Add wrapper for getting display step fixup! drm/xe/display: Implement display support drm/xe: Addintel_step.hcompatibility header drm/xe: Addi915_gpu_error.hcompatibility header drm/xe: Addintel_uc_fw.hcompatibility headerdrivers/gpu/drm/i915/display/intel_dmc.c | 19 ++---------------- drivers/gpu/drm/i915/intel_step.c | 5 +++++ drivers/gpu/drm/i915/intel_step.h | 1 + .../gpu/drm/xe/compat-i915-headers/i915_drv.h | 4 +++- .../xe/compat-i915-headers/i915_gpu_error.h | 18 +++++++++++++++++ .../drm/xe/compat-i915-headers/intel_step.h | 20 +++++++++++++++++++ .../drm/xe/compat-i915-headers/intel_uc_fw.h | 12 +++++++++++ 7 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_gpu_error.h create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_step.h create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_uc_fw.h
Signature · 1 line
Jani Nikula, Intel
Patchwork
CI[Intel-xe] ✗ CI.Patch_applied: failure for Fix compatibility issue for intel_dmc
In reply to Chaitanya Kumar Borah== Series Details ==
== Series Details ==
Series: Fix compatibility issue for intel_dmc
URL : https://patchwork.freedesktop.org/series/124969/
State : failure
== Summary ==
=== Applying kernel patches on branch 'drm-xe-next' with base: ===
Base commit: 81cbfcc83 Revert "drm/i915/display: Fix a use-after-free when intel_edp_init_connector fails" === git am output follows ===
error: patch failed: drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:204
error: drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Revert "FIXME: drm/i915/dmc: xe way of getting at stepping"
Applying: drm/i915: Add wrapper for getting display step
Applying: fixup! drm/xe/display: Implement display support
Patch failed at 0003 fixup! drm/xe/display: Implement display support
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".