aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c5
-rw-r--r--include/drm/drm_crtc_helper.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 9c528bbcd8d2..28aa87510551 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -723,7 +723,7 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
723 723
724 funcs = crtc->helper_private; 724 funcs = crtc->helper_private;
725 725
726 if (crtc->state->enable) { 726 if (crtc->state->enable && funcs->mode_set_nofb) {
727 DRM_DEBUG_ATOMIC("modeset on [CRTC:%d]\n", 727 DRM_DEBUG_ATOMIC("modeset on [CRTC:%d]\n",
728 crtc->base.id); 728 crtc->base.id);
729 729
@@ -759,7 +759,8 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
759 * Each encoder has at most one connector (since we always steal 759 * Each encoder has at most one connector (since we always steal
760 * it away), so we won't call call mode_set hooks twice. 760 * it away), so we won't call call mode_set hooks twice.
761 */ 761 */
762 funcs->mode_set(encoder, mode, adjusted_mode); 762 if (funcs->mode_set)
763 funcs->mode_set(encoder, mode, adjusted_mode);
763 764
764 if (encoder->bridge && encoder->bridge->funcs->mode_set) 765 if (encoder->bridge && encoder->bridge->funcs->mode_set)
765 encoder->bridge->funcs->mode_set(encoder->bridge, 766 encoder->bridge->funcs->mode_set(encoder->bridge,
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index c250a22b39ab..92d5135b55d2 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -89,6 +89,7 @@ struct drm_crtc_helper_funcs {
89 int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode, 89 int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,
90 struct drm_display_mode *adjusted_mode, int x, int y, 90 struct drm_display_mode *adjusted_mode, int x, int y,
91 struct drm_framebuffer *old_fb); 91 struct drm_framebuffer *old_fb);
92 /* Actually set the mode for atomic helpers, optional */
92 void (*mode_set_nofb)(struct drm_crtc *crtc); 93 void (*mode_set_nofb)(struct drm_crtc *crtc);
93 94
94 /* Move the crtc on the current fb to the given position *optional* */ 95 /* Move the crtc on the current fb to the given position *optional* */
@@ -119,7 +120,7 @@ struct drm_crtc_helper_funcs {
119 * @mode_fixup: try to fixup proposed mode for this connector 120 * @mode_fixup: try to fixup proposed mode for this connector
120 * @prepare: part of the disable sequence, called before the CRTC modeset 121 * @prepare: part of the disable sequence, called before the CRTC modeset
121 * @commit: called after the CRTC modeset 122 * @commit: called after the CRTC modeset
122 * @mode_set: set this mode 123 * @mode_set: set this mode, optional for atomic helpers
123 * @get_crtc: return CRTC that the encoder is currently attached to 124 * @get_crtc: return CRTC that the encoder is currently attached to
124 * @detect: connection status detection 125 * @detect: connection status detection
125 * @disable: disable encoder when not in use (overrides DPMS off) 126 * @disable: disable encoder when not in use (overrides DPMS off)