aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-08-23 02:25:40 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-08-25 14:46:03 -0400
commit6dcf0de7ef10244b17442f47956a1d9fabe2abe1 (patch)
treea8240fe21fd650fd17b41bd656efa9f12abe3a20 /drivers/gpu
parenta8c798186b932e048abfd0adbec295e9a0cc847a (diff)
drm/simple-helpers: Always add planes to the state update
Our update function is hooked to the single plane, which might not get called for crtc-only updates. Which is surprising, so fix this by always adding the plane. While at it document how&when the event should be sent out better in the kerneldoc. Cc: Noralf Trønnes <noralf@tronnes.org> Cc: andrea.merello@gmail.com Tested-and-Reported-by: andrea.merello@gmail.com Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1471933540-31131-1-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_simple_kms_helper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index bada17166512..447631018426 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -34,6 +34,12 @@ static const struct drm_encoder_funcs drm_simple_kms_encoder_funcs = {
34 .destroy = drm_encoder_cleanup, 34 .destroy = drm_encoder_cleanup,
35}; 35};
36 36
37static int drm_simple_kms_crtc_check(struct drm_crtc *crtc,
38 struct drm_crtc_state *state)
39{
40 return drm_atomic_add_affected_planes(state->state, crtc);
41}
42
37static void drm_simple_kms_crtc_enable(struct drm_crtc *crtc) 43static void drm_simple_kms_crtc_enable(struct drm_crtc *crtc)
38{ 44{
39 struct drm_simple_display_pipe *pipe; 45 struct drm_simple_display_pipe *pipe;
@@ -57,6 +63,7 @@ static void drm_simple_kms_crtc_disable(struct drm_crtc *crtc)
57} 63}
58 64
59static const struct drm_crtc_helper_funcs drm_simple_kms_crtc_helper_funcs = { 65static const struct drm_crtc_helper_funcs drm_simple_kms_crtc_helper_funcs = {
66 .atomic_check = drm_simple_kms_crtc_check,
60 .disable = drm_simple_kms_crtc_disable, 67 .disable = drm_simple_kms_crtc_disable,
61 .enable = drm_simple_kms_crtc_enable, 68 .enable = drm_simple_kms_crtc_enable,
62}; 69};