drm/i915/display: accept either i915 or display for feature tests
Use the generic __to_intel_display() to allow passing either struct drm_i915_private * or struct intel_display * to the feature test macros. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/bed78da39e6bd1587db4dab820602c55c63cdd6a.1713358679.git.jani.nikula@intel.com
This commit is contained in:
parent
98ebb7cf94
commit
6b5ee5720b
@ -8,6 +8,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "intel_display_conversion.h"
|
||||
#include "intel_display_limits.h"
|
||||
|
||||
struct drm_i915_private;
|
||||
@ -100,8 +101,8 @@ struct drm_printer;
|
||||
(IS_DISPLAY_IP_RANGE((__i915), (ipver), (ipver)) && \
|
||||
IS_DISPLAY_STEP((__i915), (from), (until)))
|
||||
|
||||
#define DISPLAY_INFO(i915) ((i915)->display.info.__device_info)
|
||||
#define DISPLAY_RUNTIME_INFO(i915) (&(i915)->display.info.__runtime_info)
|
||||
#define DISPLAY_INFO(i915) (__to_intel_display(i915)->info.__device_info)
|
||||
#define DISPLAY_RUNTIME_INFO(i915) (&__to_intel_display(i915)->info.__runtime_info)
|
||||
|
||||
#define DISPLAY_VER(i915) (DISPLAY_RUNTIME_INFO(i915)->ip.ver)
|
||||
#define DISPLAY_VER_FULL(i915) IP_VER(DISPLAY_RUNTIME_INFO(i915)->ip.ver, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user