]> git.baikalelectronics.ru Git - kernel.git/commit
drm/crtc-helper: Fixup error handling in drm_helper_crtc_mode_set
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 2 Jul 2015 13:16:39 +0000 (15:16 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 3 Jul 2015 07:15:50 +0000 (09:15 +0200)
commitefb5566cde554864c9b8e7c979f35a7633bae9ed
tree6de0d8ae406fd66953de4e266c2b5f1348a9cf2a
parent0d3d41f2a59ff9a5c853df7ed0d01ed7c5548f28
drm/crtc-helper: Fixup error handling in drm_helper_crtc_mode_set

In

commit ed2f50602576455091b23594897950b6266476ca
Author: Daniel Stone <daniels@collabora.com>
Date:   Fri May 22 13:34:45 2015 +0100

    drm/crtc_helper: Replace open-coded CRTC state helpers

error handling code was broken, resulting in the first path not being
checked correctly. Fix this by using the same pattern as in the
transitional plane helper function drm_plane_helper_update.

v2: Simplify the cleanup code while at it too.

v3: After some debugging with John we realized that the above patch
from Daniel also accidentally removed the if (crtc_state) check. This
is legal when transitioning to atomic, when the initial state reset
isn't all wired up yet properly. Reinstate that check to fix the bug
John has hit.

Cc: Daniel Stone <daniels@collabora.com>
CC: Sean Paul <seanpaul@chromium.org>
Cc: John Hunter <zhaojunwang@pku.edu.cn>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reported-and-tested-by: John Hunter <zhaojunwang@pku.edu.cn>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc_helper.c