drm: move drm_can_sleep() to drm_util.h
Subsystems (9)
DRM drivers DRM misc Radeon and amdgpu DRM drivers DRM driver for Qualcomm display hardware +5 more subsystems
PATCH v2 6/14 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.
Update comments to use kernel-doc style.
Add FIXME to drm_can_sleep and add note
that this function should not be used in new code
Add include of drm_util.h to all users.
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]>
--- 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 | 42 ++++++++++++++++++++++++- 13 files changed, 56 insertions(+), 9 deletions(-)
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 +41 -1
48 lines not on this page · raw message
Signature · 1 line
2.12.0