drm: minimize drmP.h dependencies
Subsystems (15)
v4 cover drm: minimize drmP.h dependencies
Updated patchset, with merged patches removed.
And one patch split in merge frindly bits.
As noted in the commit message for kirin a hack
to kirin/Kconfig was required to build it on my box.
It would be good if we could have this driver covered by COMPILE_TEST.
There are likely others that could benefit from the same, but this driver got my attention as Daniel reported build errors that my setup did not trigger.
Build failed with my arm (32bit) toolchain, I did not investigate this further.
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
Build tested using arm and x86 allmodconfig
The patches are trivial but touches a lot of files, so a lot of people on cc: for the individual patches.
I expect the full series to be applied to drm-misc-next
Sam
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 (8):
drm: move drm_can_sleep() to drm_util.h
drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h drm/stm: prepare for drmP.h removal from drm_modeset_helper.h drm/hisilicon/kirin: prepare for drmP.h removal from drm_modeset_helper.h drm/arcpgu: prepare for drmP.h removal from drm_modeset_helper.h drm/bridge: cdns: prepare for drmP.h removal from drm_modeset_helper.h drmi/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h
drm: remove drmP.h from drm_modeset_helper.h
Documentation/gpu/drm-internals.rst | 9 +++++ drivers/gpu/drm/amd/amdgpu/atom.c | 2 + drivers/gpu/drm/arc/arcpgu_sim.c | 3 +- drivers/gpu/drm/ast/ast_fb.c | 2 + drivers/gpu/drm/bridge/cdns-dsi.c | 2 + drivers/gpu/drm/cirrus/cirrus_fbdev.c | 1 + drivers/gpu/drm/drm_damage_helper.c | 1 + drivers/gpu/drm/drm_flip_work.c | 1 + drivers/gpu/drm/drm_framebuffer.c | 1 + drivers/gpu/drm/drm_modeset_helper.c | 2 + drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 11 +++-- drivers/gpu/drm/mgag200/mgag200_fb.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 1 + drivers/gpu/drm/omapdrm/omap_fbdev.c | 1 + drivers/gpu/drm/qxl/qxl_cmd.c | 2 + drivers/gpu/drm/radeon/atom.c | 2 + drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 1 + drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + drivers/gpu/drm/stm/drv.c | 4 ++ drivers/gpu/drm/stm/ltdc.c | 7 ++++ drivers/gpu/drm/vc4/vc4_drv.h | 1 + include/drm/drmP.h | 19 +++------ include/drm/drm_modeset_helper.h | 6 ++- include/drm/drm_util.h | 53 ++++++++++++++++++++++++- 24 files changed, 115 insertions(+), 19 deletions(-)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 1/8 drm: move drm_can_sleep() to drm_util.h
Move drm_can_sleep() out of drmP.h to allow users
to get rid of the drmP.h include.
There was no header file that was a good match for this helper function. So add this to drm_util with the relevant includes.
Add include of drm_util.h to all users.
v2:
- Update comments to use kernel-doc style (Daniel)
- Add FIXME to drm_can_sleep and add note that this function should not be used in new code (Daniel)
v3:
- Fix kernel-doc syntax (Daniel)
- Plug drm_util.h into drm-internels.rst (Daniel)
--- Documentation/gpu/drm-internals.rst | 9 ++++++ drivers/gpu/drm/amd/amdgpu/atom.c | 2 ++ drivers/gpu/drm/ast/ast_fb.c | 2 ++ drivers/gpu/drm/cirrus/cirrus_fbdev.c | 1 + drivers/gpu/drm/drm_flip_work.c | 1 + drivers/gpu/drm/mgag200/mgag200_fb.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 1 + drivers/gpu/drm/omapdrm/omap_fbdev.c | 1 + drivers/gpu/drm/qxl/qxl_cmd.c | 2 ++ drivers/gpu/drm/radeon/atom.c | 2 ++ drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 1 + include/drm/drmP.h | 8 ----- include/drm/drm_util.h | 43 ++++++++++++++++++++++++- 14 files changed, 66 insertions(+), 9 deletions(-)
Documentation/gpu/drm-internals.rst +9 -0
@@ -233,6 +233,15 @@ Printer .. kernel-doc:: drivers/gpu/drm/drm_print.c :export: +Utilities +--------- + +.. kernel-doc:: include/drm/drm_util.h + :doc: drm utils + +.. kernel-doc:: include/drm/drm_util.h + :internal: + Legacy Support Code ===================
drivers/gpu/drm/amd/amdgpu/atom.c +2 -0
@@ -27,6 +27,8 @@#include <linux/slab.h> #include <asm/unaligned.h> +#include <drm/drm_util.h> +#define ATOM_DEBUG #include "atom.h"
drivers/gpu/drm/ast/ast_fb.c +2 -0
@@ -39,7 +39,9 @@#include <drm/drmP.h> #include <drm/drm_crtc.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_util.h> #include <drm/drm_crtc_helper.h> +#include "ast_drv.h" static void ast_dirty_update(struct ast_fbdev *afbdev,
drivers/gpu/drm/cirrus/cirrus_fbdev.c +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/module.h> #include <drm/drmP.h> +#include <drm/drm_util.h> #include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h>
drivers/gpu/drm/drm_flip_work.c +1 -0
@@ -22,6 +22,7 @@*/ #include <drm/drmP.h> +#include <drm/drm_util.h> #include <drm/drm_flip_work.h> /**
drivers/gpu/drm/mgag200/mgag200_fb.c +1 -0
@@ -12,6 +12,7 @@*/ #include <linux/module.h> #include <drm/drmP.h> +#include <drm/drm_util.h> #include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h>
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c +1 -0
@@ -16,6 +16,7 @@* this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <drm/drm_util.h> #include "mdp5_kms.h" #include "mdp5_smp.h"
drivers/gpu/drm/omapdrm/omap_fbdev.c +1 -0
@@ -16,6 +16,7 @@*/ #include <drm/drm_crtc.h> +#include <drm/drm_util.h> #include <drm/drm_fb_helper.h> #include "omap_drv.h"
drivers/gpu/drm/qxl/qxl_cmd.c +2 -0
@@ -25,6 +25,8 @@/* QXL cmd/ring handling */ +#include <drm/drm_util.h> +#include "qxl_drv.h" #include "qxl_object.h"
drivers/gpu/drm/radeon/atom.c +2 -0
@@ -27,6 +27,8 @@#include <linux/slab.h> #include <asm/unaligned.h> +#include <drm/drm_util.h> +#define ATOM_DEBUG #include "atom.h"
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +1 -0
@@ -24,6 +24,7 @@* Alex Deucher */ #include <drm/drmP.h> +#include <drm/drm_util.h> #include <drm/drm_crtc_helper.h> #include <drm/radeon_drm.h> #include "radeon.h"
drivers/gpu/drm/vc4/vc4_drv.h +1 -0
@@ -9,6 +9,7 @@#include <linux/mm_types.h> #include <linux/reservation.h> #include <drm/drmP.h> +#include <drm/drm_util.h> #include <drm/drm_encoder.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_atomic.h>
include/drm/drmP.h +0 -8
@@ -94,14 +94,6 @@ struct dma_buf_attachment;struct pci_dev ;struct pci_controller ; -/* returns true if currently okay to sleep */ -static inline bool drm_can_sleep (void ) -{ -if (in_atomic () ||in_dbg_master () ||irqs_disabled ()) -return false; -return true; -} -#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE )#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) EXPORT_SYMBOL(x)#else
include/drm/drm_util.h +42 -1
49 lines not on this page · raw message
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 1/8] drm: move drm_can_sleep() to drm_util.h
Hi Sam,
Thank you for the patch.
Quoted 53 lines · Sam Ravnborg
Move
drm_can_sleep()out ofdrmP.hto allow users
to get rid of thedrmP.hinclude.There was no header file that was a good match for this helper function. So add this to
drm_utilwith the relevant includes.Add include of
drm_util.hto all users.v2:
- Update comments to use kernel-doc style (Daniel)
- Add FIXME todrm_can_sleepand add note that this function should not be used in new code (Daniel)v3:
- Fix kernel-doc syntax (Daniel)
- Plugdrm_util.hintodrm-internels.rst(Daniel)Signed-off-by Sam Ravnborg <[email protected]>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]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc "David (ChunMing) Zhou" <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Rob Clark <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Eric Anholt <[email protected]>--- Documentation/gpu/drm-internals.rst | 9 ++++++ drivers/gpu/drm/amd/amdgpu/atom.c | 2 ++ drivers/gpu/drm/ast/ast_fb.c | 2 ++ drivers/gpu/drm/cirrus/cirrus_fbdev.c | 1 + drivers/gpu/drm/drm_flip_work.c | 1 + drivers/gpu/drm/mgag200/mgag200_fb.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 1 + drivers/gpu/drm/omapdrm/omap_fbdev.c | 1 + drivers/gpu/drm/qxl/qxl_cmd.c | 2 ++ drivers/gpu/drm/radeon/atom.c | 2 ++ drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 1 + drivers/gpu/drm/vc4/vc4_drv.h | 1 + include/drm/drmP.h | 8 ----- include/drm/drm_util.h | 43 ++++++++++++++++++++++++- 14 files changed, 66 insertions(+), 9 deletions(-)Documentation/gpu/drm-internals.rst +0
-0@@ -233,6 +233,15 @@ Printer .. kernel-doc:: drivers/gpu/drm/drm_print.c
Documentation/gpu/drm-internals.rst Printer · line 243
Quoted 10 lines
Documentation/gpu/drm-internals.rst +8
-0:export: +Utilities +--------- + +.. kernel-doc:: include/drm/drm_util.h + :doc: drm utils + +.. kernel-doc:: include/drm/drm_util.h + :internal:
Why do we need it twice ?
Quoted 4 lines
Documentation/gpu/drm-internals.rst +1
-0+ Legacy Support Code ===================
[snip]
drivers/gpu/drm/omapdrm/omap_fbdev.c line 20
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_fbdev.c +1
-0@@ -16,6 +16,7 @@*/ #include <drm/drm_crtc.h> +#include <drm/drm_util.h> #include <drm/drm_fb_helper.h>
Please keep headers alphabetically sorted, here and everywhere else in this patch. This helps locating and avoiding duplicated headers.
Quoted 1 line
drivers/gpu/drm/omapdrm/omap_fbdev.c +0
-0#include "omap_drv.h"
[snip]
include/drm/drm_util.h line 32
Quoted 13 lines
include/drm/drm_util.h +4
-1@@ -26,7 +26,48 @@#ifndef _DRM_UTIL_H_#define _DRM_UTIL_H_ -/* helper for handling conditionals in various for_each macros */ +/** +* DOC: drm utils +* +* Macros and inline functions that does not naturally belong in other places
s/does/do/
include/drm/drm_util.h line 38
Quoted 6 lines
include/drm/drm_util.h +6
-0+*/ + +#include <linux/irqflags.h> +#include <linux/preempt.h> +#include <linux/kgdb.h> +#include <linux/smp.h>
Four headers needed to use three functions, impressive :-)
Alphabetical sorted here too please (and actually everywhere in this patch series :-)).
Quoted 15 lines
include/drm/drm_util.h +13
-0+/** +* for_each_if - helper for handling conditionals in various for_each macros +* @condition: The condition to check +* +* Typical use:: +* +* #define for_each_foo_bar(x, y) \' +* list_for_each_entry(x, y->list, head) \' +* for_each_if(x->something == SOMETHING) +* +* The for_each_if() macro makes the use of for_each_foo_bar() less error +* prone. +*/ #define for_each_if (condition) if (!(condition)) {} else
include/drm/drm_util.h line 64
Quoted 10 lines
include/drm/drm_util.h +10
-0+/** +* drm_can_sleep - returns true if currently okay to sleep +* +* This function shall not be used in new code. +* The check for running in atomic context may not work - see linux/preempt.h. +* +* FIXME: All users of drm_can_sleep should be removed (see todo.rst) +* +* Returns: +* True if kgdb is active or we are in an atomic context or irqs are disabled
Did you mean False ?
With these fixed,
Quoted 9 lines
include/drm/drm_util.h +8
-0+*/ +static inline bool drm_can_sleep (void ) +{ +if (in_atomic () ||in_dbg_master () ||irqs_disabled ()) +return false; +return true; +} +#endif
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 2/8 drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
In reply to Sam RavnborgIn the quest to get rid of drmP.h move the newly added EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h. Fix the single user.
Add a note to drmP.h to avoid further use of it.
--- drivers/gpu/drm/drm_framebuffer.c | 1 + include/drm/drmP.h | 11 ++++++----- include/drm/drm_util.h | 10 ++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_framebuffer.c +1 -0
@@ -27,6 +27,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_uapi.h> #include <drm/drm_print.h> +#include <drm/drm_util.h> #include "drm_internal.h" #include "drm_crtc_internal.h"
include/drm/drmP.h +6 -5
@@ -94,10 +94,11 @@ struct dma_buf_attachment;struct pci_dev ;struct pci_controller ; -#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE ) -#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) EXPORT_SYMBOL(x) -#else -#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) -#endif +/* +* NOTE: drmP.h is obsolete - do NOT add anything to this file +* +* Do not include drmP.h in new files. +* Work is ongoing to remove drmP.h includes from existing files +*/ #endif
include/drm/drm_util.h +10 -0
@@ -37,6 +37,16 @@#include <linux/kgdb.h> #include <linux/smp.h> +/* +* Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall +* only be visible for drmselftests. +*/ +#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE ) +#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) EXPORT_SYMBOL(x) +#else +#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) +#endif +/** * for_each_if - helper for handling conditionals in various for_each macros * @condition: The condition to check
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 2/8] drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h
Hi Sam,
Thank you for the patch.
Quoted 2 lines · Sam Ravnborg
In the quest to get rid of
drmP.hmove the newly addedEXPORT_SYMBOL_FOR_TESTS_ONLYtodrm_util.h.
Would it make sense to move it to drm_internal.h as it's really for internal use of the DRM core ?
Quoted 54 lines
Fix the single user.
Add a note to
drmP.hto avoid further use of it.Signed-off-by Sam Ravnborg <[email protected]>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_framebuffer.c | 1 + include/drm/drmP.h | 11 ++++++----- include/drm/drm_util.h | 10 ++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-)drivers/gpu/drm/drm_framebuffer.c +1
-0@@ -27,6 +27,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_uapi.h> #include <drm/drm_print.h> +#include <drm/drm_util.h> #include "drm_internal.h" #include "drm_crtc_internal.h" include/drm/drmP.h +6
-5@@ -94,10 +94,11 @@ struct dma_buf_attachment;struct pci_dev ;struct pci_controller ; -#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE ) -#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) EXPORT_SYMBOL(x) -#else -#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) -#endif +/* +* NOTE: drmP.h is obsolete - do NOT add anything to this file +* +* Do not include drmP.h in new files. +* Work is ongoing to remove drmP.h includes from existing files +*/ #endif include/drm/drm_util.h +0
-0
include/drm/drm_util.h line 45
Quoted 9 lines
include/drm/drm_util.h +6
-0@@ -37,6 +37,16 @@#include <linux/kgdb.h> #include <linux/smp.h> +/* +* Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall +* only be visible for drmselftests. +*/ +#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE ) +#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) EXPORT_SYMBOL(x)
I'd make this EXPORT_SYMBOL_GPL given the internal use, but that change should be part of a separate patch.
Quoted 7 lines
include/drm/drm_util.h +4
-0+#else +#define EXPORT_SYMBOL_FOR_TESTS_ONLY (x) +#endif +/** * for_each_if - helper for handling conditionals in various for_each macros * @condition: The condition to check
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v4 3/8 drm/stm: prepare for drmP.h removal from drm_modeset_helper.h
In reply to Sam RavnborgThe use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused drm/stm 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 and x86 allmodconfig
--- drivers/gpu/drm/stm/drv.c | 4 ++++ drivers/gpu/drm/stm/ltdc.c | 7 +++++++ 2 files changed, 11 insertions(+)
drivers/gpu/drm/stm/drv.c +4 -0
@@ -9,15 +9,19 @@*/ #include <linux/component.h> +#include <linux/dma-mapping.h> +#include <linux/module.h> #include <linux/of_platform.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_drv.h> #include <drm/drm_fb_helper.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_vblank.h> #include "ltdc.h"
drivers/gpu/drm/stm/ltdc.c +7 -0
@@ -10,18 +10,25 @@#include <linux/clk.h> #include <linux/component.h> +#include <linux/interrupt.h> +#include <linux/delay.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_graph.h> +#include <linux/platform_device.h> #include <linux/reset.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.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_of.h> #include <drm/drm_bridge.h> #include <drm/drm_plane_helper.h> +#include <drm/drm_vblank.h> #include <video/videomode.h>
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v4 3/8] drm/stm: prepare for drmP.h removal from drm_modeset_helper.h
Quoted 9 lines · Sam Ravnborg
The use of
drmP.his discouraged and removal of it fromdrm_modeset_helper.hcaused drm/stm to fail to build.This patch introduce the necessary fixes to prepare for the
drmP.hremoval fromdrm_modeset_helper.h.Build tested on arm and x86 allmodconfig
Quoted 69 lines
Signed-off-by Sam Ravnborg <[email protected]>Cc Yannick Fertre <[email protected]>Cc Philippe Cornu <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/stm/drv.c | 4 ++++ drivers/gpu/drm/stm/ltdc.c | 7 +++++++ 2 files changed, 11 insertions(+)drivers/gpu/drm/stm/drv.c +4
-0@@ -9,15 +9,19 @@*/ #include <linux/component.h> +#include <linux/dma-mapping.h> +#include <linux/module.h> #include <linux/of_platform.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_drv.h> #include <drm/drm_fb_helper.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_vblank.h> #include "ltdc.h" drivers/gpu/drm/stm/ltdc.c +7
-1@@ -10,18 +10,25 @@#include <linux/clk.h> #include <linux/component.h> +#include <linux/interrupt.h> +#include <linux/delay.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_graph.h> +#include <linux/platform_device.h> #include <linux/reset.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.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_of.h> #include <drm/drm_bridge.h> #include <drm/drm_plane_helper.h> +#include <drm/drm_vblank.h> #include <video/videomode.h> --2.12.0
Signature · 11 lines
Benjamin Gaignard Graphic Study Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 4/8 drm/hisilicon/kirin: prepare for drmP.h removal from drm_modeset_helper.h
In reply to Sam RavnborgThe use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused kirin to fail to build.
This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.
List of include files sorted alphabetically.
Build tested on arm x86 allmodconfig using the following hack to the Kconfig file:
| - depends on DRM && OF && ARM64 | + depends on DRM && OF && (ARM64 || (X86_64 && COMPILE_TEST))
Build failed on 32bit ARM - so the X86_64 hack was required. The COMPILE_TEST hack is not submitted as the preferred fix is something where we have coverage on 32bit ARM too.
--- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c +8 -3
@@ -16,13 +16,18 @@*/ #include <linux/clk.h> +#include <linux/delay.h> #include <linux/component.h> +#include <linux/module.h> +#include <linux/platform_device.h> -#include <drm/drm_of.h> +#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_mipi_dsi.h> +#include <drm/drm_device.h> #include <drm/drm_encoder_slave.h> -#include <drm/drm_atomic_helper.h> +#include <drm/drm_mipi_dsi.h> +#include <drm/drm_print.h> +#include <drm/drm_of.h> #include "dw_dsi_reg.h"
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 5/8 drm/arcpgu: prepare for drmP.h removal from drm_modeset_helper.h
In reply to Sam RavnborgThe use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused arcgpu to fail to build.
This patch introduce the necessary fixes to prepare for the drmP.h removal from drm_modeset_helper.h.
List of include files sorted alphabetically.
Build tested on arm x86 and arm allmodconfig.
--- drivers/gpu/drm/arc/arcpgu_sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/arc/arcpgu_sim.c +2 -1
@@ -14,8 +14,9 @@* */ -#include <drm/drm_crtc_helper.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_crtc_helper.h> +#include <drm/drm_device.h> #include "arcpgu.h"
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RE: [PATCH v4 5/8] drm/arcpgu: prepare for drmP.h removal from drm_modeset_helper.h
Hi Sam,
Quoted 26 lines
-----Original Message-----
From: Sam Ravnborg [mailto:[email protected]] On Behalf Of Sam Ravnborg
Sent: Saturday, January 12, 2019 10:33 PM
To: Alex Deucher <[email protected]>; Alexey Brodkin <[email protected]>; Andrzej Hajda <[email protected]>; Benjamin Gaignard <[email protected]>; Chen Feng <[email protected]>; Christian Konig <[email protected]>; Daniel Vetter <[email protected]>; David Airlie <[email protected]>; David Zhou <[email protected]>; Eric Anholt <[email protected]>; Gerd Hoffmann <[email protected]>; Kieran Bingham <[email protected]>; Laurent Pinchart <[email protected]>; Laurent Pinchart <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Philippe Cornu <[email protected]>; Rob Clark <[email protected]>; Rongrong Zou <[email protected]>; Sean Paul <[email protected]>; Tomi Valkeinen <[email protected]>; Vincent Abriou <[email protected]>; Xinliang Liu <[email protected]>; Xinwei Kong <[email protected]>; Yannick Fertre <[email protected]>; [email protected]; [email protected]
Cc: Sam Ravnborg <[email protected]>
Subject: [PATCH v4 5/8] drm/arcpgu: prepare fordrmP.hremoval fromdrm_modeset_helper.hThe use of
drmP.his discouraged and removal of it fromdrm_modeset_helper.hcaused arcgpu to fail to build.This patch introduce the necessary fixes to prepare for the
drmP.hremoval fromdrm_modeset_helper.h.
List of include files sorted alphabetically.
Quoted 6 lines
Build tested on arm x86 and arm allmodconfig.
Signed-off-by Sam Ravnborg <[email protected]>Cc Alexey Brodkin <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>
Thanks for your patch!
Build tested for ARC AXS103 board.
PATCH v4 6/8 drm/bridge: cdns: prepare for drmP.h removal from drm_modeset_helper.h
In reply to Sam RavnborgThe use of drmP.h is discouraged and removal of it from drm_modeset_helper.h caused cdns 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 x86 and arm allmodconfig.
--- drivers/gpu/drm/bridge/cdns-dsi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/bridge/cdns-dsi.c +2 -0
@@ -8,11 +8,13 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_drv.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_panel.h> #include <video/mipi_display.h> #include <linux/clk.h> +#include <linux/interrupt.h> #include <linux/iopoll.h> #include <linux/module.h> #include <linux/of_address.h>
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 7/8 drmi/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h
In reply to Sam RavnborgThe 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 x86 and arm allmodconfig.
--- drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/rcar-du/rcar_lvds.c +1 -0
@@ -10,6 +10,7 @@#include <linux/clk.h> #include <linux/delay.h> #include <linux/io.h> +#include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/of_graph.h>
Signature · 6 lines
2.12.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 7/8 drmi/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h
In reply to Sam RavnborgThe 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 x86 and arm allmodconfig.
--- drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/rcar-du/rcar_lvds.c +1 -0
@@ -10,6 +10,7 @@#include <linux/clk.h> #include <linux/delay.h> #include <linux/io.h> +#include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/of_graph.h>
Signature · 1 line
2.12.0
Re: [PATCH v4 7/8] drmi/rcar-du: prepare for drmP.h removal from drm_modeset_helper.h
Hi Sam,
Thank you for the patch.
Quoted 6 lines · Sam Ravnborg
The use of
drmP.his discouraged and removal of it fromdrm_modeset_helper.hcaused rcar-du to fail to build.This patch introduce the necessary fixes to prepare for the
drmP.hremoval fromdrm_modeset_helper.h.
Quoted 7 lines
Build tested on arm x86 and arm allmodconfig.
Signed-off-by Sam Ravnborg <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Kieran Bingham <[email protected]>Cc David Airlie <[email protected]>Cc Daniel Vetter <[email protected]>
Quoted 16 lines
--- drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/rcar-du/rcar_lvds.c +1
-0@@ -10,6 +10,7 @@#include <linux/clk.h> #include <linux/delay.h> #include <linux/io.h> +#include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/of_graph.h>
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 8/8 drm: remove drmP.h from drm_modeset_helper.h
In reply to Sam RavnborgWith 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.
Include build failures fixes in drm files after the drmP.h removal.
--- drivers/gpu/drm/drm_damage_helper.c | 1 + drivers/gpu/drm/drm_modeset_helper.c | 2 ++ include/drm/drm_modeset_helper.h | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_damage_helper.c +1 -0
@@ -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
@@ -23,8 +23,10 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_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> /** * DOC: aux kms helpers
include/drm/drm_modeset_helper.h +5 -1
@@ -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 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v4 8/8 drm: remove drmP.h from drm_modeset_helper.h
In reply to Sam RavnborgWith 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.
Include build failures fixes in drm files after the drmP.h removal.
--- drivers/gpu/drm/drm_damage_helper.c | 1 + drivers/gpu/drm/drm_modeset_helper.c | 2 ++ include/drm/drm_modeset_helper.h | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_damage_helper.c +1 -0
@@ -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
@@ -23,8 +23,10 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_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> /** * DOC: aux kms helpers
include/drm/drm_modeset_helper.h +5 -1
@@ -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 · 1 line
2.12.0
Re: [PATCH v4 8/8] drm: remove drmP.h from drm_modeset_helper.h
Quoted 8 lines · Sam Ravnborg
With the removal of
drmP.hfromdrm_modeset_helper.hthedrmP.hare no longer included by any include files ininclude/drm.
ThedrmP.hfile is thus only included explicit either in .c files or in local .h files.
This makes the process of deleting thedrmP.hincludes easier as we have a more local dependency chain.
Quoted 8 lines
Include build failures fixes in drm files after the
drmP.hremoval.Signed-off-by Sam Ravnborg <[email protected]>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]>
Note that as soon as drm-intel-next lands in drm-misc-next this won't be enough. I have a patch which I think toghether with yours here should take care of things though.
I merged the first 2 patches, I'll wait with the driver ones for a few more acks first.
Thanks for respinning.
-Daniel
Quoted 53 lines
--- drivers/gpu/drm/drm_damage_helper.c | 1 + drivers/gpu/drm/drm_modeset_helper.c | 2 ++ include/drm/drm_modeset_helper.h | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_damage_helper.c +1
-0@@ -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@@ -23,8 +23,10 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_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> /** * DOC: aux kms helpers include/drm/drm_modeset_helper.h +5
-1@@ -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 · 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
Re: [PATCH v4 8/8] drm: remove drmP.h from drm_modeset_helper.h
In reply to Sam RavnborgHi Sam,
Thank you for the patch.
Quoted 9 lines · Sam Ravnborg
With the removal of
drmP.hfromdrm_modeset_helper.hthedrmP.hare no longer included by any include files ininclude/drm.
ThedrmP.hfile is thus only included explicit either in .c files or in local .h files.
This makes the process of deleting thedrmP.hincludes easier as we have a more local dependency chain.Include build failures fixes in drm files after the
drmP.hremoval.
Great work!
Quoted 56 lines
Signed-off-by Sam Ravnborg <[email protected]>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 ++ include/drm/drm_modeset_helper.h | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_damage_helper.c +1
-0@@ -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@@ -23,8 +23,10 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_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> /** * DOC: aux kms helpers include/drm/drm_modeset_helper.h +5
-1@@ -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 · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel