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

drm/msm/atomic: switch to drm_atomic_helper_check

Signed-off-by: Rob Clark <robdclark@gmail.com>

+1 -32
-29
drivers/gpu/drm/msm/msm_atomic.c
··· 146 146 complete_commit(container_of(work, struct msm_commit, work), true); 147 147 } 148 148 149 - /* 150 - * this func is identical to the drm_atomic_helper_check, but we keep this 151 - * because we might eventually need to have a more finegrained check 152 - * sequence without using the atomic helpers. 153 - * 154 - * In the past, we first called drm_atomic_helper_check_planes, and then 155 - * drm_atomic_helper_check_modeset. We needed this because the MDP5 plane's 156 - * ->atomic_check could update ->mode_changed for pixel format changes. 157 - * This, however isn't needed now because if there is a pixel format change, 158 - * we just assign a new hwpipe for it with a new SMP allocation. We might 159 - * eventually hit a condition where we would need to do a full modeset if 160 - * we run out of planes. There, we'd probably need to set mode_changed. 161 - */ 162 - int msm_atomic_check(struct drm_device *dev, 163 - struct drm_atomic_state *state) 164 - { 165 - int ret; 166 - 167 - ret = drm_atomic_helper_check_modeset(dev, state); 168 - if (ret) 169 - return ret; 170 - 171 - ret = drm_atomic_helper_check_planes(dev, state); 172 - if (ret) 173 - return ret; 174 - 175 - return ret; 176 - } 177 - 178 149 /** 179 150 * drm_atomic_helper_commit - commit validated state object 180 151 * @dev: DRM device
+1 -1
drivers/gpu/drm/msm/msm_drv.c
··· 47 47 static const struct drm_mode_config_funcs mode_config_funcs = { 48 48 .fb_create = msm_framebuffer_create, 49 49 .output_poll_changed = msm_fb_output_poll_changed, 50 - .atomic_check = msm_atomic_check, 50 + .atomic_check = drm_atomic_helper_check, 51 51 .atomic_commit = msm_atomic_commit, 52 52 .atomic_state_alloc = msm_atomic_state_alloc, 53 53 .atomic_state_clear = msm_atomic_state_clear,
-2
drivers/gpu/drm/msm/msm_drv.h
··· 161 161 uint32_t pixel_format; 162 162 }; 163 163 164 - int msm_atomic_check(struct drm_device *dev, 165 - struct drm_atomic_state *state); 166 164 int msm_atomic_commit(struct drm_device *dev, 167 165 struct drm_atomic_state *state, bool nonblock); 168 166 struct drm_atomic_state *msm_atomic_state_alloc(struct drm_device *dev);