drm/i915/display: drop __to_intel_display() usage
All the places that use __to_intel_display() now get passed a struct intel_display pointer, and the transitional adaptation macro has served its purpose. Remove the macro. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://lore.kernel.org/r/d2c4a5aab3d69cec6f0640eed157a97531bd72f2.1754499175.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>pull/1354/merge
parent
7e75709237
commit
ada8faab63
|
|
@ -4,7 +4,7 @@
|
|||
#include "i915_drv.h"
|
||||
#include "intel_display_conversion.h"
|
||||
|
||||
struct intel_display *__i915_to_display(struct drm_i915_private *i915)
|
||||
static struct intel_display *__i915_to_display(struct drm_i915_private *i915)
|
||||
{
|
||||
return i915->display;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,20 +9,8 @@
|
|||
#define __INTEL_DISPLAY_CONVERSION__
|
||||
|
||||
struct drm_device;
|
||||
struct drm_i915_private;
|
||||
struct intel_display;
|
||||
|
||||
struct intel_display *__i915_to_display(struct drm_i915_private *i915);
|
||||
struct intel_display *__drm_to_display(struct drm_device *drm);
|
||||
/*
|
||||
* Transitional macro to optionally convert struct drm_i915_private * to struct
|
||||
* intel_display *, also accepting the latter.
|
||||
*/
|
||||
#define __to_intel_display(p) \
|
||||
_Generic(p, \
|
||||
const struct drm_i915_private *: __i915_to_display((struct drm_i915_private *)(p)), \
|
||||
struct drm_i915_private *: __i915_to_display((struct drm_i915_private *)(p)), \
|
||||
const struct intel_display *: (p), \
|
||||
struct intel_display *: (p))
|
||||
|
||||
#endif /* __INTEL_DISPLAY_CONVERSION__ */
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include <linux/bitops.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "intel_display_conversion.h"
|
||||
#include "intel_display_limits.h"
|
||||
|
||||
struct drm_printer;
|
||||
|
|
@ -224,8 +223,8 @@ struct intel_display_platforms {
|
|||
(IS_DISPLAY_VERx100((__display), (ipver), (ipver)) && \
|
||||
IS_DISPLAY_STEP((__display), (from), (until)))
|
||||
|
||||
#define DISPLAY_INFO(__display) (__to_intel_display(__display)->info.__device_info)
|
||||
#define DISPLAY_RUNTIME_INFO(__display) (&__to_intel_display(__display)->info.__runtime_info)
|
||||
#define DISPLAY_INFO(__display) ((__display)->info.__device_info)
|
||||
#define DISPLAY_RUNTIME_INFO(__display) (&(__display)->info.__runtime_info)
|
||||
|
||||
#define DISPLAY_VER(__display) (DISPLAY_RUNTIME_INFO(__display)->ip.ver)
|
||||
#define DISPLAY_VERx100(__display) (DISPLAY_RUNTIME_INFO(__display)->ip.ver * 100 + \
|
||||
|
|
@ -236,7 +235,7 @@ struct intel_display_platforms {
|
|||
#define INTEL_DISPLAY_STEP(__display) (DISPLAY_RUNTIME_INFO(__display)->step)
|
||||
|
||||
#define IS_DISPLAY_STEP(__display, since, until) \
|
||||
(drm_WARN_ON(__to_intel_display(__display)->drm, INTEL_DISPLAY_STEP(__display) == STEP_NONE), \
|
||||
(drm_WARN_ON((__display)->drm, INTEL_DISPLAY_STEP(__display) == STEP_NONE), \
|
||||
INTEL_DISPLAY_STEP(__display) >= (since) && INTEL_DISPLAY_STEP(__display) < (until))
|
||||
|
||||
#define ARLS_HOST_BRIDGE_PCI_ID1 0x7D1C
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
#ifndef __INTEL_PCH__
|
||||
#define __INTEL_PCH__
|
||||
|
||||
#include "intel_display_conversion.h"
|
||||
|
||||
struct intel_display;
|
||||
|
||||
/*
|
||||
|
|
@ -36,7 +34,7 @@ enum intel_pch {
|
|||
PCH_LNL,
|
||||
};
|
||||
|
||||
#define INTEL_PCH_TYPE(_display) (__to_intel_display(_display)->pch_type)
|
||||
#define INTEL_PCH_TYPE(_display) ((_display)->pch_type)
|
||||
#define HAS_PCH_DG2(display) (INTEL_PCH_TYPE(display) == PCH_DG2)
|
||||
#define HAS_PCH_ADP(display) (INTEL_PCH_TYPE(display) == PCH_ADP)
|
||||
#define HAS_PCH_DG1(display) (INTEL_PCH_TYPE(display) == PCH_DG1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue