Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/dpu: Replace dpu_crtc_reset by atomic helper

Since we removed all suspend logic from the crtc code (see patch 3/4),
dpu_crtc_reset does the same things as drm_atomic_helper_crtc_reset, so let's
just replace it with a call to the atomic helper.

v3: added patch to patchset

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Bruce Wang <bzwang@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Bruce Wang and committed by
Rob Clark
9a5e3fce 7a007a12

+1 -38
+1 -38
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
··· 844 844 return &cstate->base; 845 845 } 846 846 847 - /** 848 - * dpu_crtc_reset - reset hook for CRTCs 849 - * Resets the atomic state for @crtc by freeing the state pointer (which might 850 - * be NULL, e.g. at driver load time) and allocating a new empty state object. 851 - * @crtc: Pointer to drm crtc structure 852 - */ 853 - static void dpu_crtc_reset(struct drm_crtc *crtc) 854 - { 855 - struct dpu_crtc *dpu_crtc; 856 - struct dpu_crtc_state *cstate; 857 - 858 - if (!crtc) { 859 - DPU_ERROR("invalid crtc\n"); 860 - return; 861 - } 862 - 863 - /* revert suspend actions, if necessary */ 864 - if (dpu_kms_is_suspend_state(crtc->dev)) 865 - _dpu_crtc_set_suspend(crtc, false); 866 - 867 - /* remove previous state, if present */ 868 - if (crtc->state) { 869 - dpu_crtc_destroy_state(crtc, crtc->state); 870 - crtc->state = 0; 871 - } 872 - 873 - dpu_crtc = to_dpu_crtc(crtc); 874 - cstate = kzalloc(sizeof(*cstate), GFP_KERNEL); 875 - if (!cstate) { 876 - DPU_ERROR("failed to allocate state\n"); 877 - return; 878 - } 879 - 880 - cstate->base.crtc = crtc; 881 - crtc->state = &cstate->base; 882 - } 883 - 884 847 static void dpu_crtc_handle_power_event(u32 event_type, void *arg) 885 848 { 886 849 struct drm_crtc *crtc = arg; ··· 1462 1499 .set_config = drm_atomic_helper_set_config, 1463 1500 .destroy = dpu_crtc_destroy, 1464 1501 .page_flip = drm_atomic_helper_page_flip, 1465 - .reset = dpu_crtc_reset, 1502 + .reset = drm_atomic_helper_crtc_reset, 1466 1503 .atomic_duplicate_state = dpu_crtc_duplicate_state, 1467 1504 .atomic_destroy_state = dpu_crtc_destroy_state, 1468 1505 .late_register = dpu_crtc_late_register,