Commit fa509a33 authored by Jani Nikula's avatar Jani Nikula

drm/xe/display: remove intel_display_step_name() to simplify

The intel_display_step_name() is an unnecessary extra
indirection. Simplify by just adding a macro to map intel_step_name() to
xe_step_name().

We'll need to temporarily add a compat INTEL_DISPLAY_STEP() for this.
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cbea7def331cc9d2438da49ae344b9987f27cd12.1724180287.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 453afb1a
...@@ -391,7 +391,7 @@ static const struct stepping_info * ...@@ -391,7 +391,7 @@ static const struct stepping_info *
intel_get_stepping_info(struct drm_i915_private *i915, intel_get_stepping_info(struct drm_i915_private *i915,
struct stepping_info *si) struct stepping_info *si)
{ {
const char *step_name = intel_display_step_name(i915); const char *step_name = intel_step_name(INTEL_DISPLAY_STEP(i915));
si->stepping = step_name[0]; si->stepping = step_name[0];
si->substepping = step_name[1]; si->substepping = step_name[1];
......
...@@ -275,8 +275,3 @@ const char *intel_step_name(enum intel_step step) ...@@ -275,8 +275,3 @@ const char *intel_step_name(enum intel_step step)
return "**"; return "**";
} }
} }
const char *intel_display_step_name(struct drm_i915_private *i915)
{
return intel_step_name(RUNTIME_INFO(i915)->step.display_step);
}
...@@ -78,6 +78,5 @@ enum intel_step { ...@@ -78,6 +78,5 @@ enum intel_step {
void intel_step_init(struct drm_i915_private *i915); void intel_step_init(struct drm_i915_private *i915);
const char *intel_step_name(enum intel_step step); const char *intel_step_name(enum intel_step step);
const char *intel_display_step_name(struct drm_i915_private *i915);
#endif /* __INTEL_STEP_H__ */ #endif /* __INTEL_STEP_H__ */
...@@ -82,6 +82,8 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev) ...@@ -82,6 +82,8 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
#define HAS_GMD_ID(xe) GRAPHICS_VERx100(xe) >= 1270 #define HAS_GMD_ID(xe) GRAPHICS_VERx100(xe) >= 1270
#define INTEL_DISPLAY_STEP(xe) ((xe)->info.step.display)
/* Workarounds not handled yet */ /* Workarounds not handled yet */
#define IS_DISPLAY_STEP(xe, first, last) ({u8 __step = (xe)->info.step.display; first <= __step && __step < last; }) #define IS_DISPLAY_STEP(xe, first, last) ({u8 __step = (xe)->info.step.display; first <= __step && __step < last; })
......
...@@ -6,15 +6,8 @@ ...@@ -6,15 +6,8 @@
#ifndef __INTEL_STEP_H__ #ifndef __INTEL_STEP_H__
#define __INTEL_STEP_H__ #define __INTEL_STEP_H__
#include "xe_device_types.h"
#include "xe_step.h" #include "xe_step.h"
#define intel_display_step_name xe_display_step_name #define intel_step_name xe_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__ */ #endif /* __INTEL_STEP_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment