mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
drm/i915/uncore: add to_intel_uncore() and use it
Add to_intel_uncore() function to avoid the inclusion of i915_drv.h from intel_de.h. This reveals a number of implicit dependencies on i915_drv.h that need to be added. For now, to_intel_uncore() can be an inline function, with all the includes in compat intel_uncore.h, as long as i915_drv.h isn't included. The implicit dependencies on i915_drv.h is a problem in display code, but the same is not true for xe_device.h etc. Reviewed-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/377e2b400d126776224fc49874ed9cb03ac3123c.1732104170.git.jani.nikula@intel.com
This commit is contained in:
parent
adceb41688
commit
399f7b6716
|
|
@ -8,6 +8,7 @@
|
|||
#include <linux/string_helpers.h>
|
||||
|
||||
#include "g4x_dp.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_audio.h"
|
||||
#include "intel_backlight.h"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "g4x_hdmi.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_audio.h"
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "i9xx_plane.h"
|
||||
#include "i9xx_plane_regs.h"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <drm/drm_mipi_dsi.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "icl_dsi.h"
|
||||
#include "icl_dsi_regs.h"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "intel_alpm.h"
|
||||
#include "intel_crtc.h"
|
||||
#include "intel_de.h"
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <acpi/video.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_backlight.h"
|
||||
#include "intel_backlight_regs.h"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "soc/intel_dram.h"
|
||||
|
||||
#include "hsw_ips.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_atomic_plane.h"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i9xx_plane_regs.h"
|
||||
#include "intel_color.h"
|
||||
#include "intel_color_regs.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright © 2018 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_combo_phy.h"
|
||||
#include "intel_combo_phy_regs.h"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_atomic_plane.h"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <linux/log2.h>
|
||||
#include <linux/math64.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_cx0_phy.h"
|
||||
#include "intel_cx0_phy_regs.h"
|
||||
|
|
|
|||
|
|
@ -6,14 +6,16 @@
|
|||
#ifndef __INTEL_DE_H__
|
||||
#define __INTEL_DE_H__
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "intel_display_conversion.h"
|
||||
#include "intel_display_core.h"
|
||||
#include "intel_dmc_wl.h"
|
||||
#include "intel_dsb.h"
|
||||
#include "intel_uncore.h"
|
||||
#include "intel_uncore_trace.h"
|
||||
|
||||
static inline struct intel_uncore *__to_uncore(struct intel_display *display)
|
||||
{
|
||||
return &to_i915(display->drm)->uncore;
|
||||
return to_intel_uncore(display->drm);
|
||||
}
|
||||
|
||||
static inline u32
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <drm/drm_fourcc.h>
|
||||
|
||||
#include "hsw_ips.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_irq.h"
|
||||
#include "i915_reg.h"
|
||||
#include "i9xx_wm_regs.h"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_dmc.h"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <drm/display/drm_hdcp_helper.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_ddi.h"
|
||||
#include "intel_de.h"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "bxt_dpio_phy_regs.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_ddi.h"
|
||||
#include "intel_ddi_buf_trans.h"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/string_helpers.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_crtc.h"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/string_helpers.h>
|
||||
|
||||
#include "bxt_dpio_phy_regs.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_types.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright © 2023 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_types.h"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <drm/drm_fixed.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_crtc.h"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_edid.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_types.h"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
|
||||
#include "g4x_dp.h"
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_crt.h"
|
||||
#include "intel_crt_regs.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright © 2021 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_types.h"
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_irq.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_atomic.h"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <linux/math.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_ddi.h"
|
||||
#include "intel_ddi_buf_trans.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright © 2020 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "intel_de.h"
|
||||
#include "intel_display_types.h"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@
|
|||
#define FORCEWAKE_ACK_TIMEOUT_MS 50
|
||||
#define GT_FIFO_TIMEOUT_MS 10
|
||||
|
||||
struct intel_uncore *to_intel_uncore(struct drm_device *drm)
|
||||
{
|
||||
return &to_i915(drm)->uncore;
|
||||
}
|
||||
|
||||
#define __raw_posting_read(...) ((void)__raw_uncore_read32(__VA_ARGS__))
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -501,6 +501,8 @@ static inline void __iomem *intel_uncore_regs(struct intel_uncore *uncore)
|
|||
return uncore->regs;
|
||||
}
|
||||
|
||||
struct intel_uncore *to_intel_uncore(struct drm_device *drm);
|
||||
|
||||
/*
|
||||
* The raw_reg_{read,write} macros are intended as a micro-optimization for
|
||||
* interrupt handlers so that the pointer indirection on uncore->regs can
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@
|
|||
#include "xe_device_types.h"
|
||||
#include "xe_mmio.h"
|
||||
|
||||
static inline struct intel_uncore *to_intel_uncore(struct drm_device *drm)
|
||||
{
|
||||
return &to_xe_device(drm)->uncore;
|
||||
}
|
||||
|
||||
static inline struct xe_mmio *__compat_uncore_to_mmio(struct intel_uncore *uncore)
|
||||
{
|
||||
struct xe_device *xe = container_of(uncore, struct xe_device, uncore);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user