All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h
@ 2019-05-26 17:35 Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 1/7] drm: make drm/drm_auth.h self contained Sam Ravnborg
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, intel-gfx, David Airlie, Sean Paul

While removing use of drmP.h from files in drm/* I
noticed that I had to add the same include files due to
dependencies in the header files.

It is better to let the header files be self-contained and
let the users pull in only the additional headers files required.
So I went ahead and made the relevant header files self-contained.
(I did not check if this made any includes redundant in some files,
I do not have tooling in place to do so).

Daniel suggested to add support for testing that they stay
self contained.
Jani Nikula has sent a patch to kbuild to make this part of the
kbuild machinery. I have used it locally and as soon as it
lands in kbuild I will start using it for drm.
We could have duplicated the infrastructure now but that seemed
too much code chrunch.

This patchset include the actual removal of drmP.h as one big patch.
This is build tested on alpha (always interesting), arm, arm64, x86 etc.

For all files touched the following was done:
- include files divided up in blocks in following order:
    	linux/*
	video/*
	drm/*
	""
- within each block the include files are sorted alphabetically

v2:
- use same ordering af blocks
- move includes down below license text
- added patch with actual drmP.h removal
- reworded some subjects to make them more descriptive
- fixed a few spelling erros in changelogs (but a few may remain)

        Sam


Sam Ravnborg (7):
      drm: make drm/drm_auth.h self contained
      drm: make drm/drm_legacy.h self-contained
      drm: make drm_crtc_internal.h self-contained
      drm: make drm_internal.h self-contained
      drm: make drm_legacy.h self-contained
      drm: make drm_trace.h self-contained
      drm: drop use of drmP.h in drm/*

 drivers/gpu/drm/ati_pcigart.c                |  5 ++++-
 drivers/gpu/drm/drm_agpsupport.c             | 11 +++++++++--
 drivers/gpu/drm/drm_atomic.c                 |  9 +++++++--
 drivers/gpu/drm/drm_atomic_helper.c          | 11 +++++++----
 drivers/gpu/drm/drm_atomic_state_helper.c    |  7 ++++---
 drivers/gpu/drm/drm_auth.c                   | 10 ++++++++--
 drivers/gpu/drm/drm_blend.c                  |  9 ++++++---
 drivers/gpu/drm/drm_bufs.c                   | 21 ++++++++++++++++-----
 drivers/gpu/drm/drm_client.c                 |  2 +-
 drivers/gpu/drm/drm_color_mgmt.c             |  8 ++++++--
 drivers/gpu/drm/drm_context.c                |  8 +++++++-
 drivers/gpu/drm/drm_crtc_helper.c            | 14 ++++++++------
 drivers/gpu/drm/drm_crtc_internal.h          | 24 ++++++++++++++++++++----
 drivers/gpu/drm/drm_debugfs.c                | 13 ++++++++-----
 drivers/gpu/drm/drm_debugfs_crc.c            |  9 ++++++++-
 drivers/gpu/drm/drm_dma.c                    |  6 +++++-
 drivers/gpu/drm/drm_drv.c                    |  9 ++++++---
 drivers/gpu/drm/drm_dumb_buffers.c           |  4 +++-
 drivers/gpu/drm/drm_encoder.c                |  4 +++-
 drivers/gpu/drm/drm_fb_helper.c              | 19 ++++++++++++-------
 drivers/gpu/drm/drm_file.c                   | 11 +++++++----
 drivers/gpu/drm/drm_flip_work.c              |  6 ++++--
 drivers/gpu/drm/drm_fourcc.c                 |  2 +-
 drivers/gpu/drm/drm_framebuffer.c            | 13 +++++++++----
 drivers/gpu/drm/drm_gem.c                    |  8 ++++++--
 drivers/gpu/drm/drm_gem_cma_helper.c         | 11 ++++++-----
 drivers/gpu/drm/drm_gem_framebuffer_helper.c |  1 -
 drivers/gpu/drm/drm_hashtab.c                | 10 +++++++---
 drivers/gpu/drm/drm_internal.h               | 10 +++++++++-
 drivers/gpu/drm/drm_ioc32.c                  |  9 ++++++---
 drivers/gpu/drm/drm_ioctl.c                  | 22 ++++++++++++++--------
 drivers/gpu/drm/drm_irq.c                    | 13 +++++++++----
 drivers/gpu/drm/drm_kms_helper_common.c      |  3 ++-
 drivers/gpu/drm/drm_lease.c                  | 15 ++++++++++-----
 drivers/gpu/drm/drm_legacy.h                 |  4 ++++
 drivers/gpu/drm/drm_legacy_misc.c            |  7 ++++++-
 drivers/gpu/drm/drm_lock.c                   |  8 ++++++--
 drivers/gpu/drm/drm_memory.c                 |  9 +++++++--
 drivers/gpu/drm/drm_mm.c                     |  9 +++++----
 drivers/gpu/drm/drm_mode_config.c            |  6 +++++-
 drivers/gpu/drm/drm_mode_object.c            |  9 +++++++--
 drivers/gpu/drm/drm_modes.c                  |  7 +++++--
 drivers/gpu/drm/drm_modeset_lock.c           |  2 +-
 drivers/gpu/drm/drm_of.c                     |  5 +++--
 drivers/gpu/drm/drm_pci.c                    | 11 ++++++++---
 drivers/gpu/drm/drm_plane_helper.c           |  9 +++++----
 drivers/gpu/drm/drm_prime.c                  |  7 +++++--
 drivers/gpu/drm/drm_print.c                  |  7 ++++++-
 drivers/gpu/drm/drm_probe_helper.c           |  7 ++++---
 drivers/gpu/drm/drm_property.c               |  7 ++++++-
 drivers/gpu/drm/drm_rect.c                   |  4 +++-
 drivers/gpu/drm/drm_scatter.c                |  9 +++++++--
 drivers/gpu/drm/drm_scdc_helper.c            |  2 +-
 drivers/gpu/drm/drm_simple_kms_helper.c      |  5 +++--
 drivers/gpu/drm/drm_syncobj.c                | 13 +++++++++----
 drivers/gpu/drm/drm_sysfs.c                  | 15 +++++++++++----
 drivers/gpu/drm/drm_trace.h                  |  2 ++
 drivers/gpu/drm/drm_trace_points.c           |  3 ++-
 drivers/gpu/drm/drm_vblank.c                 | 12 +++++++++---
 drivers/gpu/drm/drm_vm.c                     | 14 +++++++++++++-
 drivers/gpu/drm/drm_vma_manager.c            |  6 +++---
 drivers/gpu/drm/drm_vram_mm_helper.c         |  4 +++-
 drivers/gpu/drm/drm_writeback.c              |  6 ++++--
 include/drm/drm_auth.h                       | 11 +++++++++--
 include/drm/drm_legacy.h                     | 12 ++++++------
 65 files changed, 406 insertions(+), 163 deletions(-)


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/7] drm: make drm/drm_auth.h self contained
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-28 12:54   ` Jani Nikula
  2019-05-26 17:35 ` [PATCH v2 2/7] drm: make drm/drm_legacy.h self-contained Sam Ravnborg
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie

Do not require users of include/drm/drm_auth.h to include
other files just to let it build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 include/drm/drm_auth.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h
index 871008118bab..6bf8b2b78991 100644
--- a/include/drm/drm_auth.h
+++ b/include/drm/drm_auth.h
@@ -1,3 +1,6 @@
+#ifndef _DRM_AUTH_H_
+#define _DRM_AUTH_H_
+
 /*
  * Internal Header for the Direct Rendering Manager
  *
@@ -25,8 +28,12 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef _DRM_AUTH_H_
-#define _DRM_AUTH_H_
+#include <linux/idr.h>
+#include <linux/kref.h>
+#include <linux/wait.h>
+
+struct drm_file;
+struct drm_hw_lock;
 
 /*
  * Legacy DRI1 locking data structure. Only here instead of in drm_legacy.h for
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 2/7] drm: make drm/drm_legacy.h self-contained
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 1/7] drm: make drm/drm_auth.h self contained Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 3/7] drm: make drm_crtc_internal.h self-contained Sam Ravnborg
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie, Sean Paul

Do not require users of include/drm/drm_legacy.h to
include other files just to let it build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 include/drm/drm_legacy.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
index 2182a56ac421..58dc0c04bf99 100644
--- a/include/drm/drm_legacy.h
+++ b/include/drm/drm_legacy.h
@@ -1,11 +1,5 @@
 #ifndef __DRM_DRM_LEGACY_H__
 #define __DRM_DRM_LEGACY_H__
-
-#include <drm/drm_auth.h>
-#include <drm/drm_hashtab.h>
-
-struct drm_device;
-
 /*
  * Legacy driver interfaces for the Direct Rendering Manager
  *
@@ -39,6 +33,12 @@ struct drm_device;
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <drm/drm.h>
+#include <drm/drm_auth.h>
+#include <drm/drm_hashtab.h>
+
+struct drm_device;
+struct file;
 
 /*
  * Legacy Support for palateontologic DRM drivers
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 3/7] drm: make drm_crtc_internal.h self-contained
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 1/7] drm: make drm/drm_auth.h self contained Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 2/7] drm: make drm/drm_legacy.h self-contained Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 4/7] drm: make drm_internal.h self-contained Sam Ravnborg
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie, Sean Paul

Do not require users of drm_crtc_internal.h to include other
files just to let it build

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/drm_crtc_internal.h | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
index 0719a235d6cc..c78a44fad13d 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -31,14 +31,30 @@
  * and are not exported to drivers.
  */
 
-enum drm_mode_status;
+#include <linux/types.h>
+
+enum drm_color_encoding;
+enum drm_color_range;
 enum drm_connector_force;
+enum drm_mode_status;
 
-struct drm_display_mode;
-struct work_struct;
-struct drm_connector;
+struct drm_atomic_state;
 struct drm_bridge;
+struct drm_connector;
+struct drm_crtc;
+struct drm_device;
+struct drm_display_mode;
+struct drm_file;
+struct drm_framebuffer;
+struct drm_mode_create_dumb;
+struct drm_mode_fb_cmd2;
+struct drm_mode_fb_cmd;
+struct drm_mode_object;
+struct drm_plane;
+struct drm_property;
 struct edid;
+struct kref;
+struct work_struct;
 
 /* drm_crtc.c */
 int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 4/7] drm: make drm_internal.h self-contained
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (2 preceding siblings ...)
  2019-05-26 17:35 ` [PATCH v2 3/7] drm: make drm_crtc_internal.h self-contained Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 5/7] drm: make drm_legacy.h self-contained Sam Ravnborg
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie, Sean Paul

Do not require users of drm_internal.h to include other
files just to let it build

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/drm_internal.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index e6281d9f9c87..76bd4b81c5b1 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -28,8 +28,16 @@
 
 #define DRM_IF_VERSION(maj, min) (maj << 16 | min)
 
-struct drm_prime_file_private;
+struct dentry;
 struct dma_buf;
+struct drm_connector;
+struct drm_crtc;
+struct drm_framebuffer;
+struct drm_gem_object;
+struct drm_master;
+struct drm_minor;
+struct drm_prime_file_private;
+struct drm_printer;
 
 /* drm_file.c */
 extern struct mutex drm_global_mutex;
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 5/7] drm: make drm_legacy.h self-contained
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (3 preceding siblings ...)
  2019-05-26 17:35 ` [PATCH v2 4/7] drm: make drm_internal.h self-contained Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 6/7] drm: make drm_trace.h self-contained Sam Ravnborg
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie

Do not require users of drm_legacy.h to include other
files just to let it build

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/drm_legacy.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h
index 013ccdfd90be..1be3ea320474 100644
--- a/drivers/gpu/drm/drm_legacy.h
+++ b/drivers/gpu/drm/drm_legacy.h
@@ -29,11 +29,15 @@
  * drivers use them, and removing them are API breaks.
  */
 #include <linux/list.h>
+
+#include <drm/drm.h>
+#include <drm/drm_device.h>
 #include <drm/drm_legacy.h>
 
 struct agp_memory;
 struct drm_device;
 struct drm_file;
+struct drm_buf_desc;
 
 /*
  * Generic DRM Contexts
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 6/7] drm: make drm_trace.h self-contained
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (4 preceding siblings ...)
  2019-05-26 17:35 ` [PATCH v2 5/7] drm: make drm_legacy.h self-contained Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-26 17:35 ` [PATCH v2 7/7] drm: drop use of drmP.h in drm/* Sam Ravnborg
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie

Do not require users of drm_trace.h to include other
files just to let it build

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/drm_trace.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_trace.h b/drivers/gpu/drm/drm_trace.h
index baccc63db106..471eb927474b 100644
--- a/drivers/gpu/drm/drm_trace.h
+++ b/drivers/gpu/drm/drm_trace.h
@@ -6,6 +6,8 @@
 #include <linux/types.h>
 #include <linux/tracepoint.h>
 
+struct drm_file;
+
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM drm
 #define TRACE_INCLUDE_FILE drm_trace
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 7/7] drm: drop use of drmP.h in drm/*
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (5 preceding siblings ...)
  2019-05-26 17:35 ` [PATCH v2 6/7] drm: make drm_trace.h self-contained Sam Ravnborg
@ 2019-05-26 17:35 ` Sam Ravnborg
  2019-05-26 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for drm: make headers self-contained and drop drmP.h Patchwork
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-26 17:35 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, Sam Ravnborg, intel-gfx, David Airlie

The use of the drmP.h header file is deprecated.
Remove use from all files in drm/*
so people do not look there and follow a bad example.

Build tested allyesconfig,allmodconfig on x86, arm etc.
Including alpha that is as always more challenging than
the rest.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/ati_pcigart.c                |  5 ++++-
 drivers/gpu/drm/drm_agpsupport.c             | 11 ++++++++--
 drivers/gpu/drm/drm_atomic.c                 |  9 ++++++--
 drivers/gpu/drm/drm_atomic_helper.c          | 11 ++++++----
 drivers/gpu/drm/drm_atomic_state_helper.c    |  7 ++++---
 drivers/gpu/drm/drm_auth.c                   | 10 +++++++--
 drivers/gpu/drm/drm_blend.c                  |  9 +++++---
 drivers/gpu/drm/drm_bufs.c                   | 21 ++++++++++++++-----
 drivers/gpu/drm/drm_client.c                 |  2 +-
 drivers/gpu/drm/drm_color_mgmt.c             |  8 +++++--
 drivers/gpu/drm/drm_context.c                |  8 ++++++-
 drivers/gpu/drm/drm_crtc_helper.c            | 14 +++++++------
 drivers/gpu/drm/drm_debugfs.c                | 13 +++++++-----
 drivers/gpu/drm/drm_debugfs_crc.c            |  9 +++++++-
 drivers/gpu/drm/drm_dma.c                    |  6 +++++-
 drivers/gpu/drm/drm_drv.c                    |  9 +++++---
 drivers/gpu/drm/drm_dumb_buffers.c           |  4 +++-
 drivers/gpu/drm/drm_encoder.c                |  4 +++-
 drivers/gpu/drm/drm_fb_helper.c              | 19 ++++++++++-------
 drivers/gpu/drm/drm_file.c                   | 11 ++++++----
 drivers/gpu/drm/drm_flip_work.c              |  6 ++++--
 drivers/gpu/drm/drm_fourcc.c                 |  2 +-
 drivers/gpu/drm/drm_framebuffer.c            | 13 ++++++++----
 drivers/gpu/drm/drm_gem.c                    |  8 +++++--
 drivers/gpu/drm/drm_gem_cma_helper.c         | 11 +++++-----
 drivers/gpu/drm/drm_gem_framebuffer_helper.c |  1 -
 drivers/gpu/drm/drm_hashtab.c                | 10 ++++++---
 drivers/gpu/drm/drm_ioc32.c                  |  9 +++++---
 drivers/gpu/drm/drm_ioctl.c                  | 22 +++++++++++++-------
 drivers/gpu/drm/drm_irq.c                    | 13 ++++++++----
 drivers/gpu/drm/drm_kms_helper_common.c      |  3 ++-
 drivers/gpu/drm/drm_lease.c                  | 15 ++++++++-----
 drivers/gpu/drm/drm_legacy_misc.c            |  7 ++++++-
 drivers/gpu/drm/drm_lock.c                   |  8 +++++--
 drivers/gpu/drm/drm_memory.c                 |  9 ++++++--
 drivers/gpu/drm/drm_mm.c                     |  9 ++++----
 drivers/gpu/drm/drm_mode_config.c            |  6 +++++-
 drivers/gpu/drm/drm_mode_object.c            |  9 ++++++--
 drivers/gpu/drm/drm_modes.c                  |  7 +++++--
 drivers/gpu/drm/drm_modeset_lock.c           |  2 +-
 drivers/gpu/drm/drm_of.c                     |  5 +++--
 drivers/gpu/drm/drm_pci.c                    | 11 +++++++---
 drivers/gpu/drm/drm_plane_helper.c           |  9 ++++----
 drivers/gpu/drm/drm_prime.c                  |  7 +++++--
 drivers/gpu/drm/drm_print.c                  |  7 ++++++-
 drivers/gpu/drm/drm_probe_helper.c           |  7 ++++---
 drivers/gpu/drm/drm_property.c               |  7 ++++++-
 drivers/gpu/drm/drm_rect.c                   |  4 +++-
 drivers/gpu/drm/drm_scatter.c                |  9 ++++++--
 drivers/gpu/drm/drm_scdc_helper.c            |  2 +-
 drivers/gpu/drm/drm_simple_kms_helper.c      |  5 +++--
 drivers/gpu/drm/drm_syncobj.c                | 13 ++++++++----
 drivers/gpu/drm/drm_sysfs.c                  | 15 +++++++++----
 drivers/gpu/drm/drm_trace_points.c           |  3 ++-
 drivers/gpu/drm/drm_vblank.c                 | 12 ++++++++---
 drivers/gpu/drm/drm_vm.c                     | 14 ++++++++++++-
 drivers/gpu/drm/drm_vma_manager.c            |  6 +++---
 drivers/gpu/drm/drm_vram_mm_helper.c         |  4 +++-
 drivers/gpu/drm/drm_writeback.c              |  6 ++++--
 59 files changed, 356 insertions(+), 150 deletions(-)

diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c
index 2362f07fe1fc..2a413e291a60 100644
--- a/drivers/gpu/drm/ati_pcigart.c
+++ b/drivers/gpu/drm/ati_pcigart.c
@@ -32,9 +32,12 @@
  */
 
 #include <linux/export.h>
-#include <drm/drmP.h>
 
 #include <drm/ati_pcigart.h>
+#include <drm/drm_device.h>
+#include <drm/drm_os_linux.h>
+#include <drm/drm_pci.h>
+#include <drm/drm_print.h>
 
 # define ATI_PCIGART_PAGE_SIZE		4096	/**< PCI GART page size */
 
diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index 40fba1c04dfc..117b8ee98243 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -31,13 +31,20 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
 #include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/slab.h>
-#include "drm_legacy.h"
 
 #include <asm/agp.h>
 
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_print.h>
+
+#include "drm_legacy.h"
+
 /**
  * Get AGP information.
  *
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index f4924cb7f495..b640e77184e5 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -26,13 +26,18 @@
  */
 
 
-#include <drm/drmP.h>
+#include <linux/sync_file.h>
+
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_uapi.h>
+#include <drm/drm_debugfs.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_mode.h>
 #include <drm/drm_print.h>
 #include <drm/drm_writeback.h>
-#include <linux/sync_file.h>
 
 #include "drm_crtc_internal.h"
 #include "drm_internal.h"
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 79dbeafb9a52..acf993cb8e52 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -25,14 +25,17 @@
  * Daniel Vetter <daniel.vetter@ffwll.ch>
  */
 
-#include <drm/drmP.h>
+#include <linux/dma-fence.h>
+
 #include <drm/drm_atomic.h>
+#include <drm/drm_atomic_helper.h>
 #include <drm/drm_atomic_uapi.h>
+#include <drm/drm_damage_helper.h>
+#include <drm/drm_device.h>
 #include <drm/drm_plane_helper.h>
-#include <drm/drm_atomic_helper.h>
+#include <drm/drm_print.h>
+#include <drm/drm_vblank.h>
 #include <drm/drm_writeback.h>
-#include <drm/drm_damage_helper.h>
-#include <linux/dma-fence.h>
 
 #include "drm_crtc_helper_internal.h"
 #include "drm_crtc_internal.h"
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index ec13823153a9..97ab26679b96 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -24,12 +24,13 @@
  * Daniel Vetter <daniel.vetter@ffwll.ch>
  */
 
+#include <drm/drm_atomic.h>
 #include <drm/drm_atomic_state_helper.h>
-#include <drm/drm_crtc.h>
-#include <drm/drm_plane.h>
 #include <drm/drm_connector.h>
-#include <drm/drm_atomic.h>
+#include <drm/drm_crtc.h>
 #include <drm/drm_device.h>
+#include <drm/drm_plane.h>
+#include <drm/drm_print.h>
 #include <drm/drm_writeback.h>
 
 #include <linux/slab.h>
diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index bf98402f3210..cc9acd986c68 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -28,10 +28,16 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
+#include <linux/slab.h>
+
+#include <drm/drm_auth.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_lease.h>
+#include <drm/drm_print.h>
+
 #include "drm_internal.h"
 #include "drm_legacy.h"
-#include <drm/drm_lease.h>
 
 /**
  * DOC: master and authentication
diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
index 0c78ca386cbe..37ac168fcb60 100644
--- a/drivers/gpu/drm/drm_blend.c
+++ b/drivers/gpu/drm/drm_blend.c
@@ -23,13 +23,16 @@
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  * OF THIS SOFTWARE.
  */
-#include <drm/drmP.h>
-#include <drm/drm_atomic.h>
-#include <drm/drm_blend.h>
+
 #include <linux/export.h>
 #include <linux/slab.h>
 #include <linux/sort.h>
 
+#include <drm/drm_atomic.h>
+#include <drm/drm_blend.h>
+#include <drm/drm_device.h>
+#include <drm/drm_print.h>
+
 #include "drm_crtc_internal.h"
 
 /**
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index bfc419ed9d6c..68dacf8422c6 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -28,15 +28,26 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <linux/vmalloc.h>
-#include <linux/slab.h>
-#include <linux/log2.h>
 #include <linux/export.h>
+#include <linux/log2.h>
+#include <linux/mm.h>
+#include <linux/mman.h>
+#include <linux/nospec.h>
+#include <linux/slab.h>
+#include <linux/uaccess.h>
+#include <linux/vmalloc.h>
+
 #include <asm/shmparam.h>
-#include <drm/drmP.h>
+
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_pci.h>
+#include <drm/drm_print.h>
+
 #include "drm_legacy.h"
 
-#include <linux/nospec.h>
 
 static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
 						  struct drm_local_map *map)
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index 5abcd83da6a6..e7870a54f498 100644
--- a/drivers/gpu/drm/drm_client.c
+++ b/drivers/gpu/drm/drm_client.c
@@ -15,10 +15,10 @@
 #include <drm/drm_drv.h>
 #include <drm/drm_file.h>
 #include <drm/drm_fourcc.h>
+#include <drm/drm_framebuffer.h>
 #include <drm/drm_gem.h>
 #include <drm/drm_mode.h>
 #include <drm/drm_print.h>
-#include <drm/drmP.h>
 
 #include "drm_crtc_internal.h"
 #include "drm_internal.h"
diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c
index d5d34d0c79c7..4ce5c6d8de99 100644
--- a/drivers/gpu/drm/drm_color_mgmt.c
+++ b/drivers/gpu/drm/drm_color_mgmt.c
@@ -20,9 +20,13 @@
  * OF THIS SOFTWARE.
  */
 
-#include <drm/drmP.h>
-#include <drm/drm_crtc.h>
+#include <linux/uaccess.h>
+
 #include <drm/drm_color_mgmt.h>
+#include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_print.h>
 
 #include "drm_crtc_internal.h"
 
diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c
index 6e8e1a9fcae3..1f802d8e5681 100644
--- a/drivers/gpu/drm/drm_context.c
+++ b/drivers/gpu/drm/drm_context.c
@@ -28,7 +28,13 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
+#include <linux/slab.h>
+#include <linux/uaccess.h>
+
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_print.h>
+
 #include "drm_legacy.h"
 
 struct drm_ctx_list {
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 747661f63fbb..6dd49a60deac 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -29,21 +29,23 @@
  *      Jesse Barnes <jesse.barnes@intel.com>
  */
 
-#include <linux/kernel.h>
 #include <linux/export.h>
+#include <linux/kernel.h>
 #include <linux/moduleparam.h>
 
-#include <drm/drmP.h>
 #include <drm/drm_atomic.h>
+#include <drm/drm_atomic_helper.h>
 #include <drm/drm_atomic_uapi.h>
 #include <drm/drm_crtc.h>
-#include <drm/drm_encoder.h>
-#include <drm/drm_fourcc.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_edid.h>
+#include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
-#include <drm/drm_atomic_helper.h>
-#include <drm/drm_edid.h>
+#include <drm/drm_print.h>
+#include <drm/drm_vblank.h>
 
 /**
  * DOC: overview
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index f8468eae0503..4b8e817d7420 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -24,20 +24,23 @@
  */
 
 #include <linux/debugfs.h>
+#include <linux/export.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
-#include <linux/export.h>
+#include <linux/uaccess.h>
 
+#include <drm/drm_atomic.h>
+#include <drm/drm_auth.h>
 #include <drm/drm_client.h>
 #include <drm/drm_debugfs.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_edid.h>
-#include <drm/drm_atomic.h>
-#include <drm/drm_auth.h>
+#include <drm/drm_file.h>
 #include <drm/drm_gem.h>
-#include <drm/drmP.h>
 
-#include "drm_internal.h"
 #include "drm_crtc_internal.h"
+#include "drm_internal.h"
 
 #if defined(CONFIG_DEBUG_FS)
 
diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
index 00e743153e94..585169f0dcc5 100644
--- a/drivers/gpu/drm/drm_debugfs_crc.c
+++ b/drivers/gpu/drm/drm_debugfs_crc.c
@@ -29,7 +29,14 @@
 #include <linux/circ_buf.h>
 #include <linux/ctype.h>
 #include <linux/debugfs.h>
-#include <drm/drmP.h>
+#include <linux/poll.h>
+#include <linux/uaccess.h>
+
+#include <drm/drm_crtc.h>
+#include <drm/drm_debugfs_crc.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_print.h>
+
 #include "drm_internal.h"
 
 /**
diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c
index 3f83e2ca80ad..5ef0227eaa0e 100644
--- a/drivers/gpu/drm/drm_dma.c
+++ b/drivers/gpu/drm/drm_dma.c
@@ -34,7 +34,11 @@
  */
 
 #include <linux/export.h>
-#include <drm/drmP.h>
+
+#include <drm/drm_drv.h>
+#include <drm/drm_pci.h>
+#include <drm/drm_print.h>
+
 #include "drm_legacy.h"
 
 /**
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 862621494a93..95a55d98e152 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -35,16 +35,19 @@
 #include <linux/srcu.h>
 
 #include <drm/drm_client.h>
+#include <drm/drm_color_mgmt.h>
 #include <drm/drm_drv.h>
-#include <drm/drmP.h>
+#include <drm/drm_file.h>
+#include <drm/drm_mode_object.h>
+#include <drm/drm_print.h>
 
 #include "drm_crtc_internal.h"
-#include "drm_legacy.h"
 #include "drm_internal.h"
+#include "drm_legacy.h"
 
 /*
  * drm_debug: Enable debug output.
- * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
+ * Bitmask of DRM_UT_x. See include/drm/drm_print.h for details.
  */
 unsigned int drm_debug = 0;
 EXPORT_SYMBOL(drm_debug);
diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c
index 81dfdd33753a..d18a740fe0f1 100644
--- a/drivers/gpu/drm/drm_dumb_buffers.c
+++ b/drivers/gpu/drm/drm_dumb_buffers.c
@@ -23,8 +23,10 @@
  * OF THIS SOFTWARE.
  */
 
-#include <drm/drmP.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem.h>
+#include <drm/drm_mode.h>
 
 #include "drm_crtc_internal.h"
 
diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c
index b694fb57eaa4..7fb47b7b8b44 100644
--- a/drivers/gpu/drm/drm_encoder.c
+++ b/drivers/gpu/drm/drm_encoder.c
@@ -21,7 +21,9 @@
  */
 
 #include <linux/export.h>
-#include <drm/drmP.h>
+
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_encoder.h>
 
 #include "drm_crtc_internal.h"
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 302cf5f8bcce..3f4cb66c7d65 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -32,18 +32,23 @@
 #include <linux/console.h>
 #include <linux/dma-buf.h>
 #include <linux/kernel.h>
-#include <linux/sysrq.h>
-#include <linux/slab.h>
 #include <linux/module.h>
-#include <drm/drmP.h>
-#include <drm/drm_crtc.h>
-#include <drm/drm_fb_helper.h>
-#include <drm/drm_crtc_helper.h>
+#include <linux/slab.h>
+#include <linux/sysrq.h>
+#include <linux/vmalloc.h>
+
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_crtc.h>
+#include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
+#include <drm/drm_print.h>
+#include <drm/drm_vblank.h>
 
-#include "drm_crtc_internal.h"
 #include "drm_crtc_helper_internal.h"
+#include "drm_crtc_internal.h"
 #include "drm_internal.h"
 
 static bool drm_fbdev_emulation = true;
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index 075a7766bb79..754af25fe255 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -31,17 +31,20 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/dma-fence.h>
+#include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/poll.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 
 #include <drm/drm_client.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_file.h>
-#include <drm/drmP.h>
+#include <drm/drm_print.h>
 
-#include "drm_legacy.h"
-#include "drm_internal.h"
 #include "drm_crtc_internal.h"
+#include "drm_internal.h"
+#include "drm_legacy.h"
 
 /* from BKL pushdown */
 DEFINE_MUTEX(drm_global_mutex);
diff --git a/drivers/gpu/drm/drm_flip_work.c b/drivers/gpu/drm/drm_flip_work.c
index 3da3bf5af405..060b753881a2 100644
--- a/drivers/gpu/drm/drm_flip_work.c
+++ b/drivers/gpu/drm/drm_flip_work.c
@@ -21,9 +21,11 @@
  * SOFTWARE.
  */
 
-#include <drm/drmP.h>
-#include <drm/drm_util.h>
+#include <linux/slab.h>
+
 #include <drm/drm_flip_work.h>
+#include <drm/drm_print.h>
+#include <drm/drm_util.h>
 
 /**
  * drm_flip_work_allocate_task - allocate a flip-work task
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index 35b459d186c5..c630064ccf41 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -27,7 +27,7 @@
 #include <linux/export.h>
 #include <linux/kernel.h>
 
-#include <drm/drmP.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fourcc.h>
 
 static char printable_char(int c)
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index d8d75e25f6fb..0b72468e8131 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -21,16 +21,21 @@
  */
 
 #include <linux/export.h>
-#include <drm/drmP.h>
-#include <drm/drm_auth.h>
-#include <drm/drm_framebuffer.h>
+#include <linux/uaccess.h>
+
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_uapi.h>
+#include <drm/drm_auth.h>
+#include <drm/drm_debugfs.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_fourcc.h>
+#include <drm/drm_framebuffer.h>
 #include <drm/drm_print.h>
 #include <drm/drm_util.h>
 
-#include "drm_internal.h"
 #include "drm_crtc_internal.h"
+#include "drm_internal.h"
 
 /**
  * DOC: overview
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 50de138c89e0..8a55f71325b1 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -38,10 +38,14 @@
 #include <linux/dma-buf.h>
 #include <linux/mem_encrypt.h>
 #include <linux/pagevec.h>
-#include <drm/drmP.h>
-#include <drm/drm_vma_manager.h>
+
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
 #include <drm/drm_gem.h>
 #include <drm/drm_print.h>
+#include <drm/drm_vma_manager.h>
+
 #include "drm_internal.h"
 
 /** @file drm_gem.c
diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c
index e01ceed09e67..0cb1bbed1f68 100644
--- a/drivers/gpu/drm/drm_gem_cma_helper.c
+++ b/drivers/gpu/drm/drm_gem_cma_helper.c
@@ -17,15 +17,16 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/mutex.h>
-#include <linux/export.h>
 #include <linux/dma-buf.h>
 #include <linux/dma-mapping.h>
+#include <linux/export.h>
+#include <linux/mm.h>
+#include <linux/mutex.h>
+#include <linux/slab.h>
 
-#include <drm/drmP.h>
 #include <drm/drm.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_vma_manager.h>
 
diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
index 65edb1ccb185..6fd48efe288c 100644
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
@@ -14,7 +14,6 @@
 #include <linux/reservation.h>
 #include <linux/slab.h>
 
-#include <drm/drmP.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_uapi.h>
 #include <drm/drm_damage_helper.h>
diff --git a/drivers/gpu/drm/drm_hashtab.c b/drivers/gpu/drm/drm_hashtab.c
index c92b00d42ece..c50fa6f0709f 100644
--- a/drivers/gpu/drm/drm_hashtab.c
+++ b/drivers/gpu/drm/drm_hashtab.c
@@ -32,11 +32,15 @@
  * Thomas Hellström <thomas-at-tungstengraphics-dot-com>
  */
 
-#include <drm/drmP.h>
-#include <drm/drm_hashtab.h>
+#include <linux/export.h>
 #include <linux/hash.h>
+#include <linux/mm.h>
+#include <linux/rculist.h>
 #include <linux/slab.h>
-#include <linux/export.h>
+#include <linux/vmalloc.h>
+
+#include <drm/drm_hashtab.h>
+#include <drm/drm_print.h>
 
 int drm_ht_create(struct drm_open_hash *ht, unsigned int order)
 {
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 374b372da58a..586aa28024c5 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -31,10 +31,13 @@
 #include <linux/ratelimit.h>
 #include <linux/export.h>
 
-#include <drm/drmP.h>
-#include "drm_legacy.h"
-#include "drm_internal.h"
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_file.h>
+#include <drm/drm_print.h>
+
 #include "drm_crtc_internal.h"
+#include "drm_internal.h"
+#include "drm_legacy.h"
 
 #define DRM_IOCTL_VERSION32		DRM_IOWR(0x00, drm_version32_t)
 #define DRM_IOCTL_GET_UNIQUE32		DRM_IOWR(0x01, drm_unique32_t)
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 2263e3ddd822..9441a36a2469 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -28,16 +28,22 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drm_ioctl.h>
-#include <drm/drmP.h>
-#include <drm/drm_auth.h>
-#include "drm_legacy.h"
-#include "drm_internal.h"
-#include "drm_crtc_internal.h"
-
-#include <linux/pci.h>
 #include <linux/export.h>
 #include <linux/nospec.h>
+#include <linux/pci.h>
+#include <linux/uaccess.h>
+
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_auth.h>
+#include <drm/drm_crtc.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_ioctl.h>
+#include <drm/drm_print.h>
+
+#include "drm_crtc_internal.h"
+#include "drm_internal.h"
+#include "drm_legacy.h"
 
 /**
  * DOC: getunique and setversion story
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 02f38cc9f468..03bce566a8c3 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -51,13 +51,18 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drm_irq.h>
-#include <drm/drmP.h>
 
+#include <linux/export.h>
 #include <linux/interrupt.h>	/* For task queue support */
-
+#include <linux/pci.h>
 #include <linux/vgaarb.h>
-#include <linux/export.h>
+
+#include <drm/drm.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_irq.h>
+#include <drm/drm_print.h>
+#include <drm/drm_vblank.h>
 
 #include "drm_internal.h"
 
diff --git a/drivers/gpu/drm/drm_kms_helper_common.c b/drivers/gpu/drm/drm_kms_helper_common.c
index 9c5ae825c507..d9a5ac81949e 100644
--- a/drivers/gpu/drm/drm_kms_helper_common.c
+++ b/drivers/gpu/drm/drm_kms_helper_common.c
@@ -26,7 +26,8 @@
  */
 
 #include <linux/module.h>
-#include <drm/drmP.h>
+
+#include <drm/drm_print.h>
 
 #include "drm_crtc_helper_internal.h"
 
diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
index 694ff363a90b..849da9414450 100644
--- a/drivers/gpu/drm/drm_lease.c
+++ b/drivers/gpu/drm/drm_lease.c
@@ -11,14 +11,19 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  */
+#include <linux/file.h>
+#include <linux/uaccess.h>
 
-#include <drm/drmP.h>
-#include "drm_internal.h"
-#include "drm_legacy.h"
-#include "drm_crtc_internal.h"
-#include <drm/drm_lease.h>
 #include <drm/drm_auth.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_lease.h>
+#include <drm/drm_print.h>
+
+#include "drm_crtc_internal.h"
+#include "drm_internal.h"
+#include "drm_legacy.h"
 
 #define drm_for_each_lessee(lessee, lessor) \
 	list_for_each_entry((lessee), &(lessor)->lessees, lessee_list)
diff --git a/drivers/gpu/drm/drm_legacy_misc.c b/drivers/gpu/drm/drm_legacy_misc.c
index 18d05a6c12b3..4d3a11cfd979 100644
--- a/drivers/gpu/drm/drm_legacy_misc.c
+++ b/drivers/gpu/drm/drm_legacy_misc.c
@@ -33,7 +33,12 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_irq.h>
+#include <drm/drm_print.h>
+
 #include "drm_internal.h"
 #include "drm_legacy.h"
 
diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c
index b70058e77a28..68b18b0e290c 100644
--- a/drivers/gpu/drm/drm_lock.c
+++ b/drivers/gpu/drm/drm_lock.c
@@ -36,9 +36,13 @@
 #include <linux/export.h>
 #include <linux/sched/signal.h>
 
-#include <drm/drmP.h>
-#include "drm_legacy.h"
+#include <drm/drm.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_print.h>
+
 #include "drm_internal.h"
+#include "drm_legacy.h"
 
 static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context);
 
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index 132fef8ff1b6..b634e1670190 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -33,10 +33,15 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <linux/highmem.h>
 #include <linux/export.h>
+#include <linux/highmem.h>
+#include <linux/pci.h>
+#include <linux/vmalloc.h>
 #include <xen/xen.h>
-#include <drm/drmP.h>
+
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_device.h>
+
 #include "drm_legacy.h"
 
 #if IS_ENABLED(CONFIG_AGP)
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 8b4cd31ce7bd..9a59865ce574 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -42,12 +42,13 @@
  * Thomas Hellström <thomas-at-tungstengraphics-dot-com>
  */
 
-#include <drm/drmP.h>
-#include <drm/drm_mm.h>
-#include <linux/slab.h>
-#include <linux/seq_file.h>
 #include <linux/export.h>
 #include <linux/interval_tree_generic.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/stacktrace.h>
+
+#include <drm/drm_mm.h>
 
 /**
  * DOC: Overview
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index 1a346ae1599d..7bc03c3c154f 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -20,9 +20,13 @@
  * OF THIS SOFTWARE.
  */
 
+#include <linux/uaccess.h>
+
+#include <drm/drm_drv.h>
 #include <drm/drm_encoder.h>
+#include <drm/drm_file.h>
 #include <drm/drm_mode_config.h>
-#include <drm/drmP.h>
+#include <drm/drm_print.h>
 
 #include "drm_crtc_internal.h"
 #include "drm_internal.h"
diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index f32507e65b79..1c6e51135962 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -21,9 +21,14 @@
  */
 
 #include <linux/export.h>
-#include <drm/drmP.h>
-#include <drm/drm_mode_object.h>
+#include <linux/uaccess.h>
+
 #include <drm/drm_atomic.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_device.h>
+#include <drm/drm_file.h>
+#include <drm/drm_mode_object.h>
+#include <drm/drm_print.h>
 
 #include "drm_crtc_internal.h"
 
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 56f92a0bba62..5a07a28fec6d 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -33,11 +33,14 @@
 #include <linux/list.h>
 #include <linux/list_sort.h>
 #include <linux/export.h>
-#include <drm/drmP.h>
-#include <drm/drm_crtc.h>
+
 #include <video/of_videomode.h>
 #include <video/videomode.h>
+
+#include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
 #include <drm/drm_modes.h>
+#include <drm/drm_print.h>
 
 #include "drm_crtc_internal.h"
 
diff --git a/drivers/gpu/drm/drm_modeset_lock.c b/drivers/gpu/drm/drm_modeset_lock.c
index 81dd11901ffd..53187821df01 100644
--- a/drivers/gpu/drm/drm_modeset_lock.c
+++ b/drivers/gpu/drm/drm_modeset_lock.c
@@ -21,9 +21,9 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
 #include <drm/drm_modeset_lock.h>
 
 /**
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index f2f71d71494a..c13bd9a5185a 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -2,12 +2,13 @@
 #include <linux/export.h>
 #include <linux/list.h>
 #include <linux/of_graph.h>
-#include <drm/drmP.h>
+
 #include <drm/drm_bridge.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
 #include <drm/drm_encoder.h>
-#include <drm/drm_panel.h>
 #include <drm/drm_of.h>
+#include <drm/drm_panel.h>
 
 /**
  * DOC: overview
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 693748ad8b88..a86a3ab2771c 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -22,12 +22,17 @@
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <linux/pci.h>
-#include <linux/slab.h>
 #include <linux/dma-mapping.h>
 #include <linux/export.h>
+#include <linux/pci.h>
+#include <linux/slab.h>
+
+#include <drm/drm.h>
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_pci.h>
-#include <drm/drmP.h>
+#include <drm/drm_print.h>
+
 #include "drm_internal.h"
 #include "drm_legacy.h"
 
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 0fff72dcd06d..3aae7ea522f2 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -24,14 +24,15 @@
  */
 
 #include <linux/list.h>
-#include <drm/drmP.h>
-#include <drm/drm_plane_helper.h>
-#include <drm/drm_rect.h>
+
 #include <drm/drm_atomic.h>
+#include <drm/drm_atomic_helper.h>
 #include <drm/drm_atomic_uapi.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_device.h>
 #include <drm/drm_encoder.h>
-#include <drm/drm_atomic_helper.h>
+#include <drm/drm_plane_helper.h>
+#include <drm/drm_rect.h>
 
 #define SUBPIXEL_MASK 0xffff
 
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 706034fd403f..d0c01318076b 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -29,9 +29,12 @@
 #include <linux/export.h>
 #include <linux/dma-buf.h>
 #include <linux/rbtree.h>
-#include <drm/drm_prime.h>
+
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_framebuffer.h>
 #include <drm/drm_gem.h>
-#include <drm/drmP.h>
+#include <drm/drm_prime.h>
 
 #include "drm_internal.h"
 
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index f5cb0aabfe35..a17c8a14dba4 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -26,8 +26,13 @@
 #define DEBUG /* for pr_debug() */
 
 #include <stdarg.h>
+
+#include <linux/io.h>
 #include <linux/seq_file.h>
-#include <drm/drmP.h>
+#include <linux/slab.h>
+
+#include <drm/drm.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_print.h>
 
 void __drm_puts_coredump(struct drm_printer *p, const char *str)
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 6fd08e04b323..43c85e1b467e 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -32,14 +32,15 @@
 #include <linux/export.h>
 #include <linux/moduleparam.h>
 
-#include <drm/drmP.h>
 #include <drm/drm_client.h>
 #include <drm/drm_crtc.h>
-#include <drm/drm_fourcc.h>
-#include <drm/drm_fb_helper.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_modeset_helper_vtables.h>
+#include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
+#include <drm/drm_sysfs.h>
 
 #include "drm_crtc_helper_internal.h"
 
diff --git a/drivers/gpu/drm/drm_property.c b/drivers/gpu/drm/drm_property.c
index f8ec8f9c3e7a..892ce636ef72 100644
--- a/drivers/gpu/drm/drm_property.c
+++ b/drivers/gpu/drm/drm_property.c
@@ -21,7 +21,12 @@
  */
 
 #include <linux/export.h>
-#include <drm/drmP.h>
+#include <linux/uaccess.h>
+
+#include <drm/drm_crtc.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_framebuffer.h>
 #include <drm/drm_property.h>
 
 #include "drm_crtc_internal.h"
diff --git a/drivers/gpu/drm/drm_rect.c b/drivers/gpu/drm/drm_rect.c
index 66c41b12719c..b8363aaa9032 100644
--- a/drivers/gpu/drm/drm_rect.c
+++ b/drivers/gpu/drm/drm_rect.c
@@ -24,7 +24,9 @@
 #include <linux/errno.h>
 #include <linux/export.h>
 #include <linux/kernel.h>
-#include <drm/drmP.h>
+
+#include <drm/drm_mode.h>
+#include <drm/drm_print.h>
 #include <drm/drm_rect.h>
 
 /**
diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c
index bb829a115fc6..2d7790f14b0c 100644
--- a/drivers/gpu/drm/drm_scatter.c
+++ b/drivers/gpu/drm/drm_scatter.c
@@ -31,9 +31,14 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <linux/vmalloc.h>
+#include <linux/mm.h>
 #include <linux/slab.h>
-#include <drm/drmP.h>
+#include <linux/vmalloc.h>
+
+#include <drm/drm.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_print.h>
+
 #include "drm_legacy.h"
 
 #define DEBUG_SCATTER 0
diff --git a/drivers/gpu/drm/drm_scdc_helper.c b/drivers/gpu/drm/drm_scdc_helper.c
index 870e25f1f788..311e71bbba5b 100644
--- a/drivers/gpu/drm/drm_scdc_helper.c
+++ b/drivers/gpu/drm/drm_scdc_helper.c
@@ -24,8 +24,8 @@
 #include <linux/slab.h>
 #include <linux/delay.h>
 
+#include <drm/drm_print.h>
 #include <drm/drm_scdc_helper.h>
-#include <drm/drmP.h>
 
 /**
  * DOC: scdc helpers
diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index a32f14cd7398..77c9645e17ed 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -7,13 +7,14 @@
  * (at your option) any later version.
  */
 
-#include <drm/drmP.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_simple_kms_helper.h>
-#include <linux/slab.h>
 
 /**
  * DOC: overview
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 3d400905100b..a199c8d56b95 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -46,16 +46,21 @@
  * The file takes a reference on the kref.
  */
 
-#include <drm/drmP.h>
+#include <linux/anon_inodes.h>
 #include <linux/file.h>
 #include <linux/fs.h>
-#include <linux/anon_inodes.h>
-#include <linux/sync_file.h>
 #include <linux/sched/signal.h>
+#include <linux/sync_file.h>
+#include <linux/uaccess.h>
 
-#include "drm_internal.h"
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_gem.h>
+#include <drm/drm_print.h>
 #include <drm/drm_syncobj.h>
 
+#include "drm_internal.h"
+
 struct syncobj_wait_entry {
 	struct list_head node;
 	struct task_struct *task;
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index ecb7b33002bb..6aa5d5c586a7 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -13,13 +13,20 @@
  */
 
 #include <linux/device.h>
-#include <linux/kdev_t.h>
-#include <linux/gfp.h>
 #include <linux/err.h>
 #include <linux/export.h>
-
+#include <linux/gfp.h>
+#include <linux/kdev_t.h>
+#include <linux/slab.h>
+
+#include <drm/drm_connector.h>
+#include <drm/drm_device.h>
+#include <drm/drm_file.h>
+#include <drm/drm_modes.h>
+#include <drm/drm_print.h>
+#include <drm/drm_property.h>
 #include <drm/drm_sysfs.h>
-#include <drm/drmP.h>
+
 #include "drm_internal.h"
 
 #define to_drm_minor(d) dev_get_drvdata(d)
diff --git a/drivers/gpu/drm/drm_trace_points.c b/drivers/gpu/drm/drm_trace_points.c
index 3bbc4deb4dbc..1e2065b403c9 100644
--- a/drivers/gpu/drm/drm_trace_points.c
+++ b/drivers/gpu/drm/drm_trace_points.c
@@ -1,4 +1,5 @@
-#include <drm/drmP.h>
+
+#include <drm/drm_file.h>
 
 #define CREATE_TRACE_POINTS
 #include "drm_trace.h"
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index a1b65d26d761..0d704bddb1a6 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -24,12 +24,18 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drm_vblank.h>
-#include <drm/drmP.h>
 #include <linux/export.h>
+#include <linux/moduleparam.h>
+
+#include <drm/drm_crtc.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_framebuffer.h>
+#include <drm/drm_print.h>
+#include <drm/drm_os_linux.h>
+#include <drm/drm_vblank.h>
 
-#include "drm_trace.h"
 #include "drm_internal.h"
+#include "drm_trace.h"
 
 /**
  * DOC: vblank handling
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 10cf83d569e1..2f24ee6c7a92 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -33,15 +33,27 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
 #include <linux/export.h>
+#include <linux/pci.h>
 #include <linux/seq_file.h>
+#include <linux/vmalloc.h>
+
 #if defined(__ia64__)
 #include <linux/efi.h>
 #include <linux/slab.h>
 #endif
 #include <linux/mem_encrypt.h>
+
 #include <asm/pgtable.h>
+
+#include <drm/drm_agpsupport.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_framebuffer.h>
+#include <drm/drm_gem.h>
+#include <drm/drm_print.h>
+
 #include "drm_internal.h"
 #include "drm_legacy.h"
 
diff --git a/drivers/gpu/drm/drm_vma_manager.c b/drivers/gpu/drm/drm_vma_manager.c
index c5d0d2358301..4565319fa6b3 100644
--- a/drivers/gpu/drm/drm_vma_manager.c
+++ b/drivers/gpu/drm/drm_vma_manager.c
@@ -23,9 +23,6 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <drm/drmP.h>
-#include <drm/drm_mm.h>
-#include <drm/drm_vma_manager.h>
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/rbtree.h>
@@ -33,6 +30,9 @@
 #include <linux/spinlock.h>
 #include <linux/types.h>
 
+#include <drm/drm_mm.h>
+#include <drm/drm_vma_manager.h>
+
 /**
  * DOC: vma offset manager
  *
diff --git a/drivers/gpu/drm/drm_vram_mm_helper.c b/drivers/gpu/drm/drm_vram_mm_helper.c
index c94a6dc5ade7..c911781d6728 100644
--- a/drivers/gpu/drm/drm_vram_mm_helper.c
+++ b/drivers/gpu/drm/drm_vram_mm_helper.c
@@ -1,7 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
+#include <drm/drm_device.h>
+#include <drm/drm_file.h>
 #include <drm/drm_vram_mm_helper.h>
-#include <drm/drmP.h>
+
 #include <drm/ttm/ttm_page_alloc.h>
 
 /**
diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
index 79ac014701c8..ff138b6ec48b 100644
--- a/drivers/gpu/drm/drm_writeback.c
+++ b/drivers/gpu/drm/drm_writeback.c
@@ -9,12 +9,14 @@
  * of such GNU licence.
  */
 
+#include <linux/dma-fence.h>
+
 #include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_modeset_helper_vtables.h>
 #include <drm/drm_property.h>
 #include <drm/drm_writeback.h>
-#include <drm/drmP.h>
-#include <linux/dma-fence.h>
 
 /**
  * DOC: overview
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for drm: make headers self-contained and drop drmP.h
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (6 preceding siblings ...)
  2019-05-26 17:35 ` [PATCH v2 7/7] drm: drop use of drmP.h in drm/* Sam Ravnborg
@ 2019-05-26 18:05 ` Patchwork
  2019-05-26 18:08 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-05-26 18:05 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: intel-gfx

== Series Details ==

Series: drm: make headers self-contained and drop drmP.h
URL   : https://patchwork.freedesktop.org/series/61156/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
67d7923073e6 drm: make drm/drm_auth.h self contained
-:21: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#21: FILE: include/drm/drm_auth.h:1:
+#ifndef _DRM_AUTH_H_

total: 0 errors, 1 warnings, 0 checks, 20 lines checked
fe5661c9992c drm: make drm/drm_legacy.h self-contained
cac5b083f2c5 drm: make drm_crtc_internal.h self-contained
ae0bbbbd1c92 drm: make drm_internal.h self-contained
18d28270911c drm: make drm_legacy.h self-contained
e088cf6a4159 drm: make drm_trace.h self-contained
17f37676c0e5 drm: drop use of drmP.h in drm/*
-:1213: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#1213: FILE: drivers/gpu/drm/drm_trace_points.c:1:
+

total: 0 errors, 1 warnings, 0 checks, 1020 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✗ Fi.CI.SPARSE: warning for drm: make headers self-contained and drop drmP.h
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (7 preceding siblings ...)
  2019-05-26 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for drm: make headers self-contained and drop drmP.h Patchwork
@ 2019-05-26 18:08 ` Patchwork
  2019-05-26 18:25 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-05-26 18:08 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: intel-gfx

== Series Details ==

Series: drm: make headers self-contained and drop drmP.h
URL   : https://patchwork.freedesktop.org/series/61156/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm: make drm/drm_auth.h self contained
Okay!

Commit: drm: make drm/drm_legacy.h self-contained
Okay!

Commit: drm: make drm_crtc_internal.h self-contained
Okay!

Commit: drm: make drm_internal.h self-contained
Okay!

Commit: drm: make drm_legacy.h self-contained
Okay!

Commit: drm: make drm_trace.h self-contained
Okay!

Commit: drm: drop use of drmP.h in drm/*
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)
-drivers/gpu/drm/drm_rect.c:100:27: warning: expression using sizeof(void)

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for drm: make headers self-contained and drop drmP.h
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (8 preceding siblings ...)
  2019-05-26 18:08 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2019-05-26 18:25 ` Patchwork
  2019-05-27  6:18 ` [PATCH v2 0/7] " Daniel Vetter
  2019-05-27 12:00 ` ✓ Fi.CI.IGT: success for " Patchwork
  11 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-05-26 18:25 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: intel-gfx

== Series Details ==

Series: drm: make headers self-contained and drop drmP.h
URL   : https://patchwork.freedesktop.org/series/61156/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6142 -> Patchwork_13103
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/

Known issues
------------

  Here are the changes found in Patchwork_13103 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_cpu_reloc@basic:
    - fi-pnv-d510:        [PASS][1] -> [INCOMPLETE][2] ([fdo#110740])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-pnv-d510/igt@gem_cpu_reloc@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-pnv-d510/igt@gem_cpu_reloc@basic.html

  * igt@gem_flink_basic@bad-open:
    - fi-icl-u3:          [PASS][3] -> [DMESG-WARN][4] ([fdo#107724])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-icl-u3/igt@gem_flink_basic@bad-open.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-icl-u3/igt@gem_flink_basic@bad-open.html

  * igt@i915_selftest@live_contexts:
    - fi-skl-gvtdvm:      [PASS][5] -> [DMESG-FAIL][6] ([fdo#110235])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [DMESG-FAIL][9] ([fdo#110235]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][11] ([fdo#109485]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u3:          [FAIL][13] ([fdo#103167]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/fi-icl-u3/igt@kms_frontbuffer_tracking@basic.html

  
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
  [fdo#110740]: https://bugs.freedesktop.org/show_bug.cgi?id=110740


Participating hosts (53 -> 45)
------------------------------

  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-dsi fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_6142 -> Patchwork_13103

  CI_DRM_6142: a388075b2bdc3f714c11e90afb32d65e121987f3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5015: cdd6b0a7630762cec14596b9863f418b48c32f46 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13103: 17f37676c0e5f24e1498a056df5e71ace0f2ad61 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

17f37676c0e5 drm: drop use of drmP.h in drm/*
e088cf6a4159 drm: make drm_trace.h self-contained
18d28270911c drm: make drm_legacy.h self-contained
ae0bbbbd1c92 drm: make drm_internal.h self-contained
cac5b083f2c5 drm: make drm_crtc_internal.h self-contained
fe5661c9992c drm: make drm/drm_legacy.h self-contained
67d7923073e6 drm: make drm/drm_auth.h self contained

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (9 preceding siblings ...)
  2019-05-26 18:25 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-05-27  6:18 ` Daniel Vetter
  2019-05-27  6:54   ` Sam Ravnborg
  2019-05-27 18:05   ` Sam Ravnborg
  2019-05-27 12:00 ` ✓ Fi.CI.IGT: success for " Patchwork
  11 siblings, 2 replies; 17+ messages in thread
From: Daniel Vetter @ 2019-05-27  6:18 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Maxime Ripard, intel-gfx, dri-devel, David Airlie

On Sun, May 26, 2019 at 07:35:28PM +0200, Sam Ravnborg wrote:
> While removing use of drmP.h from files in drm/* I
> noticed that I had to add the same include files due to
> dependencies in the header files.
> 
> It is better to let the header files be self-contained and
> let the users pull in only the additional headers files required.
> So I went ahead and made the relevant header files self-contained.
> (I did not check if this made any includes redundant in some files,
> I do not have tooling in place to do so).
> 
> Daniel suggested to add support for testing that they stay
> self contained.
> Jani Nikula has sent a patch to kbuild to make this part of the
> kbuild machinery. I have used it locally and as soon as it
> lands in kbuild I will start using it for drm.
> We could have duplicated the infrastructure now but that seemed
> too much code chrunch.
> 
> This patchset include the actual removal of drmP.h as one big patch.
> This is build tested on alpha (always interesting), arm, arm64, x86 etc.
> 
> For all files touched the following was done:
> - include files divided up in blocks in following order:
>     	linux/*
> 	video/*
> 	drm/*
> 	""
> - within each block the include files are sorted alphabetically
> 
> v2:
> - use same ordering af blocks
> - move includes down below license text
> - added patch with actual drmP.h removal
> - reworded some subjects to make them more descriptive
> - fixed a few spelling erros in changelogs (but a few may remain)
> 
>         Sam

On the series:

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Did a bit of scrolling, looks all reasonable, but definitely didn't check
things in-depth.

btw did you look at the i915 Makefile trickery to make sure headers stay
self-contained?
-Daniel

> 
> 
> Sam Ravnborg (7):
>       drm: make drm/drm_auth.h self contained
>       drm: make drm/drm_legacy.h self-contained
>       drm: make drm_crtc_internal.h self-contained
>       drm: make drm_internal.h self-contained
>       drm: make drm_legacy.h self-contained
>       drm: make drm_trace.h self-contained
>       drm: drop use of drmP.h in drm/*
> 
>  drivers/gpu/drm/ati_pcigart.c                |  5 ++++-
>  drivers/gpu/drm/drm_agpsupport.c             | 11 +++++++++--
>  drivers/gpu/drm/drm_atomic.c                 |  9 +++++++--
>  drivers/gpu/drm/drm_atomic_helper.c          | 11 +++++++----
>  drivers/gpu/drm/drm_atomic_state_helper.c    |  7 ++++---
>  drivers/gpu/drm/drm_auth.c                   | 10 ++++++++--
>  drivers/gpu/drm/drm_blend.c                  |  9 ++++++---
>  drivers/gpu/drm/drm_bufs.c                   | 21 ++++++++++++++++-----
>  drivers/gpu/drm/drm_client.c                 |  2 +-
>  drivers/gpu/drm/drm_color_mgmt.c             |  8 ++++++--
>  drivers/gpu/drm/drm_context.c                |  8 +++++++-
>  drivers/gpu/drm/drm_crtc_helper.c            | 14 ++++++++------
>  drivers/gpu/drm/drm_crtc_internal.h          | 24 ++++++++++++++++++++----
>  drivers/gpu/drm/drm_debugfs.c                | 13 ++++++++-----
>  drivers/gpu/drm/drm_debugfs_crc.c            |  9 ++++++++-
>  drivers/gpu/drm/drm_dma.c                    |  6 +++++-
>  drivers/gpu/drm/drm_drv.c                    |  9 ++++++---
>  drivers/gpu/drm/drm_dumb_buffers.c           |  4 +++-
>  drivers/gpu/drm/drm_encoder.c                |  4 +++-
>  drivers/gpu/drm/drm_fb_helper.c              | 19 ++++++++++++-------
>  drivers/gpu/drm/drm_file.c                   | 11 +++++++----
>  drivers/gpu/drm/drm_flip_work.c              |  6 ++++--
>  drivers/gpu/drm/drm_fourcc.c                 |  2 +-
>  drivers/gpu/drm/drm_framebuffer.c            | 13 +++++++++----
>  drivers/gpu/drm/drm_gem.c                    |  8 ++++++--
>  drivers/gpu/drm/drm_gem_cma_helper.c         | 11 ++++++-----
>  drivers/gpu/drm/drm_gem_framebuffer_helper.c |  1 -
>  drivers/gpu/drm/drm_hashtab.c                | 10 +++++++---
>  drivers/gpu/drm/drm_internal.h               | 10 +++++++++-
>  drivers/gpu/drm/drm_ioc32.c                  |  9 ++++++---
>  drivers/gpu/drm/drm_ioctl.c                  | 22 ++++++++++++++--------
>  drivers/gpu/drm/drm_irq.c                    | 13 +++++++++----
>  drivers/gpu/drm/drm_kms_helper_common.c      |  3 ++-
>  drivers/gpu/drm/drm_lease.c                  | 15 ++++++++++-----
>  drivers/gpu/drm/drm_legacy.h                 |  4 ++++
>  drivers/gpu/drm/drm_legacy_misc.c            |  7 ++++++-
>  drivers/gpu/drm/drm_lock.c                   |  8 ++++++--
>  drivers/gpu/drm/drm_memory.c                 |  9 +++++++--
>  drivers/gpu/drm/drm_mm.c                     |  9 +++++----
>  drivers/gpu/drm/drm_mode_config.c            |  6 +++++-
>  drivers/gpu/drm/drm_mode_object.c            |  9 +++++++--
>  drivers/gpu/drm/drm_modes.c                  |  7 +++++--
>  drivers/gpu/drm/drm_modeset_lock.c           |  2 +-
>  drivers/gpu/drm/drm_of.c                     |  5 +++--
>  drivers/gpu/drm/drm_pci.c                    | 11 ++++++++---
>  drivers/gpu/drm/drm_plane_helper.c           |  9 +++++----
>  drivers/gpu/drm/drm_prime.c                  |  7 +++++--
>  drivers/gpu/drm/drm_print.c                  |  7 ++++++-
>  drivers/gpu/drm/drm_probe_helper.c           |  7 ++++---
>  drivers/gpu/drm/drm_property.c               |  7 ++++++-
>  drivers/gpu/drm/drm_rect.c                   |  4 +++-
>  drivers/gpu/drm/drm_scatter.c                |  9 +++++++--
>  drivers/gpu/drm/drm_scdc_helper.c            |  2 +-
>  drivers/gpu/drm/drm_simple_kms_helper.c      |  5 +++--
>  drivers/gpu/drm/drm_syncobj.c                | 13 +++++++++----
>  drivers/gpu/drm/drm_sysfs.c                  | 15 +++++++++++----
>  drivers/gpu/drm/drm_trace.h                  |  2 ++
>  drivers/gpu/drm/drm_trace_points.c           |  3 ++-
>  drivers/gpu/drm/drm_vblank.c                 | 12 +++++++++---
>  drivers/gpu/drm/drm_vm.c                     | 14 +++++++++++++-
>  drivers/gpu/drm/drm_vma_manager.c            |  6 +++---
>  drivers/gpu/drm/drm_vram_mm_helper.c         |  4 +++-
>  drivers/gpu/drm/drm_writeback.c              |  6 ++++--
>  include/drm/drm_auth.h                       | 11 +++++++++--
>  include/drm/drm_legacy.h                     | 12 ++++++------
>  65 files changed, 406 insertions(+), 163 deletions(-)
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h
  2019-05-27  6:18 ` [PATCH v2 0/7] " Daniel Vetter
@ 2019-05-27  6:54   ` Sam Ravnborg
  2019-05-27 18:05   ` Sam Ravnborg
  1 sibling, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-27  6:54 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Maxime Ripard, intel-gfx, dri-devel, David Airlie

Hi Daniel.
On Mon, May 27, 2019 at 08:18:35AM +0200, Daniel Vetter wrote:
> On Sun, May 26, 2019 at 07:35:28PM +0200, Sam Ravnborg wrote:
> > While removing use of drmP.h from files in drm/* I
> > noticed that I had to add the same include files due to
> > dependencies in the header files.
> > 
> > It is better to let the header files be self-contained and
> > let the users pull in only the additional headers files required.
> > So I went ahead and made the relevant header files self-contained.
> > (I did not check if this made any includes redundant in some files,
> > I do not have tooling in place to do so).
> > 
> > Daniel suggested to add support for testing that they stay
> > self contained.
> > Jani Nikula has sent a patch to kbuild to make this part of the
> > kbuild machinery. I have used it locally and as soon as it
> > lands in kbuild I will start using it for drm.
> > We could have duplicated the infrastructure now but that seemed
> > too much code chrunch.
> > 
> > This patchset include the actual removal of drmP.h as one big patch.
> > This is build tested on alpha (always interesting), arm, arm64, x86 etc.
> > 
> > For all files touched the following was done:
> > - include files divided up in blocks in following order:
> >     	linux/*
> > 	video/*
> > 	drm/*
> > 	""
> > - within each block the include files are sorted alphabetically
> > 
> > v2:
> > - use same ordering af blocks
> > - move includes down below license text
> > - added patch with actual drmP.h removal
> > - reworded some subjects to make them more descriptive
> > - fixed a few spelling erros in changelogs (but a few may remain)
> > 
> >         Sam
> 
> On the series:
> 
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thanks

> 
> Did a bit of scrolling, looks all reasonable, but definitely didn't check
> things in-depth.
> 
> btw did you look at the i915 Makefile trickery to make sure headers stay
> self-contained?
Yup, this is what Jani works on getting upstreamed to be part of kbuild.
When it lands I will activate it for the drm headers (if not beaten by
someone else)
I used it locally to check everything was OK.

	Sam
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.IGT: success for drm: make headers self-contained and drop drmP.h
  2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
                   ` (10 preceding siblings ...)
  2019-05-27  6:18 ` [PATCH v2 0/7] " Daniel Vetter
@ 2019-05-27 12:00 ` Patchwork
  11 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: intel-gfx

== Series Details ==

Series: drm: make headers self-contained and drop drmP.h
URL   : https://patchwork.freedesktop.org/series/61156/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6142_full -> Patchwork_13103_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_13103_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_pwrite@small-cpu-fbr:
    - shard-apl:          [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl5/igt@gem_pwrite@small-cpu-fbr.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-apl6/igt@gem_pwrite@small-cpu-fbr.html

  * igt@i915_pm_rpm@gem-execbuf:
    - shard-skl:          [PASS][3] -> [INCOMPLETE][4] ([fdo#107803] / [fdo#107807])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl1/igt@i915_pm_rpm@gem-execbuf.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl1/igt@i915_pm_rpm@gem-execbuf.html

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
    - shard-apl:          [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +4 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl5/igt@kms_cursor_crc@pipe-b-cursor-suspend.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-apl3/igt@kms_cursor_crc@pipe-b-cursor-suspend.html

  * igt@kms_flip@2x-flip-vs-suspend:
    - shard-hsw:          [PASS][7] -> [INCOMPLETE][8] ([fdo#103540])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw5/igt@kms_flip@2x-flip-vs-suspend.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-hsw2/igt@kms_flip@2x-flip-vs-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [PASS][9] -> [FAIL][10] ([fdo#105363])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-move:
    - shard-hsw:          [PASS][11] -> [SKIP][12] ([fdo#109271]) +3 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw6/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-move.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-hsw1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-move.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-render:
    - shard-iclb:         [PASS][13] -> [FAIL][14] ([fdo#103167]) +2 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-render.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-render.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-snb:          [PASS][15] -> [INCOMPLETE][16] ([fdo#105411])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-snb1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-snb1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [PASS][17] -> [FAIL][18] ([fdo#103166])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-iclb5/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][19] -> [SKIP][20] ([fdo#109441])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-iclb6/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@tools_test@tools_test:
    - shard-apl:          [PASS][21] -> [SKIP][22] ([fdo#109271])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl5/igt@tools_test@tools_test.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-apl7/igt@tools_test@tools_test.html

  
#### Possible fixes ####

  * igt@gem_exec_schedule@preemptive-hang-render:
    - shard-glk:          [INCOMPLETE][23] ([fdo#103359] / [k.org#198133]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-glk7/igt@gem_exec_schedule@preemptive-hang-render.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-glk4/igt@gem_exec_schedule@preemptive-hang-render.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-apl:          [DMESG-WARN][25] ([fdo#108686]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl8/igt@gem_tiled_swapping@non-threaded.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-apl4/igt@gem_tiled_swapping@non-threaded.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-kbl:          [DMESG-WARN][27] ([fdo#108566]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-kbl1/igt@gem_workarounds@suspend-resume-context.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-kbl4/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_pm_rpm@system-suspend:
    - shard-skl:          [INCOMPLETE][29] ([fdo#104108] / [fdo#107807]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl2/igt@i915_pm_rpm@system-suspend.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl2/igt@i915_pm_rpm@system-suspend.html

  * igt@i915_pm_rpm@system-suspend-devices:
    - shard-skl:          [INCOMPLETE][31] ([fdo#107807]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl5/igt@i915_pm_rpm@system-suspend-devices.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl7/igt@i915_pm_rpm@system-suspend-devices.html

  * igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen:
    - shard-skl:          [FAIL][33] ([fdo#103232]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl10/igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl10/igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen.html

  * igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
    - shard-glk:          [FAIL][35] ([fdo#104873]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-glk2/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-glk1/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-hsw:          [INCOMPLETE][37] ([fdo#103540]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw6/igt@kms_flip@flip-vs-suspend.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-hsw8/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-skl:          [INCOMPLETE][39] ([fdo#109507]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl7/igt@kms_flip@flip-vs-suspend-interruptible.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl10/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt:
    - shard-iclb:         [FAIL][41] ([fdo#103167]) -> [PASS][42] +7 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff:
    - shard-skl:          [FAIL][43] ([fdo#103167]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff.html

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
    - shard-skl:          [FAIL][45] ([fdo#103167] / [fdo#110379]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl4/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl6/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
    - shard-apl:          [DMESG-WARN][47] ([fdo#108566]) -> [PASS][48] +5 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-apl8/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          [FAIL][49] ([fdo#108145] / [fdo#110403]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl10/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl10/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [SKIP][51] ([fdo#109642]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb7/igt@kms_psr2_su@page_flip.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-iclb2/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_suspend:
    - shard-iclb:         [SKIP][53] ([fdo#109441]) -> [PASS][54] +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb6/igt@kms_psr@psr2_suspend.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-iclb2/igt@kms_psr@psr2_suspend.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][55] ([fdo#99912]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl7/igt@kms_setmode@basic.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-apl6/igt@kms_setmode@basic.html
    - shard-skl:          [FAIL][57] ([fdo#99912]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl8/igt@kms_setmode@basic.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl5/igt@kms_setmode@basic.html

  
#### Warnings ####

  * igt@i915_pm_rpm@pc8-residency:
    - shard-skl:          [INCOMPLETE][59] ([fdo#107807]) -> [SKIP][60] ([fdo#109271])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl9/igt@i915_pm_rpm@pc8-residency.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl8/igt@i915_pm_rpm@pc8-residency.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-wc:
    - shard-skl:          [FAIL][61] ([fdo#108040]) -> [FAIL][62] ([fdo#103167])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-wc.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-skl9/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-wc.html

  * igt@prime_vgem@fence-wait-bsd1:
    - shard-snb:          [FAIL][63] ([fdo#110764]) -> [INCOMPLETE][64] ([fdo#105411])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-snb5/igt@prime_vgem@fence-wait-bsd1.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/shard-snb7/igt@prime_vgem@fence-wait-bsd1.html

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107803]: https://bugs.freedesktop.org/show_bug.cgi?id=107803
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110379]: https://bugs.freedesktop.org/show_bug.cgi?id=110379
  [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
  [fdo#110764]: https://bugs.freedesktop.org/show_bug.cgi?id=110764
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_6142 -> Patchwork_13103

  CI_DRM_6142: a388075b2bdc3f714c11e90afb32d65e121987f3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5015: cdd6b0a7630762cec14596b9863f418b48c32f46 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13103: 17f37676c0e5f24e1498a056df5e71ace0f2ad61 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13103/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h
  2019-05-27  6:18 ` [PATCH v2 0/7] " Daniel Vetter
  2019-05-27  6:54   ` Sam Ravnborg
@ 2019-05-27 18:05   ` Sam Ravnborg
  1 sibling, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-27 18:05 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Maxime Ripard, intel-gfx, dri-devel, David Airlie, Sean Paul

On Mon, May 27, 2019 at 08:18:35AM +0200, Daniel Vetter wrote:
> On Sun, May 26, 2019 at 07:35:28PM +0200, Sam Ravnborg wrote:
> > While removing use of drmP.h from files in drm/* I
> > noticed that I had to add the same include files due to
> > dependencies in the header files.
> > 
> > It is better to let the header files be self-contained and
> > let the users pull in only the additional headers files required.
> > So I went ahead and made the relevant header files self-contained.
> > (I did not check if this made any includes redundant in some files,
> > I do not have tooling in place to do so).
> > 
> > Daniel suggested to add support for testing that they stay
> > self contained.
> > Jani Nikula has sent a patch to kbuild to make this part of the
> > kbuild machinery. I have used it locally and as soon as it
> > lands in kbuild I will start using it for drm.
> > We could have duplicated the infrastructure now but that seemed
> > too much code chrunch.
> > 
> > This patchset include the actual removal of drmP.h as one big patch.
> > This is build tested on alpha (always interesting), arm, arm64, x86 etc.
> > 
> > For all files touched the following was done:
> > - include files divided up in blocks in following order:
> >     	linux/*
> > 	video/*
> > 	drm/*
> > 	""
> > - within each block the include files are sorted alphabetically
> > 
> > v2:
> > - use same ordering af blocks
> > - move includes down below license text
> > - added patch with actual drmP.h removal
> > - reworded some subjects to make them more descriptive
> > - fixed a few spelling erros in changelogs (but a few may remain)
> > 
> >         Sam
> 
> On the series:
> 
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Did a bit of scrolling, looks all reasonable, but definitely didn't check
> things in-depth.
Thanks, applied and will be pushed out in a minute.

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 1/7] drm: make drm/drm_auth.h self contained
  2019-05-26 17:35 ` [PATCH v2 1/7] drm: make drm/drm_auth.h self contained Sam Ravnborg
@ 2019-05-28 12:54   ` Jani Nikula
  2019-05-28 13:07     ` Sam Ravnborg
  0 siblings, 1 reply; 17+ messages in thread
From: Jani Nikula @ 2019-05-28 12:54 UTC (permalink / raw)
  To: dri-devel; +Cc: Maxime Ripard, David Airlie, intel-gfx, Sam Ravnborg

On Sun, 26 May 2019, Sam Ravnborg <sam@ravnborg.org> wrote:
> Do not require users of include/drm/drm_auth.h to include
> other files just to let it build.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> ---
>  include/drm/drm_auth.h | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h
> index 871008118bab..6bf8b2b78991 100644
> --- a/include/drm/drm_auth.h
> +++ b/include/drm/drm_auth.h
> @@ -1,3 +1,6 @@
> +#ifndef _DRM_AUTH_H_
> +#define _DRM_AUTH_H_
> +

It's a bit of a bikeshed and this got applied already, but I think the
copyright/license comment should be the first thing in any file, and the
ifdefs should come after that. Using SPDX headers mandate this anyway.

BR,
Jani.


>  /*
>   * Internal Header for the Direct Rendering Manager
>   *
> @@ -25,8 +28,12 @@
>   * OTHER DEALINGS IN THE SOFTWARE.
>   */
>  
> -#ifndef _DRM_AUTH_H_
> -#define _DRM_AUTH_H_
> +#include <linux/idr.h>
> +#include <linux/kref.h>
> +#include <linux/wait.h>
> +
> +struct drm_file;
> +struct drm_hw_lock;
>  
>  /*
>   * Legacy DRI1 locking data structure. Only here instead of in drm_legacy.h for

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 1/7] drm: make drm/drm_auth.h self contained
  2019-05-28 12:54   ` Jani Nikula
@ 2019-05-28 13:07     ` Sam Ravnborg
  0 siblings, 0 replies; 17+ messages in thread
From: Sam Ravnborg @ 2019-05-28 13:07 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Maxime Ripard, David Airlie, intel-gfx, dri-devel

Hi Jani.

On Tue, May 28, 2019 at 03:54:48PM +0300, Jani Nikula wrote:
> On Sun, 26 May 2019, Sam Ravnborg <sam@ravnborg.org> wrote:
> > Do not require users of include/drm/drm_auth.h to include
> > other files just to let it build.
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <maxime.ripard@bootlin.com>
> > Cc: Sean Paul <sean@poorly.run>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > ---
> >  include/drm/drm_auth.h | 11 +++++++++--
> >  1 file changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/drm/drm_auth.h b/include/drm/drm_auth.h
> > index 871008118bab..6bf8b2b78991 100644
> > --- a/include/drm/drm_auth.h
> > +++ b/include/drm/drm_auth.h
> > @@ -1,3 +1,6 @@
> > +#ifndef _DRM_AUTH_H_
> > +#define _DRM_AUTH_H_
> > +
> 
> It's a bit of a bikeshed and this got applied already, but I think the
> copyright/license comment should be the first thing in any file, and the
> ifdefs should come after that. Using SPDX headers mandate this anyway.

I was inspired by other files when I did this change.
But you are right, this was a bad change.
For future changes I will keep this in mind.

	Sam
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-05-28 13:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-26 17:35 [PATCH v2 0/7] drm: make headers self-contained and drop drmP.h Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 1/7] drm: make drm/drm_auth.h self contained Sam Ravnborg
2019-05-28 12:54   ` Jani Nikula
2019-05-28 13:07     ` Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 2/7] drm: make drm/drm_legacy.h self-contained Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 3/7] drm: make drm_crtc_internal.h self-contained Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 4/7] drm: make drm_internal.h self-contained Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 5/7] drm: make drm_legacy.h self-contained Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 6/7] drm: make drm_trace.h self-contained Sam Ravnborg
2019-05-26 17:35 ` [PATCH v2 7/7] drm: drop use of drmP.h in drm/* Sam Ravnborg
2019-05-26 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for drm: make headers self-contained and drop drmP.h Patchwork
2019-05-26 18:08 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-26 18:25 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-27  6:18 ` [PATCH v2 0/7] " Daniel Vetter
2019-05-27  6:54   ` Sam Ravnborg
2019-05-27 18:05   ` Sam Ravnborg
2019-05-27 12:00 ` ✓ Fi.CI.IGT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.