Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d78aa650 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm: Add drm/drm_util.h header file



We have a bunch of neat little macros all over the place which should
move to kernel.h. But some of them died in bikesheds on lkml, and we
need a decent home for them.

Start out by moving the for_each_if macro there.

v2: Rename to drm_util.h instead (Dave&Sean)

Cc: Sean Paul <seanpaul@chromium.org>
Acked-by: default avatarSean Paul <seanpaul@chromium.org>
Cc: Dave Airlie <airlied@gmail.com>
Acked-by: default avatarDave Airlie <airlied@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-1-daniel.vetter@ffwll.ch
parent c9527f0d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
#include <drm/drm_gem.h>
#include <drm/drm_auth.h>
#include <drm/drm_cache.h>
#include <drm/drm_util.h>

#include "i915_params.h"
#include "i915_reg.h"
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
#ifndef _INTEL_DISPLAY_H_
#define _INTEL_DISPLAY_H_

#include <drm/drm_util.h>

enum pipe {
	INVALID_PIPE = -1,

+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@
#ifndef _INTEL_RINGBUFFER_H_
#define _INTEL_RINGBUFFER_H_

#include <drm/drm_util.h>

#include <linux/hashtable.h>
#include <linux/seqlock.h>

+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
#include <drm/drm_edid.h>
#include <drm/drm_encoder.h>
#include <drm/drm_dp_helper.h>
#include <drm/drm_util.h>

#include "nouveau_crtc.h"
#include "nouveau_encoder.h"

+0 −3
Original line number Diff line number Diff line
@@ -110,7 +110,4 @@ static inline bool drm_can_sleep(void)
	return true;
}

/* helper for handling conditionals in various for_each macros */
#define for_each_if(condition) if (!(condition)) {} else

#endif
Loading