aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_crtc_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm_crtc_helper.h')
-rw-r--r--include/drm/drm_crtc_helper.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 6769ff6c1bc0..b29e20168b5f 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -39,6 +39,7 @@
39 39
40#include <linux/fb.h> 40#include <linux/fb.h>
41 41
42#include "drm_fb_helper.h"
42struct drm_crtc_helper_funcs { 43struct drm_crtc_helper_funcs {
43 /* 44 /*
44 * Control power levels on the CRTC. If the mode passed in is 45 * Control power levels on the CRTC. If the mode passed in is
@@ -60,6 +61,9 @@ struct drm_crtc_helper_funcs {
60 /* Move the crtc on the current fb to the given position *optional* */ 61 /* Move the crtc on the current fb to the given position *optional* */
61 int (*mode_set_base)(struct drm_crtc *crtc, int x, int y, 62 int (*mode_set_base)(struct drm_crtc *crtc, int x, int y,
62 struct drm_framebuffer *old_fb); 63 struct drm_framebuffer *old_fb);
64
65 /* reload the current crtc LUT */
66 void (*load_lut)(struct drm_crtc *crtc);
63}; 67};
64 68
65struct drm_encoder_helper_funcs { 69struct drm_encoder_helper_funcs {
@@ -79,6 +83,8 @@ struct drm_encoder_helper_funcs {
79 /* detect for DAC style encoders */ 83 /* detect for DAC style encoders */
80 enum drm_connector_status (*detect)(struct drm_encoder *encoder, 84 enum drm_connector_status (*detect)(struct drm_encoder *encoder,
81 struct drm_connector *connector); 85 struct drm_connector *connector);
86 /* disable encoder when not in use - more explicit than dpms off */
87 void (*disable)(struct drm_encoder *encoder);
82}; 88};
83 89
84struct drm_connector_helper_funcs { 90struct drm_connector_helper_funcs {
@@ -98,6 +104,7 @@ extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
98 int x, int y, 104 int x, int y,
99 struct drm_framebuffer *old_fb); 105 struct drm_framebuffer *old_fb);
100extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc); 106extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc);
107extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder);
101 108
102extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode); 109extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode);
103 110
@@ -116,10 +123,11 @@ static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
116 encoder->helper_private = (void *)funcs; 123 encoder->helper_private = (void *)funcs;
117} 124}
118 125
119static inline void drm_connector_helper_add(struct drm_connector *connector, 126static inline int drm_connector_helper_add(struct drm_connector *connector,
120 const struct drm_connector_helper_funcs *funcs) 127 const struct drm_connector_helper_funcs *funcs)
121{ 128{
122 connector->helper_private = (void *)funcs; 129 connector->helper_private = (void *)funcs;
130 return drm_fb_helper_add_connector(connector);
123} 131}
124 132
125extern int drm_helper_resume_force_mode(struct drm_device *dev); 133extern int drm_helper_resume_force_mode(struct drm_device *dev);