dri-devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm/vmwgfx: drop use of drmP.h
@ 2019-06-23 10:23 Sam Ravnborg
  2019-06-23 10:23 ` [PATCH v2 1/2] drm/vmwgfx: drop use of drmP.h in header files Sam Ravnborg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sam Ravnborg @ 2019-06-23 10:23 UTC (permalink / raw
  To: VMware Graphics, Thomas Hellstrom; +Cc: David Airlie, dri-devel

In two steps drop the use of drmP.h
First patch remove drmP.h from header files and fixes fallout.
Second patch remove drmP.h from the remaining files.

While touching the list of include files divide them in blocks
and sort include files within the blocks.

Patches made on top of drm-misc-next, and checked that
they apply to vmwgfx-fixes-5.2 in
git://people.freedesktop.org/~thomash/linux

Build tested with various configs with several architectures.

v2:
- fix warning in i386 build reported by 0-day
  (missing include)

        Sam

Sam Ravnborg (2):
      drm/vmwgfx: drop use of drmP.h in header files
      drm/vmwgfx: drop reminaing users of drmP.h

 drivers/gpu/drm/vmwgfx/ttm_lock.h          |  2 +-
 drivers/gpu/drm/vmwgfx/ttm_object.h        |  7 ++++---
 drivers/gpu/drm/vmwgfx/vmwgfx_binding.h    |  3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c         |  1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c     |  3 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c        | 17 +++++++++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h        | 30 +++++++++++++++++++++---------
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c         |  8 ++++----
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c      |  3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h      |  5 ++++-
 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c       |  6 ++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c        |  4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_irq.c        |  3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c        | 10 +++++++---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h        |  2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c        |  6 ++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c        |  2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c        | 11 +++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c    |  6 ++----
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c   |  5 ++---
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c       |  6 ++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c       |  9 ++++++---
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c   |  1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.h |  3 ++-
 24 files changed, 95 insertions(+), 58 deletions(-)


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

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

* [PATCH v2 1/2] drm/vmwgfx: drop use of drmP.h in header files
  2019-06-23 10:23 [PATCH v2 0/2] drm/vmwgfx: drop use of drmP.h Sam Ravnborg
@ 2019-06-23 10:23 ` Sam Ravnborg
  2019-06-23 10:23 ` [PATCH v2 2/2] drm/vmwgfx: drop reminaing users of drmP.h Sam Ravnborg
  2019-06-25 16:53 ` [PATCH v2 0/2] drm/vmwgfx: drop use " Deepak Singh Rawat
  2 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2019-06-23 10:23 UTC (permalink / raw
  To: VMware Graphics, Thomas Hellstrom; +Cc: David Airlie, Sam Ravnborg, dri-devel

To facilitate removal of drmP.h in the .c
files remove the use from header files first.
Fix fallout in the other files.

Sorted include files in blocks and sorted files
within each block in alphabetical order.

This revealed a dependency from an uapi header to a header
located below drivers/gpu/drm/vmwgfx/.
Added FIXME to remind someone to fix this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/vmwgfx/ttm_lock.h          |  2 +-
 drivers/gpu/drm/vmwgfx/ttm_object.h        |  7 ++---
 drivers/gpu/drm/vmwgfx/vmwgfx_binding.h    |  3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c     |  3 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h        | 30 +++++++++++++++-------
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h      |  5 +++-
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c        | 10 +++++---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h        |  2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c        |  6 +++--
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c       |  6 +++--
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c       |  9 ++++---
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.h |  3 ++-
 12 files changed, 59 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/ttm_lock.h b/drivers/gpu/drm/vmwgfx/ttm_lock.h
index 0c3af9836863..886ab45d003f 100644
--- a/drivers/gpu/drm/vmwgfx/ttm_lock.h
+++ b/drivers/gpu/drm/vmwgfx/ttm_lock.h
@@ -49,8 +49,8 @@
 #ifndef _TTM_LOCK_H_
 #define _TTM_LOCK_H_
 
-#include <linux/wait.h>
 #include <linux/atomic.h>
+#include <linux/wait.h>
 
 #include "ttm_object.h"
 
diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.h b/drivers/gpu/drm/vmwgfx/ttm_object.h
index 50d26c7ff42d..ede26df87c93 100644
--- a/drivers/gpu/drm/vmwgfx/ttm_object.h
+++ b/drivers/gpu/drm/vmwgfx/ttm_object.h
@@ -37,11 +37,12 @@
 #ifndef _TTM_OBJECT_H_
 #define _TTM_OBJECT_H_
 
-#include <linux/list.h>
-#include <drm/drm_hashtab.h>
+#include <linux/dma-buf.h>
 #include <linux/kref.h>
+#include <linux/list.h>
 #include <linux/rcupdate.h>
-#include <linux/dma-buf.h>
+
+#include <drm/drm_hashtab.h>
 #include <drm/ttm/ttm_memory.h>
 
 /**
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_binding.h b/drivers/gpu/drm/vmwgfx/vmwgfx_binding.h
index f6ab79d23923..cd9805c045cb 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_binding.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_binding.h
@@ -27,9 +27,10 @@
 #ifndef _VMWGFX_BINDING_H_
 #define _VMWGFX_BINDING_H_
 
-#include "device_include/svga3d_reg.h"
 #include <linux/list.h>
 
+#include "device_include/svga3d_reg.h"
+
 #define VMW_MAX_VIEW_BINDINGS 128
 
 struct vmw_private;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
index 56979e412ca8..065015d2a8f6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
@@ -25,6 +25,9 @@
  *
  **************************************************************************/
 
+#include <linux/dmapool.h>
+#include <linux/pci.h>
+
 #include <drm/ttm/ttm_bo_api.h>
 
 #include "vmwgfx_drv.h"
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 366dcfc1f9bb..35874706ee0d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -28,20 +28,32 @@
 #ifndef _VMWGFX_DRV_H_
 #define _VMWGFX_DRV_H_
 
-#include "vmwgfx_validation.h"
-#include "vmwgfx_reg.h"
-#include <drm/drmP.h>
-#include <drm/vmwgfx_drm.h>
-#include <drm/drm_hashtab.h>
-#include <drm/drm_auth.h>
 #include <linux/suspend.h>
+#include <linux/sync_file.h>
+
+#include <drm/drm_auth.h>
+#include <drm/drm_device.h>
+#include <drm/drm_file.h>
+#include <drm/drm_hashtab.h>
+#include <drm/drm_rect.h>
+
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_execbuf_util.h>
 #include <drm/ttm/ttm_module.h>
-#include "vmwgfx_fence.h"
-#include "ttm_object.h"
+
 #include "ttm_lock.h"
-#include <linux/sync_file.h>
+#include "ttm_object.h"
+
+#include "vmwgfx_fence.h"
+#include "vmwgfx_reg.h"
+#include "vmwgfx_validation.h"
+
+/*
+ * FIXME: vmwgfx_drm.h needs to be last due to dependencies.
+ * uapi headers should not depend on header files outside uapi/.
+ */
+#include <drm/vmwgfx_drm.h>
+
 
 #define VMWGFX_DRIVER_NAME "vmwgfx"
 #define VMWGFX_DRIVER_DATE "20180704"
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
index c9382933c2b9..50e9fdd7acf1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
@@ -32,8 +32,11 @@
 
 #define VMW_FENCE_WAIT_TIMEOUT (5*HZ)
 
-struct vmw_private;
+struct drm_device;
+struct drm_file;
+struct drm_pending_event;
 
+struct vmw_private;
 struct vmw_fence_manager;
 
 /**
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index b97bc8e5944b..da2b123c6807 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -25,12 +25,16 @@
  *
  **************************************************************************/
 
-#include "vmwgfx_kms.h"
-#include <drm/drm_plane_helper.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
-#include <drm/drm_rect.h>
 #include <drm/drm_damage_helper.h>
+#include <drm/drm_fourcc.h>
+#include <drm/drm_plane_helper.h>
+#include <drm/drm_rect.h>
+#include <drm/drm_sysfs.h>
+#include <drm/drm_vblank.h>
+
+#include "vmwgfx_kms.h"
 
 /* Might need a hrtimer here? */
 #define VMWGFX_PRESENT_RATE ((HZ / 60 > 0) ? HZ / 60 : 1)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index 535b03599e55..3ee03227607c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -28,9 +28,9 @@
 #ifndef VMWGFX_KMS_H_
 #define VMWGFX_KMS_H_
 
-#include <drm/drmP.h>
 #include <drm/drm_encoder.h>
 #include <drm/drm_probe_helper.h>
+
 #include "vmwgfx_drv.h"
 
 /**
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 25e6343bcf21..5702219ec38f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -25,11 +25,13 @@
  *
  **************************************************************************/
 
-#include "vmwgfx_kms.h"
-#include <drm/drm_plane_helper.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
+#include <drm/drm_plane_helper.h>
+#include <drm/drm_vblank.h>
 
+#include "vmwgfx_kms.h"
 
 #define vmw_crtc_to_ldu(x) \
 	container_of(x, struct vmw_legacy_display_unit, base.crtc)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 9a2a3836d89a..e5a283263211 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -25,12 +25,14 @@
  *
  **************************************************************************/
 
-#include "vmwgfx_kms.h"
-#include <drm/drm_plane_helper.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_damage_helper.h>
+#include <drm/drm_fourcc.h>
+#include <drm/drm_plane_helper.h>
+#include <drm/drm_vblank.h>
 
+#include "vmwgfx_kms.h"
 
 #define vmw_crtc_to_sou(x) \
 	container_of(x, struct vmw_screen_object_unit, base.crtc)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index f803bb5e782b..41a96fb49835 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -25,12 +25,15 @@
  *
  ******************************************************************************/
 
-#include "vmwgfx_kms.h"
-#include "device_include/svga3d_surfacedefs.h"
-#include <drm/drm_plane_helper.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_damage_helper.h>
+#include <drm/drm_fourcc.h>
+#include <drm/drm_plane_helper.h>
+#include <drm/drm_vblank.h>
+
+#include "vmwgfx_kms.h"
+#include "device_include/svga3d_surfacedefs.h"
 
 #define vmw_crtc_to_stdu(x) \
 	container_of(x, struct vmw_screen_target_display_unit, base.crtc)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_validation.h b/drivers/gpu/drm/vmwgfx/vmwgfx_validation.h
index 1d2322ad6fd5..0e063743dd86 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_validation.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_validation.h
@@ -28,9 +28,10 @@
 #ifndef _VMWGFX_VALIDATION_H_
 #define _VMWGFX_VALIDATION_H_
 
-#include <drm/drm_hashtab.h>
 #include <linux/list.h>
 #include <linux/ww_mutex.h>
+
+#include <drm/drm_hashtab.h>
 #include <drm/ttm/ttm_execbuf_util.h>
 
 #define VMW_RES_DIRTY_NONE 0
-- 
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] 4+ messages in thread

* [PATCH v2 2/2] drm/vmwgfx: drop reminaing users of drmP.h
  2019-06-23 10:23 [PATCH v2 0/2] drm/vmwgfx: drop use of drmP.h Sam Ravnborg
  2019-06-23 10:23 ` [PATCH v2 1/2] drm/vmwgfx: drop use of drmP.h in header files Sam Ravnborg
@ 2019-06-23 10:23 ` Sam Ravnborg
  2019-06-25 16:53 ` [PATCH v2 0/2] drm/vmwgfx: drop use " Deepak Singh Rawat
  2 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2019-06-23 10:23 UTC (permalink / raw
  To: VMware Graphics, Thomas Hellstrom
  Cc: David Airlie, Sam Ravnborg, dri-devel, kbuild test robot

Drop use of the deprecated drmP.h file from the
remaining files.
In several cases the drmP.h include could be removed without
furter fixes. Other files required a few header files to be added.

In all files divided includes files in blocks and sort them.

v2:
- fix warning in i386 build wiht HIGHMEM disabled

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: kbuild test robot <lkp@intel.com> [warning in i386 build]
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c       |  1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c      | 17 +++++++++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c       |  8 ++++----
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c    |  3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c     |  6 ++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c      |  4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_irq.c      |  3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c      |  2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c      | 11 +++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c  |  6 ++----
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c |  5 ++---
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c |  1 -
 12 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
index 5d5c2bce01f3..e6a776bfd8b9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
@@ -28,7 +28,6 @@
 
 #include <drm/ttm/ttm_placement.h>
 
-#include <drm/drmP.h>
 #include "vmwgfx_drv.h"
 #include "ttm_object.h"
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 89b8eb047583..0f07bcfa6d2f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -24,17 +24,22 @@
  * USE OR OTHER DEALINGS IN THE SOFTWARE.
  *
  **************************************************************************/
-#include <linux/module.h>
+
 #include <linux/console.h>
 #include <linux/dma-mapping.h>
+#include <linux/module.h>
 
-#include <drm/drmP.h>
-#include "vmwgfx_drv.h"
-#include "vmwgfx_binding.h"
-#include "ttm_object.h"
-#include <drm/ttm/ttm_placement.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_ioctl.h>
+#include <drm/drm_pci.h>
+#include <drm/drm_sysfs.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_module.h>
+#include <drm/ttm/ttm_placement.h>
+
+#include "ttm_object.h"
+#include "vmwgfx_binding.h"
+#include "vmwgfx_drv.h"
 
 #define VMWGFX_DRIVER_DESC "Linux drm driver for VMware graphics devices"
 #define VMWGFX_CHIP_SVGAII 0
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 972e8fda6d35..ea29953e0b08 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -26,14 +26,14 @@
  *
  **************************************************************************/
 
-#include <linux/export.h>
+#include <linux/pci.h>
+
+#include <drm/drm_fourcc.h>
+#include <drm/ttm/ttm_placement.h>
 
-#include <drm/drmP.h>
 #include "vmwgfx_drv.h"
 #include "vmwgfx_kms.h"
 
-#include <drm/ttm/ttm_placement.h>
-
 #define VMW_DIRTY_DELAY (HZ / 30)
 
 struct vmw_fb_par {
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 301260e23e52..434dfadb0e52 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -25,7 +25,8 @@
  *
  **************************************************************************/
 
-#include <drm/drmP.h>
+#include <linux/sched/signal.h>
+
 #include "vmwgfx_drv.h"
 
 #define VMW_FENCE_WRAP (1 << 31)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index ff3586cb6851..e5252ef3812f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -25,10 +25,12 @@
  *
  **************************************************************************/
 
-#include "vmwgfx_drv.h"
-#include <drm/drmP.h>
+#include <linux/sched/signal.h>
+
 #include <drm/ttm/ttm_placement.h>
 
+#include "vmwgfx_drv.h"
+
 struct vmw_temp_set_context {
 	SVGA3dCmdHeader header;
 	SVGA3dCmdDXTempSetContext body;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
index ae7acc6f3dda..83c0d5a3e4fd 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
@@ -25,10 +25,10 @@
  *
  **************************************************************************/
 
-#include "vmwgfx_drv.h"
-#include <drm/drmP.h>
 #include <drm/ttm/ttm_bo_driver.h>
 
+#include "vmwgfx_drv.h"
+
 #define VMW_PPN_SIZE (sizeof(unsigned long))
 /* A future safe maximum remap size. */
 #define VMW_PPN_PER_REMAP ((31 * 1024) / VMW_PPN_SIZE)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
index c3ad4478266b..75f3efee21a4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
@@ -25,7 +25,8 @@
  *
  **************************************************************************/
 
-#include <drm/drmP.h>
+#include <linux/sched/signal.h>
+
 #include "vmwgfx_drv.h"
 
 #define VMW_FENCE_WRAP (1 << 24)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
index 406edc8cef35..0a6bbac00896 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+#include <linux/highmem.h>
+
 #include "vmwgfx_drv.h"
 
 /*
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
index 8b9270f31409..c9f634a4cc9e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
@@ -24,17 +24,16 @@
  *
  */
 
-
-#include <linux/slab.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/frame.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+
 #include <asm/hypervisor.h>
-#include <drm/drmP.h>
+
 #include "vmwgfx_drv.h"
 #include "vmwgfx_msg.h"
 
-
 #define MESSAGE_STATUS_SUCCESS  0x0001
 #define MESSAGE_STATUS_DORECV   0x0002
 #define MESSAGE_STATUS_CPT      0x0010
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
index d5ef8cf802de..fdb52f6d29fb 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
@@ -25,15 +25,13 @@
  *
  **************************************************************************/
 
-
-#include <drm/drmP.h>
-#include "vmwgfx_drv.h"
-
 #include <drm/ttm/ttm_placement.h>
 
 #include "device_include/svga_overlay.h"
 #include "device_include/svga_escape.h"
 
+#include "vmwgfx_drv.h"
+
 #define VMW_MAX_NUM_STREAMS 1
 #define VMW_OVERLAY_CAP_MASK (SVGA_FIFO_CAP_VIDEO | SVGA_FIFO_CAP_ESCAPE)
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index 1d38a8b2f2ec..2bfc1822d457 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -25,12 +25,11 @@
  *
  **************************************************************************/
 
-#include "vmwgfx_drv.h"
-#include <drm/vmwgfx_drm.h>
 #include <drm/ttm/ttm_placement.h>
-#include <drm/drmP.h>
+
 #include "vmwgfx_resource_priv.h"
 #include "vmwgfx_binding.h"
+#include "vmwgfx_drv.h"
 
 #define VMW_RES_EVICT_ERR_COUNT 10
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
index 8bafa6eac5a8..5a7b8bb420de 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
@@ -25,7 +25,6 @@
  *
  **************************************************************************/
 
-#include <drm/drmP.h>
 #include "vmwgfx_drv.h"
 
 int vmw_mmap(struct file *filp, struct vm_area_struct *vma)
-- 
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] 4+ messages in thread

* Re: [PATCH v2 0/2] drm/vmwgfx: drop use of drmP.h
  2019-06-23 10:23 [PATCH v2 0/2] drm/vmwgfx: drop use of drmP.h Sam Ravnborg
  2019-06-23 10:23 ` [PATCH v2 1/2] drm/vmwgfx: drop use of drmP.h in header files Sam Ravnborg
  2019-06-23 10:23 ` [PATCH v2 2/2] drm/vmwgfx: drop reminaing users of drmP.h Sam Ravnborg
@ 2019-06-25 16:53 ` Deepak Singh Rawat
  2 siblings, 0 replies; 4+ messages in thread
From: Deepak Singh Rawat @ 2019-06-25 16:53 UTC (permalink / raw
  To: Sam Ravnborg, Linux-graphics-maintainer, Thomas Hellstrom
  Cc: David Airlie, dri-devel@lists.freedesktop.org

Hi Sam,

Thanks for doing this.

Reviewed-by: Deepak Rawat <drawat@vmware.com>

I did some compile/basic run test on your patchs. Things look fine.
Will include this for vmwgfx-next so can run more automated test.

On Sun, 2019-06-23 at 12:23 +0200, Sam Ravnborg wrote:
> In two steps drop the use of drmP.h
> First patch remove drmP.h from header files and fixes fallout.
> Second patch remove drmP.h from the remaining files.
> 
> While touching the list of include files divide them in blocks
> and sort include files within the blocks.
> 
> Patches made on top of drm-misc-next, and checked that
> they apply to vmwgfx-fixes-5.2 in
> git://people.freedesktop.org/~thomash/linux
> 
> Build tested with various configs with several architectures.
> 
> v2:
> - fix warning in i386 build reported by 0-day
>   (missing include)
> 
>         Sam
> 
> Sam Ravnborg (2):
>       drm/vmwgfx: drop use of drmP.h in header files
>       drm/vmwgfx: drop reminaing users of drmP.h
> 
>  drivers/gpu/drm/vmwgfx/ttm_lock.h          |  2 +-
>  drivers/gpu/drm/vmwgfx/ttm_object.h        |  7 ++++---
>  drivers/gpu/drm/vmwgfx/vmwgfx_binding.h    |  3 ++-
>  drivers/gpu/drm/vmwgfx/vmwgfx_bo.c         |  1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c     |  3 +++
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c        | 17 +++++++++++------
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h        | 30
> +++++++++++++++++++++---------
>  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c         |  8 ++++----
>  drivers/gpu/drm/vmwgfx/vmwgfx_fence.c      |  3 ++-
>  drivers/gpu/drm/vmwgfx/vmwgfx_fence.h      |  5 ++++-
>  drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c       |  6 ++++--
>  drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c        |  4 ++--
>  drivers/gpu/drm/vmwgfx/vmwgfx_irq.c        |  3 ++-
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c        | 10 +++++++---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.h        |  2 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c        |  6 ++++--
>  drivers/gpu/drm/vmwgfx/vmwgfx_mob.c        |  2 ++
>  drivers/gpu/drm/vmwgfx/vmwgfx_msg.c        | 11 +++++------
>  drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c    |  6 ++----
>  drivers/gpu/drm/vmwgfx/vmwgfx_resource.c   |  5 ++---
>  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c       |  6 ++++--
>  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c       |  9 ++++++---
>  drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c   |  1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_validation.h |  3 ++-
>  24 files changed, 95 insertions(+), 58 deletions(-)
> 
> 

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

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

end of thread, other threads:[~2019-06-25 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-23 10:23 [PATCH v2 0/2] drm/vmwgfx: drop use of drmP.h Sam Ravnborg
2019-06-23 10:23 ` [PATCH v2 1/2] drm/vmwgfx: drop use of drmP.h in header files Sam Ravnborg
2019-06-23 10:23 ` [PATCH v2 2/2] drm/vmwgfx: drop reminaing users of drmP.h Sam Ravnborg
2019-06-25 16:53 ` [PATCH v2 0/2] drm/vmwgfx: drop use " Deepak Singh Rawat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).