Commit e9eafcb5 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Daniel Vetter
Browse files

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)

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190112193251.20450-2-sam@ravnborg.org
parent f5d5ef72
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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
===================
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@
#include <linux/slab.h>
#include <asm/unaligned.h>

#include <drm/drm_util.h>

#define ATOM_DEBUG

#include "atom.h"
+2 −0
Original line number Diff line number Diff line
@@ -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,
+1 −0
Original line number Diff line number Diff line
@@ -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>

+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 */

#include <drm/drmP.h>
#include <drm/drm_util.h>
#include <drm/drm_flip_work.h>

/**
Loading