aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-11-10 18:28:44 -0500
committerDave Airlie <airlied@redhat.com>2016-11-10 18:28:44 -0500
commit3e91168a6a76f7e21c44f04ebf953589ca59f03c (patch)
tree27b12142f17fc575fd40825b91e7e8773994f13d /include/drm/drmP.h
parentdb8feb6979e91c2e916631a75dbfe9f10f6b05e5 (diff)
parent4b514e10157a8e34a5e909487ef6fb8342e2e3ad (diff)
Merge tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel into drm-next
- better atomic state debugging from Rob - fence prep from gustavo - sumits flushed out his backlog of pending dma-buf/fence patches from various people - drm_mm leak debugging plus trying to appease Kconfig (Chris) - a few misc things all over * tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel: (35 commits) drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT drm/i915: Restrict DRM_DEBUG_MM automatic selection drm: Restrict stackdepot usage to builtin drm.ko drm/msm: module param to dump state on error irq drm/msm/mdp5: add atomic_print_state support drm/atomic: add debugfs file to dump out atomic state drm/atomic: add new drm_debug bit to dump atomic state drm: add helpers to go from plane state to drm_rect drm: add helper for printing to log or seq_file drm: helper macros to print composite types reservation: revert "wait only with non-zero timeout specified (v3)" v2 drm/ttm: fix ttm_bo_wait dma-buf/fence: revert "don't wait when specified timeout is zero" (v2) dma-buf/fence: make timeout handling in fence_default_wait consistent (v2) drm/amdgpu: add the interface of waiting multiple fences (v4) dma-buf: return index of the first signaled fence (v2) MAINTAINERS: update Sync File Framework files dma-buf/sw_sync: put fence reference from the fence creation dma-buf/sw_sync: mark sync_timeline_create() static drm: Add stackdepot include for DRM_DEBUG_MM ...
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index e336e3901876..4e58137c1882 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -135,6 +135,7 @@ struct dma_buf_attachment;
135#define DRM_UT_PRIME 0x08 135#define DRM_UT_PRIME 0x08
136#define DRM_UT_ATOMIC 0x10 136#define DRM_UT_ATOMIC 0x10
137#define DRM_UT_VBL 0x20 137#define DRM_UT_VBL 0x20
138#define DRM_UT_STATE 0x40
138 139
139extern __printf(6, 7) 140extern __printf(6, 7)
140void drm_dev_printk(const struct device *dev, const char *level, 141void drm_dev_printk(const struct device *dev, const char *level,
@@ -306,6 +307,27 @@ void drm_printk(const char *level, unsigned int category,
306#define DRM_DEBUG_PRIME_RATELIMITED(fmt, args...) \ 307#define DRM_DEBUG_PRIME_RATELIMITED(fmt, args...) \
307 DRM_DEV_DEBUG_PRIME_RATELIMITED(NULL, fmt, ##args) 308 DRM_DEV_DEBUG_PRIME_RATELIMITED(NULL, fmt, ##args)
308 309
310/* Format strings and argument splitters to simplify printing
311 * various "complex" objects
312 */
313#define DRM_MODE_FMT "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
314#define DRM_MODE_ARG(m) \
315 (m)->base.id, (m)->name, (m)->vrefresh, (m)->clock, \
316 (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \
317 (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \
318 (m)->type, (m)->flags
319
320#define DRM_RECT_FMT "%dx%d%+d%+d"
321#define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1
322
323/* for rect's in fixed-point format: */
324#define DRM_RECT_FP_FMT "%d.%06ux%d.%06u%+d.%06u%+d.%06u"
325#define DRM_RECT_FP_ARG(r) \
326 drm_rect_width(r) >> 16, ((drm_rect_width(r) & 0xffff) * 15625) >> 10, \
327 drm_rect_height(r) >> 16, ((drm_rect_height(r) & 0xffff) * 15625) >> 10, \
328 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
329 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
330
309/*@}*/ 331/*@}*/
310 332
311/***********************************************************************/ 333/***********************************************************************/
@@ -941,8 +963,13 @@ static inline bool drm_is_primary_client(const struct drm_file *file_priv)
941extern int drm_ioctl_permit(u32 flags, struct drm_file *file_priv); 963extern int drm_ioctl_permit(u32 flags, struct drm_file *file_priv);
942extern long drm_ioctl(struct file *filp, 964extern long drm_ioctl(struct file *filp,
943 unsigned int cmd, unsigned long arg); 965 unsigned int cmd, unsigned long arg);
966#ifdef CONFIG_COMPAT
944extern long drm_compat_ioctl(struct file *filp, 967extern long drm_compat_ioctl(struct file *filp,
945 unsigned int cmd, unsigned long arg); 968 unsigned int cmd, unsigned long arg);
969#else
970/* Let drm_compat_ioctl be assigned to .compat_ioctl unconditionally */
971#define drm_compat_ioctl NULL
972#endif
946extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags); 973extern bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
947 974
948/* File Operations (drm_fops.c) */ 975/* File Operations (drm_fops.c) */