Skip to contentSkip to conversation

drm: minimize drmP.h dependencies

PATCH In review Sam Ravnborg 5 participants 11 messages Jan 26, 2019 – Feb 7, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v6 cover drm: minimize drmP.h dependencies

Updated patchset, with merged patches removed, new patches added.

Quoted 1 line

From the original mail:

- drmP.h is now stripped down to include files and forward declarations.
- All header files in include/drm/ no longer include drmP.h.

The series was made on top of drm-misc-next:
f1a2a540c86441016ce3dff6590b7a09080871de ("video/hdmi: Add an enum for HDMI packet types")

Build tested using arm and x86, ia64, alpha, sparc32, sparc64 Included staging/vboxvideo in the build test - which revealed the build issues Daniel had identifed

This series include fixes to i915 as it looks in drm-misc. This series also include fixes to stagin/vboxvideo, which I expect to be committet to drm-misc due to the final patch (drmP.h removal from drm_modeset_helper.h) depending on this patch.

Daniel - thanks for being paitent and applying this piecemal.

Sam
v6:
- include fixes to vboxvideo (Daniel)
- include i915 build fixes
- revised/new rcar-du patch (lots of new build failures popped up)
- split updates to drm/*.c file to dedicated patch,
to make the final removal patch slimmer

v5:
- Rebased on top of drm-misc-next and dropped patches already merged
- Sorted list of include files where they are touched (Laurent)
- Collected ack's, reviewed by's

v4:
- Rebased on top of drm-misc-next and dropped patches already merged
- Include build test of kirin (Daniel)
- Plug drm_util.h into drm-internals.rst (Daniel)
- Fix kernel-doc syntax in drm_util.h (Daniel)
- Split removal of drmP.h from drm_modeset_helper.h
in smaller patches, to ease the merge process

v3:
- Added Acks/Reviewed annotations (thanks!)
- Add forward of drm_gem_object to drm_framebuffer.h (Noralf)
- Drop "drm: move DRM_IF_VERSION to drm_internal.h" as it is applied to drm-misc
- Drop "drm: make drm_file.h self contained" as Jan made a similar patch that was appleid to drm-misc
- Rebased on top of drm-misc-next

v2:
- DRM_SWITCH_POWER as enum (Daniel Vetter)
- Prefer forward decalration over includes (Laurent Pinchart)
- Updated drm_device to use kerneldoc style (Daniel Vetter)
- Improved commit messages (David Lechner)
- Split up patch when removing drmP.h from drm_gem_cma_helper.h
- rebased on top of drm-misc-next
- dropped patch already applied
- added reviewed-by from Laurent Pinchart (Laurent Pinchart)
- add drm_framebuffer.h patch
- add kernel-doc comments to drm_util.h
- moved EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
- added note to drmP.h not to add new stuff and not to use in new files

Sam Ravnborg (5):
staging/vboxvideo: prepare for drmP.h removal from drm_modeset_helper.h drm/i915: prepare for drmP.h removal from drm_modeset_helper.h drm/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h
drm: prepare for drmP.h removal from drm_modeset_helper.h
drm: remove drmP.h from drm_modeset_helper.h

 drivers/gpu/drm/drm_damage_helper.c       |  1 +
 drivers/gpu/drm/drm_modeset_helper.c      |  2 ++
 drivers/gpu/drm/i915/i915_drv.c           |  4 +++-
 drivers/gpu/drm/i915/intel_atomic.c       |  2 ++
 drivers/gpu/drm/i915/intel_atomic_plane.c |  2 ++
 drivers/gpu/drm/i915/intel_display.c      | 29 ++++++++++++++++-------------
 drivers/gpu/drm/i915/intel_pm.c           |  7 +++++--
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c    |  3 +++
 drivers/gpu/drm/rcar-du/rcar_du_drv.c     |  1 +
 drivers/gpu/drm/rcar-du/rcar_du_kms.c     |  2 ++
 drivers/gpu/drm/rcar-du/rcar_du_plane.c   |  2 ++
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c     |  1 +
 drivers/staging/vboxvideo/vbox_drv.c      |  6 +++++-
 drivers/staging/vboxvideo/vbox_fb.c       | 18 ++++++++++--------
 drivers/staging/vboxvideo/vbox_mode.c     |  5 ++++-
 include/drm/drm_modeset_helper.h          |  6 +++++-
 16 files changed, 64 insertions(+), 27 deletions(-)

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

PATCH v6 1/5 staging/vboxvideo: prepare for drmP.h removal from drm_modeset_helper.h

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused vboxvideo to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

In the files touched sort the include files

Build tested on x86 and arm allmodconfig / allyesconfig.

Cc Greg Kroah-Hartman <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/staging/vboxvideo/vbox_drv.c  |  6 +++++-
 drivers/staging/vboxvideo/vbox_fb.c   | 18 ++++++++++--------
 drivers/staging/vboxvideo/vbox_mode.c |  5 ++++-
 3 files changed, 19 insertions(+), 10 deletions(-)
drivers/staging/vboxvideo/vbox_drv.c +5 -1
index cc6532d8c2fa..d1b0d7b4886a 100644
@@ -7,11 +7,15 @@
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
  */
-#include <linux/module.h>
 #include <linux/console.h>
+#include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/vt_kern.h>
 
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_ioctl.h>
 
 #include "vbox_drv.h"
 
drivers/staging/vboxvideo/vbox_fb.c +10 -8
index 397496cf0bdf..83a04afd1766 100644
@@ -6,20 +6,22 @@
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected],
  */
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/sysrq.h>
 #include <linux/delay.h>
+#include <linux/errno.h>
 #include <linux/fb.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/string.h>
+#include <linux/sysrq.h>
+#include <linux/tty.h>
 
 #include <drm/drm_crtc.h>
-#include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 
 #include "vbox_drv.h"
 #include "vboxvideo.h"
drivers/staging/vboxvideo/vbox_mode.c +4 -1
index 1aaff02c07ff..213551394495 100644
@@ -10,14 +10,17 @@
  *          Hans de Goede <[email protected]>
  */
 #include <linux/export.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_probe_helper.h>
+#include <drm/drm_vblank.h>
 
+#include "hgsmi_channels.h"
 #include "vbox_drv.h"
 #include "vboxvideo.h"
-#include "hgsmi_channels.h"
 
 /*
  * Set a graphics mode.  Poke any required values into registers, do an HGSMI
Signature · 6 lines
2.12.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH v6 1/5] staging/vboxvideo: prepare for drmP.h removal from drm_modeset_helper.h

Quoted 6 lines · Sam Ravnborg

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused vboxvideo to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

Quoted 8 lines

In the files touched sort the include files

Build tested on x86 and arm allmodconfig / allyesconfig.

Cc Greg Kroah-Hartman <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Daniel Vetter <[email protected]>

Hi Greg,

Ack for merging this through drm-misc? I think we've defacto-maintained vboxvideo in drm anyway this release ...
-Daniel

Quoted 88 lines
---
 drivers/staging/vboxvideo/vbox_drv.c  |  6 +++++-
 drivers/staging/vboxvideo/vbox_fb.c   | 18 ++++++++++--------
 drivers/staging/vboxvideo/vbox_mode.c |  5 ++++-
 3 files changed, 19 insertions(+), 10 deletions(-)
drivers/staging/vboxvideo/vbox_drv.c +5 -1
index cc6532d8c2fa..d1b0d7b4886a 100644
@@ -7,11 +7,15 @@
  *          Michael Thayer <[email protected],
  *          Hans de Goede <[email protected]>
  */
-#include <linux/module.h>
 #include <linux/console.h>
+#include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/vt_kern.h>
 
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_ioctl.h>
 
 #include "vbox_drv.h"
 
drivers/staging/vboxvideo/vbox_fb.c +10 -8
index 397496cf0bdf..83a04afd1766 100644
@@ -6,20 +6,22 @@
  * Authors: Dave Airlie <[email protected]>
  *          Michael Thayer <[email protected],
  */
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/sysrq.h>
 #include <linux/delay.h>
+#include <linux/errno.h>
 #include <linux/fb.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/pci.h>
+#include <linux/string.h>
+#include <linux/sysrq.h>
+#include <linux/tty.h>
 
 #include <drm/drm_crtc.h>
-#include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 
 #include "vbox_drv.h"
 #include "vboxvideo.h"
drivers/staging/vboxvideo/vbox_mode.c +4 -1
index 1aaff02c07ff..213551394495 100644
@@ -10,14 +10,17 @@
  *          Hans de Goede <[email protected]>
  */
 #include <linux/export.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_probe_helper.h>
+#include <drm/drm_vblank.h>
 
+#include "hgsmi_channels.h"
 #include "vbox_drv.h"
 #include "vboxvideo.h"
-#include "hgsmi_channels.h"
 
 /*
  * Set a graphics mode.  Poke any required values into registers, do an HGSMI
Signature · 1 line
2.12.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
maintainer Acked-by
#3 lore raw

Re: [PATCH v6 1/5] staging/vboxvideo: prepare for drmP.h removal from drm_modeset_helper.h

Quoted 16 lines · Daniel Vetter
Quoted 6 lines · Sam Ravnborg

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused vboxvideo to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

Quoted 8 lines

In the files touched sort the include files

Build tested on x86 and arm allmodconfig / allyesconfig.

Cc Greg Kroah-Hartman <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Daniel Vetter <[email protected]>
Quoted 4 lines

Hi Greg,

Ack for merging this through drm-misc? I think we've defacto-maintained vboxvideo in drm anyway this release ...

Sorry, feel free to just always take this type of stuff without my ack, I can merge around you if I ever have any problems.

#4 lore raw

PATCH v6 2/5 drm/i915: prepare for drmP.h removal from drm_modeset_helper.h

In reply to Sam Ravnborg

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused i915 to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

In the files touched the lists of include files was grouped and sorted.

Build tested on x86 and arm allmodconfig / allyesconfig.

Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c           |  4 +++-
 drivers/gpu/drm/i915/intel_atomic.c       |  2 ++
 drivers/gpu/drm/i915/intel_atomic_plane.c |  2 ++
 drivers/gpu/drm/i915/intel_display.c      | 29 ++++++++++++++++-------------
 drivers/gpu/drm/i915/intel_pm.c           |  7 +++++--
 5 files changed, 28 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
index 9883921013b1..8c8f36a91e7e 100644
@@ -41,8 +41,10 @@
 #include <linux/vt.h>
 #include <acpi/video.h>
 
-#include <drm/drm_probe_helper.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_ioctl.h>
+#include <drm/drm_irq.h>
+#include <drm/drm_probe_helper.h>
 #include <drm/i915_drm.h>
 
 #include "i915_drv.h"
drivers/gpu/drm/i915/intel_atomic.c +2 -0
index d8dbc9980281..f415ed239184 100644
@@ -31,7 +31,9 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
+
 #include "intel_drv.h"
 
 /**
drivers/gpu/drm/i915/intel_atomic_plane.c +2 -0
index 683a75dad4fb..79139d496c78 100644
@@ -32,7 +32,9 @@
  */
 
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
+
 #include "intel_drv.h"
 
 struct intel_plane *intel_plane_alloc(void)
drivers/gpu/drm/i915/intel_display.c +16 -13
index 15d758cd0c1b..e0f40be07131 100644
@@ -24,29 +24,32 @@
  *	Eric Anholt <[email protected]>
  */
 
-#include <linux/module.h>
-#include <linux/input.h>
 #include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/intel-iommu.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/reservation.h>
 #include <linux/slab.h>
 #include <linux/vgaarb.h>
-#include <drm/drm_edid.h>
-#include "intel_drv.h"
-#include "intel_frontbuffer.h"
-#include <drm/i915_drm.h>
-#include "i915_drv.h"
-#include "i915_gem_clflush.h"
-#include "intel_dsi.h"
-#include "i915_trace.h"
+
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_atomic_uapi.h>
 #include <drm/drm_dp_helper.h>
+#include <drm/drm_edid.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_rect.h>
-#include <drm/drm_atomic_uapi.h>
-#include <linux/intel-iommu.h>
-#include <linux/reservation.h>
+#include <drm/i915_drm.h>
+
+#include "i915_drv.h"
+#include "i915_gem_clflush.h"
+#include "i915_trace.h"
+#include "intel_drv.h"
+#include "intel_dsi.h"
+#include "intel_frontbuffer.h"
 
 /* Primary plane formats for gen <= 3 */
 static const uint32_t i8xx_primary_formats[] = {
drivers/gpu/drm/i915/intel_pm.c +5 -2
index 83b01cde8113..48c755dc895b 100644
@@ -26,13 +26,16 @@
  */
 
 #include <linux/cpufreq.h>
+#include <linux/module.h>
 #include <linux/pm_runtime.h>
+
+#include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
+
 #include "i915_drv.h"
 #include "intel_drv.h"
 #include "../../../platform/x86/intel_ips.h"
-#include <linux/module.h>
-#include <drm/drm_atomic_helper.h>
 
 /**
  * DOC: RC6
Signature · 6 lines
2.12.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Acked-by on v6 2/5
#5 lore raw

Re: [PATCH v6 2/5] drm/i915: prepare for drmP.h removal from drm_modeset_helper.h

Quoted 11 lines · Sam Ravnborg

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused i915 to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

In the files touched the lists of include files was grouped and sorted.

Build tested on x86 and arm allmodconfig / allyesconfig.

Quoted 7 lines
Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>

Not going to second-guess the compiler, looks good to me,

and good to merge via whichever tree you see fit.

Quoted 125 lines
---
 drivers/gpu/drm/i915/i915_drv.c           |  4 +++-
 drivers/gpu/drm/i915/intel_atomic.c       |  2 ++
 drivers/gpu/drm/i915/intel_atomic_plane.c |  2 ++
 drivers/gpu/drm/i915/intel_display.c      | 29 ++++++++++++++++-------------
 drivers/gpu/drm/i915/intel_pm.c           |  7 +++++--
 5 files changed, 28 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +3 -1
index 9883921013b1..8c8f36a91e7e 100644
@@ -41,8 +41,10 @@
 #include <linux/vt.h>
 #include <acpi/video.h>
 
-#include <drm/drm_probe_helper.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_ioctl.h>
+#include <drm/drm_irq.h>
+#include <drm/drm_probe_helper.h>
 #include <drm/i915_drm.h>
 
 #include "i915_drv.h"
drivers/gpu/drm/i915/intel_atomic.c +2 -0
index d8dbc9980281..f415ed239184 100644
@@ -31,7 +31,9 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
+
 #include "intel_drv.h"
 
 /**
drivers/gpu/drm/i915/intel_atomic_plane.c +2 -0
index 683a75dad4fb..79139d496c78 100644
@@ -32,7 +32,9 @@
  */
 
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
+
 #include "intel_drv.h"
 
 struct intel_plane *intel_plane_alloc(void)
drivers/gpu/drm/i915/intel_display.c +16 -13
index 15d758cd0c1b..e0f40be07131 100644
@@ -24,29 +24,32 @@
  *	Eric Anholt <[email protected]>
  */
 
-#include <linux/module.h>
-#include <linux/input.h>
 #include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/intel-iommu.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/reservation.h>
 #include <linux/slab.h>
 #include <linux/vgaarb.h>
-#include <drm/drm_edid.h>
-#include "intel_drv.h"
-#include "intel_frontbuffer.h"
-#include <drm/i915_drm.h>
-#include "i915_drv.h"
-#include "i915_gem_clflush.h"
-#include "intel_dsi.h"
-#include "i915_trace.h"
+
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_atomic_uapi.h>
 #include <drm/drm_dp_helper.h>
+#include <drm/drm_edid.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_rect.h>
-#include <drm/drm_atomic_uapi.h>
-#include <linux/intel-iommu.h>
-#include <linux/reservation.h>
+#include <drm/i915_drm.h>
+
+#include "i915_drv.h"
+#include "i915_gem_clflush.h"
+#include "i915_trace.h"
+#include "intel_drv.h"
+#include "intel_dsi.h"
+#include "intel_frontbuffer.h"
 
 /* Primary plane formats for gen <= 3 */
 static const uint32_t i8xx_primary_formats[] = {
drivers/gpu/drm/i915/intel_pm.c +5 -2
index 83b01cde8113..48c755dc895b 100644
@@ -26,13 +26,16 @@
  */
 
 #include <linux/cpufreq.h>
+#include <linux/module.h>
 #include <linux/pm_runtime.h>
+
+#include <drm/drm_atomic_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_plane_helper.h>
+
 #include "i915_drv.h"
 #include "intel_drv.h"
 #include "../../../platform/x86/intel_ips.h"
-#include <linux/module.h>
-#include <drm/drm_atomic_helper.h>
 
 /**
  * DOC: RC6
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#6 lore raw

PATCH v6 3/5 drm/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h

In reply to Sam Ravnborg

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused rcar-du to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

Build tested on arm allmodconfig/allyesconfig.

v2:
- new patch. Changes like drm_probe_helper and other required several updates

Cc Laurent Pinchart <[email protected]>
Cc Kieran Bingham <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c  | 3 +++
 drivers/gpu/drm/rcar-du/rcar_du_drv.c   | 1 +
 drivers/gpu/drm/rcar-du/rcar_du_kms.c   | 2 ++
 drivers/gpu/drm/rcar-du/rcar_du_plane.c | 2 ++
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c   | 1 +
 5 files changed, 9 insertions(+)
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +3 -0
index 93ee0020c9b1..4d1e5098b70e 100644
@@ -9,14 +9,17 @@
 
 #include <linux/clk.h>
 #include <linux/mutex.h>
+#include <linux/platform_device.h>
 #include <linux/sys_soc.h>
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_vblank.h>
 
 #include "rcar_du_crtc.h"
 #include "rcar_du_drv.h"
drivers/gpu/drm/rcar-du/rcar_du_drv.c +1 -0
index abd70d2931b0..75ab17af13a9 100644
@@ -20,6 +20,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_probe_helper.h>
 
drivers/gpu/drm/rcar-du/rcar_du_kms.c +2 -0
index 663ab98d1f97..18d21bc1d265 100644
@@ -10,10 +10,12 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_probe_helper.h>
+#include <drm/drm_vblank.h>
 
 #include <linux/of_graph.h>
 #include <linux/wait.h>
drivers/gpu/drm/rcar-du/rcar_du_plane.c +2 -0
index 321ac80b48d3..c6430027169f 100644
@@ -10,7 +10,9 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_device.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_plane_helper.h>
 
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +1 -0
index 76a39eee7c9c..0878accbd134 100644
@@ -13,6 +13,7 @@
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_vblank.h>
 
 #include <linux/bitops.h>
 #include <linux/dma-mapping.h>
Signature · 6 lines
2.12.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

PATCH v6 4/5 drm: prepare for drmP.h removal from drm_modeset_helper.h

In reply to Sam Ravnborg

The use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused drm/ to fail to build.

This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.

Build tested on x86, arm, alpha, ia64 allmodconfig/allyesconfig.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/drm_damage_helper.c  | 1 +
 drivers/gpu/drm/drm_modeset_helper.c | 2 ++
 2 files changed, 3 insertions(+)
drivers/gpu/drm/drm_damage_helper.c +1 -0
index e16aa5ae00b4..ee67c96841fa 100644
@@ -32,6 +32,7 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_damage_helper.h>
+#include <drm/drm_device.h>
 
 /**
  * DOC: overview
drivers/gpu/drm/drm_modeset_helper.c +2 -0
index 890eee07892d..da483125e063 100644
@@ -22,8 +22,10 @@
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_fourcc.h>
 #include <drm/drm_modeset_helper.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
 
 /**
Signature · 6 lines
2.12.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

PATCH v6 5/5 drm: remove drmP.h from drm_modeset_helper.h

In reply to Sam Ravnborg

With the removal of drmP.h from drm_modeset_helper.h the drmP.h are no longer included by any include files in include/drm.
The drmP.h file is thus only included explicit either in .c files or in local .h files.
This makes the process of deleting the drmP.h includes easier as we have a more local dependency chain.

v2:
- moved updates of .c files in drm/ to a dedicated patch. This allows the updates to the *.c files to be committed without the removal part. So this patch can wait if it causes build failures due to pending changes

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Sean Paul <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 include/drm/drm_modeset_helper.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/drm/drm_modeset_helper.h +5 -1
index efa337f03129..995fd981cab0 100644
@@ -23,7 +23,11 @@
 #ifndef __DRM_KMS_HELPER_H__
 #define __DRM_KMS_HELPER_H__
 
-#include <drm/drmP.h>
+struct drm_crtc;
+struct drm_crtc_funcs;
+struct drm_device;
+struct drm_framebuffer;
+struct drm_mode_fb_cmd2;
 
 void drm_helper_move_panel_connectors_to_head(struct drm_device *);
 
Signature · 6 lines
2.12.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

✗ Fi.CI.BAT: failure for drm: minimize drmP.h dependencies

In reply to Sam Ravnborg
== Series Details ==

== Series Details ==

Series: drm: minimize drmP.h dependencies
URL : https://patchwork.freedesktop.org/series/55776/
State : failure

== Summary ==

Applying: staging/vboxvideo: prepare for drmP.h removal from drm_modeset_helper.h
Applying: drm/i915: prepare for drmP.h removal from drm_modeset_helper.h Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_drv.c
M drivers/gpu/drm/i915/intel_atomic.c
M drivers/gpu/drm/i915/intel_atomic_plane.c
M drivers/gpu/drm/i915/intel_display.c
M drivers/gpu/drm/i915/intel_pm.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/intel_pm.c
Auto-merging drivers/gpu/drm/i915/intel_display.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c Auto-merging drivers/gpu/drm/i915/intel_atomic_plane.c
Auto-merging drivers/gpu/drm/i915/intel_atomic.c
Auto-merging drivers/gpu/drm/i915/i915_drv.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 drm/i915: prepare for drmP.h removal from drm_modeset_helper.h When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw
In reply to Sam Ravnborg
Quoted 10 lines · Sam Ravnborg

Updated patchset, with merged patches removed, new patches added.

Quoted 1 line

From the original mail:

- drmP.h is now stripped down to include files and forward declarations.
- All header files in include/drm/ no longer include drmP.h.

The series was made on top of drm-misc-next:
f1a2a540c86441016ce3dff6590b7a09080871de ("video/hdmi: Add an enum for HDMI packet types")

Entire series applied to drm-misc-next, and this time around nothing new popped up! Thanks for sticking through this.

Cheers, Daniel

Quoted 78 lines

Build tested using arm and x86, ia64, alpha, sparc32, sparc64 Included staging/vboxvideo in the build test - which revealed the build issues Daniel had identifed

This series include fixes to i915 as it looks in drm-misc. This series also include fixes to stagin/vboxvideo, which I expect to be committet to drm-misc due to the final patch (drmP.h removal from drm_modeset_helper.h) depending on this patch.

Daniel - thanks for being paitent and applying this piecemal.

Sam
v6:
- include fixes to vboxvideo (Daniel)
- include i915 build fixes
- revised/new rcar-du patch (lots of new build failures popped up)
- split updates to drm/*.c file to dedicated patch,
to make the final removal patch slimmer

v5:
- Rebased on top of drm-misc-next and dropped patches already merged
- Sorted list of include files where they are touched (Laurent)
- Collected ack's, reviewed by's

v4:
- Rebased on top of drm-misc-next and dropped patches already merged
- Include build test of kirin (Daniel)
- Plug drm_util.h into drm-internals.rst (Daniel)
- Fix kernel-doc syntax in drm_util.h (Daniel)
- Split removal of drmP.h from drm_modeset_helper.h
in smaller patches, to ease the merge process

v3:
- Added Acks/Reviewed annotations (thanks!)
- Add forward of drm_gem_object to drm_framebuffer.h (Noralf)
- Drop "drm: move DRM_IF_VERSION to drm_internal.h" as it is applied to drm-misc
- Drop "drm: make drm_file.h self contained" as Jan made a similar patch that was appleid to drm-misc
- Rebased on top of drm-misc-next

v2:
- DRM_SWITCH_POWER as enum (Daniel Vetter)
- Prefer forward decalration over includes (Laurent Pinchart)
- Updated drm_device to use kerneldoc style (Daniel Vetter)
- Improved commit messages (David Lechner)
- Split up patch when removing drmP.h from drm_gem_cma_helper.h
- rebased on top of drm-misc-next
- dropped patch already applied
- added reviewed-by from Laurent Pinchart (Laurent Pinchart)
- add drm_framebuffer.h patch
- add kernel-doc comments to drm_util.h
- moved EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
- added note to drmP.h not to add new stuff and not to use in new files

Sam Ravnborg (5):
staging/vboxvideo: prepare for drmP.h removal from drm_modeset_helper.h drm/i915: prepare for drmP.h removal from drm_modeset_helper.h drm/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h
drm: prepare for drmP.h removal from drm_modeset_helper.h
drm: remove drmP.h from drm_modeset_helper.h

 drivers/gpu/drm/drm_damage_helper.c       |  1 +
 drivers/gpu/drm/drm_modeset_helper.c      |  2 ++
 drivers/gpu/drm/i915/i915_drv.c           |  4 +++-
 drivers/gpu/drm/i915/intel_atomic.c       |  2 ++
 drivers/gpu/drm/i915/intel_atomic_plane.c |  2 ++
 drivers/gpu/drm/i915/intel_display.c      | 29 ++++++++++++++++-------------
 drivers/gpu/drm/i915/intel_pm.c           |  7 +++++--
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c    |  3 +++
 drivers/gpu/drm/rcar-du/rcar_du_drv.c     |  1 +
 drivers/gpu/drm/rcar-du/rcar_du_kms.c     |  2 ++
 drivers/gpu/drm/rcar-du/rcar_du_plane.c   |  2 ++
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c     |  1 +
 drivers/staging/vboxvideo/vbox_drv.c      |  6 +++++-
 drivers/staging/vboxvideo/vbox_fb.c       | 18 ++++++++++--------
 drivers/staging/vboxvideo/vbox_mode.c     |  5 ++++-
 include/drm/drm_modeset_helper.h          |  6 +++++-
 16 files changed, 64 insertions(+), 27 deletions(-)
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx