diff options
author | Sean Paul <seanpaul@chromium.org> | 2017-04-04 11:34:30 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-04-04 11:34:31 -0400 |
commit | 9eb8902e278f3314e1e9429c5f13db9e7a7a0cff (patch) | |
tree | 4c37354471b909f07c02726eba22caa56a910108 /drivers/gpu/drm/vc4 | |
parent | c829a33253e018472335b02e6d8bb1bb4213a142 (diff) | |
parent | 3c2507d308afb233dd41387b41512e7aa97535f0 (diff) | |
download | linux-9eb8902e278f3314e1e9429c5f13db9e7a7a0cff.tar.gz linux-9eb8902e278f3314e1e9429c5f13db9e7a7a0cff.tar.bz2 linux-9eb8902e278f3314e1e9429c5f13db9e7a7a0cff.zip |
Merge tag 'topic/synopsys-media-formats-2017-04-03' of git://anongit.freedesktop.org/git/drm-misc into drm-misc-next
Media formats for synopsys HDMI TX Controller
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403163544.kcw5kk52tgku5xua@art_vandelay
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_crtc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 865e9f494bcc..e8f28c9145a0 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -846,6 +846,17 @@ static void vc4_crtc_destroy_state(struct drm_crtc *crtc, drm_atomic_helper_crtc_destroy_state(crtc, state); } +static void +vc4_crtc_reset(struct drm_crtc *crtc) +{ + if (crtc->state) + __drm_atomic_helper_crtc_destroy_state(crtc->state); + + crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); + if (crtc->state) + crtc->state->crtc = crtc; +} + static const struct drm_crtc_funcs vc4_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = vc4_crtc_destroy, @@ -853,7 +864,7 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = { .set_property = NULL, .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ - .reset = drm_atomic_helper_crtc_reset, + .reset = vc4_crtc_reset, .atomic_duplicate_state = vc4_crtc_duplicate_state, .atomic_destroy_state = vc4_crtc_destroy_state, .gamma_set = vc4_crtc_gamma_set, |