aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-01-08 18:13:41 -0500
committerDave Airlie <airlied@redhat.com>2015-01-08 18:13:41 -0500
commite5202a2289d746a94703ad937157d398fb2607cf (patch)
treeb0b8869adfa0e4c0dc05f7a11588e5e21a580755 /include/drm
parentb1940cd21c0f4abdce101253e860feff547291b0 (diff)
parent7552e7dd9527c41f891c87854418896eaf309c20 (diff)
Merge tag 'topic/core-stuff-2014-12-19' of git://anongit.freedesktop.org/drm-intel into drm-next
Misc drm patches with mostly polish patches from Thierry, with a bit of generic mode validation from Ville and a few other oddball things. * tag 'topic/core-stuff-2014-12-19' of git://anongit.freedesktop.org/drm-intel: (25 commits) drm: Include drm_crtc_helper.h in DocBook drm: Make drm_crtc_helper.h standalone includible drm: Move IRQ related fields to proper section drm: Remove stale comment drm: Do basic sanity checks for user modes drm: Perform basic sanity checks on probed modes drm: Reorganize probed mode validation drm/doc: Remove duplicate "by" drm/info: Remove unused code drm/cache: Use wbinvd helpers drm/plane-helper: Test for plane disable earlier drm/doc: Document drm_add_modes_noedid() usage drm: bit of spell-check / editorializing. drm: Prefer sizeof(type) over sizeof type drm: Remove useless else block drm: Remove unneeded braces for single statement blocks drm: Do not assign in if condition drm: Prefer kmalloc_array() over kmalloc() with multiply drm: Prefer kcalloc() over kzalloc() with multiply drm: Miscellaneous checkpatch whitespace cleanups ...
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h4
-rw-r--r--include/drm/drm_crtc.h2
-rw-r--r--include/drm/drm_crtc_helper.h32
-rw-r--r--include/drm/drm_modes.h6
4 files changed, 33 insertions, 11 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index e1b2e8b98af7..a5f6a1f563c4 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -744,8 +744,6 @@ struct drm_device {
744 744
745 /** \name Context support */ 745 /** \name Context support */
746 /*@{ */ 746 /*@{ */
747 bool irq_enabled; /**< True if irq handler is enabled */
748 int irq;
749 747
750 __volatile__ long context_flag; /**< Context swapping flag */ 748 __volatile__ long context_flag; /**< Context swapping flag */
751 int last_context; /**< Last current context */ 749 int last_context; /**< Last current context */
@@ -753,6 +751,8 @@ struct drm_device {
753 751
754 /** \name VBLANK IRQ support */ 752 /** \name VBLANK IRQ support */
755 /*@{ */ 753 /*@{ */
754 bool irq_enabled;
755 int irq;
756 756
757 /* 757 /*
758 * At load time, disabling the vblank interrupt won't be allowed since 758 * At load time, disabling the vblank interrupt won't be allowed since
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index b86329813ad3..291239f2fafc 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -463,7 +463,7 @@ struct drm_connector_state {
463 463
464/** 464/**
465 * struct drm_connector_funcs - control connectors on a given device 465 * struct drm_connector_funcs - control connectors on a given device
466 * @dpms: set power state (see drm_crtc_funcs above) 466 * @dpms: set power state
467 * @save: save connector state 467 * @save: save connector state
468 * @restore: restore connector state 468 * @restore: restore connector state
469 * @reset: reset connector after state has been invalidated (e.g. resume) 469 * @reset: reset connector after state has been invalidated (e.g. resume)
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 7adbb65ea8ae..e76828d81a8b 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -39,15 +39,28 @@
39 39
40#include <linux/fb.h> 40#include <linux/fb.h>
41 41
42#include <drm/drm_crtc.h>
43
42enum mode_set_atomic { 44enum mode_set_atomic {
43 LEAVE_ATOMIC_MODE_SET, 45 LEAVE_ATOMIC_MODE_SET,
44 ENTER_ATOMIC_MODE_SET, 46 ENTER_ATOMIC_MODE_SET,
45}; 47};
46 48
47/** 49/**
48 * drm_crtc_helper_funcs - helper operations for CRTCs 50 * struct drm_crtc_helper_funcs - helper operations for CRTCs
49 * @mode_fixup: try to fixup proposed mode for this connector 51 * @dpms: set power state
52 * @prepare: prepare the CRTC, called before @mode_set
53 * @commit: commit changes to CRTC, called after @mode_set
54 * @mode_fixup: try to fixup proposed mode for this CRTC
50 * @mode_set: set this mode 55 * @mode_set: set this mode
56 * @mode_set_nofb: set mode only (no scanout buffer attached)
57 * @mode_set_base: update the scanout buffer
58 * @mode_set_base_atomic: non-blocking mode set (used for kgdb support)
59 * @load_lut: load color palette
60 * @disable: disable CRTC when no longer in use
61 * @atomic_check: check for validity of an atomic state
62 * @atomic_begin: begin atomic update
63 * @atomic_flush: flush atomic update
51 * 64 *
52 * The helper operations are called by the mid-layer CRTC helper. 65 * The helper operations are called by the mid-layer CRTC helper.
53 */ 66 */
@@ -91,9 +104,17 @@ struct drm_crtc_helper_funcs {
91}; 104};
92 105
93/** 106/**
94 * drm_encoder_helper_funcs - helper operations for encoders 107 * struct drm_encoder_helper_funcs - helper operations for encoders
108 * @dpms: set power state
109 * @save: save connector state
110 * @restore: restore connector state
95 * @mode_fixup: try to fixup proposed mode for this connector 111 * @mode_fixup: try to fixup proposed mode for this connector
112 * @prepare: part of the disable sequence, called before the CRTC modeset
113 * @commit: called after the CRTC modeset
96 * @mode_set: set this mode 114 * @mode_set: set this mode
115 * @get_crtc: return CRTC that the encoder is currently attached to
116 * @detect: connection status detection
117 * @disable: disable encoder when not in use (overrides DPMS off)
97 * 118 *
98 * The helper operations are called by the mid-layer CRTC helper. 119 * The helper operations are called by the mid-layer CRTC helper.
99 */ 120 */
@@ -119,9 +140,10 @@ struct drm_encoder_helper_funcs {
119}; 140};
120 141
121/** 142/**
122 * drm_connector_helper_funcs - helper operations for connectors 143 * struct drm_connector_helper_funcs - helper operations for connectors
123 * @get_modes: get mode list for this connector 144 * @get_modes: get mode list for this connector
124 * @mode_valid (optional): is this mode valid on the given connector? 145 * @mode_valid: is this mode valid on the given connector? (optional)
146 * @best_encoder: return the preferred encoder for this connector
125 * 147 *
126 * The helper operations are called by the mid-layer CRTC helper. 148 * The helper operations are called by the mid-layer CRTC helper.
127 */ 149 */
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index 91d0582f924e..a36a5bfce2f5 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -217,9 +217,9 @@ bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
217 const struct drm_display_mode *mode2); 217 const struct drm_display_mode *mode2);
218 218
219/* for use by the crtc helper probe functions */ 219/* for use by the crtc helper probe functions */
220void drm_mode_validate_size(struct drm_device *dev, 220enum drm_mode_status drm_mode_validate_basic(const struct drm_display_mode *mode);
221 struct list_head *mode_list, 221enum drm_mode_status drm_mode_validate_size(const struct drm_display_mode *mode,
222 int maxX, int maxY); 222 int maxX, int maxY);
223void drm_mode_prune_invalid(struct drm_device *dev, 223void drm_mode_prune_invalid(struct drm_device *dev,
224 struct list_head *mode_list, bool verbose); 224 struct list_head *mode_list, bool verbose);
225void drm_mode_sort(struct list_head *mode_list); 225void drm_mode_sort(struct list_head *mode_list);