Skip to content

Commit

Permalink
drm/i915: significantly reduce the use of <drm/i915_drm.h>
Browse files Browse the repository at this point in the history
The #include has been splattered all over the place, but there are
precious few places, all .c files, that actually need it.

v2: remove leftover double newlines

Reviewed-by: Chris Wilson <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
jnikula committed Feb 27, 2020
1 parent 0b3a4dd commit 83d2bdb
Show file tree
Hide file tree
Showing 48 changed files with 9 additions and 64 deletions.
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/

#include <drm/drm_dp_helper.h>
#include <drm/i915_drm.h>

#include "display/intel_display.h"
#include "display/intel_display_types.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_bios.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

#include <linux/types.h>

#include <drm/i915_drm.h>

struct drm_i915_private;
struct intel_crtc_state;
struct intel_encoder;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/drm_probe_helper.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_connector.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#ifndef __INTEL_DDI_H__
#define __INTEL_DDI_H__

#include <drm/i915_drm.h>

#include "intel_display.h"

struct drm_connector_state;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h>
#include <drm/i915_drm.h>

#include "display/intel_crt.h"
#include "display/intel_ddi.h"
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/display/intel_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#define _INTEL_DISPLAY_H_

#include <drm/drm_util.h>
#include <drm/i915_drm.h>

enum link_m_n_set;
struct dpll;
Expand All @@ -40,13 +39,15 @@ struct drm_framebuffer;
struct drm_i915_error_state_buf;
struct drm_i915_gem_object;
struct drm_i915_private;
struct drm_mode_fb_cmd2;
struct drm_modeset_acquire_ctx;
struct drm_plane;
struct drm_plane_state;
struct i915_ggtt_view;
struct intel_atomic_state;
struct intel_crtc;
struct intel_crtc_state;
struct intel_crtc_state;
struct intel_digital_port;
struct intel_dp;
struct intel_encoder;
Expand All @@ -55,7 +56,6 @@ struct intel_plane;
struct intel_plane_state;
struct intel_remapped_info;
struct intel_rotation_info;
struct intel_crtc_state;

enum i915_gpio {
GPIOA,
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_display_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h>
#include <drm/drm_vblank.h>
#include <drm/i915_drm.h>
#include <drm/i915_mei_hdcp_interface.h>
#include <media/cec-notifier.h>

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <drm/drm_edid.h>
#include <drm/drm_hdcp.h>
#include <drm/drm_probe_helper.h>
#include <drm/i915_drm.h>

#include "i915_debugfs.h"
#include "i915_drv.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_dp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include <linux/types.h>

#include <drm/i915_drm.h>

#include "i915_reg.h"

enum pipe;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_dsi_vbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/i915_drm.h>

#include <video/mipi_display.h>

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_dvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_connector.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <drm/drm_crtc.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_display_types.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_gmbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/i2c.h>

#include <drm/drm_hdcp.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_display_types.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_hdcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include <linux/types.h>

#include <drm/i915_drm.h>

struct drm_connector;
struct drm_connector_state;
struct drm_i915_private;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <drm/drm_edid.h>
#include <drm/drm_hdcp.h>
#include <drm/drm_scdc_helper.h>
#include <drm/i915_drm.h>
#include <drm/intel_lpe_audio.h>

#include "i915_debugfs.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#include <linux/hdmi.h>
#include <linux/types.h>

#include <drm/i915_drm.h>

#include "i915_reg.h"

struct drm_connector;
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

#include <linux/kernel.h>

#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_display_types.h"
#include "intel_hotplug.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_hotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include <linux/types.h>

#include <drm/i915_drm.h>

struct drm_i915_private;
struct intel_connector;
struct intel_encoder;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_atomic.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_opregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include <linux/firmware.h>
#include <acpi/video.h>

#include <drm/i915_drm.h>

#include "display/intel_panel.h"

#include "i915_drv.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/

#include <drm/drm_fourcc.h>
#include <drm/i915_drm.h>

#include "gem/i915_gem_pm.h"
#include "gt/intel_ring.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_atomic.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_sdvo.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include <linux/types.h>

#include <drm/i915_drm.h>

#include "i915_reg.h"

struct drm_i915_private;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_sprite.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <drm/drm_fourcc.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_rect.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "i915_trace.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_connector.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/display/intel_vdsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Manasi Navare <[email protected]>
*/

#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_display_types.h"
#include "intel_dsi.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gem/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
#include <linux/log2.h>
#include <linux/nospec.h>

#include <drm/i915_drm.h>

#include "gt/gen6_ppgtt.h"
#include "gt/intel_context.h"
#include "gt/intel_context_param.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <linux/uaccess.h>

#include <drm/drm_syncobj.h>
#include <drm/i915_drm.h>

#include "display/intel_frontbuffer.h"

Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gem/i915_gem_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#include <linux/slab.h>
#include <linux/swiotlb.h>

#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "i915_gem.h"
#include "i915_gem_object.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gem/i915_gem_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include <drm/drm_file.h>
#include <drm/drm_device.h>

#include <drm/i915_drm.h>

#include "display/intel_frontbuffer.h"
#include "i915_gem_object_types.h"
#include "i915_gem_gtt.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/pci.h>
#include <linux/dma-buf.h>
#include <linux/vmalloc.h>
#include <drm/i915_drm.h>

#include "i915_trace.h"

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/gem/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <linux/string.h>
#include <linux/bitops.h>
#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "i915_gem.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gem/i915_gem_userptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include <linux/swap.h>
#include <linux/sched/mm.h>

#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "i915_gem_ioctls.h"
#include "i915_gem_object.h"
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_ggtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <asm/set_memory.h>
#include <asm/smp.h>

#include <drm/i915_drm.h>

#include "intel_gt.h"
#include "i915_drv.h"
#include "i915_scatterlist.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/gt/intel_ring_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

#include <linux/log2.h>

#include <drm/i915_drm.h>

#include "gem/i915_gem_context.h"

#include "gen6_ppgtt.h"
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_rps.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright © 2019 Intel Corporation
*/

#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "intel_gt.h"
#include "intel_gt_irq.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <drm/drm_ioctl.h>
#include <drm/drm_irq.h>
#include <drm/drm_probe_helper.h>
#include <drm/i915_drm.h>

#include "display/intel_acpi.h"
#include "display/intel_audio.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/

#include <drm/drm_vma_manager.h>
#include <drm/i915_drm.h>
#include <linux/dma-fence-array.h>
#include <linux/kthread.h>
#include <linux/dma-resv.h>
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/i915_gem_evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
*
*/

#include <drm/i915_drm.h>

#include "gem/i915_gem_context.h"
#include "gt/intel_gt_requests.h"

Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/i915_gem_fence_reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
* IN THE SOFTWARE.
*/

#include <drm/i915_drm.h>

#include "i915_drv.h"
#include "i915_scatterlist.h"
#include "i915_vgpu.h"
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/i915_gem_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <asm/set_memory.h>
#include <asm/smp.h>

#include <drm/i915_drm.h>

#include "display/intel_frontbuffer.h"
#include "gt/intel_gt.h"
#include "gt/intel_gt_requests.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/i915_ioc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*/
#include <linux/compat.h>

#include <drm/i915_drm.h>
#include <drm/drm_ioctl.h>
#include "i915_drv.h"

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

#include <drm/drm_drv.h>
#include <drm/drm_irq.h>
#include <drm/i915_drm.h>

#include "display/intel_display_types.h"
#include "display/intel_fifo_underrun.h"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/vga_switcheroo.h>

#include <drm/drm_drv.h>
#include <drm/i915_pciids.h>

#include "display/intel_fbdev.h"

Expand Down
Loading

0 comments on commit 83d2bdb

Please sign in to comment.