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

drm/msm/gem: Cleanup submit_cleanup_bo()

Now that it only handles unlock duty, drop the superfluous arg and
rename it.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/568333/

+5 -10
+5 -10
drivers/gpu/drm/msm/msm_gem_submit.c
··· 248 248 return ret; 249 249 } 250 250 251 - /* Unwind bo state, according to cleanup_flags. In the success case, only 252 - * the lock is dropped at the end of the submit (and active/pin ref is dropped 253 - * later when the submit is retired). 254 - */ 255 - static void submit_cleanup_bo(struct msm_gem_submit *submit, int i, 256 - unsigned cleanup_flags) 251 + static void submit_unlock_bo(struct msm_gem_submit *submit, int i) 257 252 { 258 253 struct drm_gem_object *obj = submit->bos[i].obj; 254 + unsigned cleanup_flags = BO_LOCKED; 259 255 unsigned flags = submit->bos[i].flags & cleanup_flags; 260 256 261 257 /* ··· 300 304 } 301 305 302 306 for (; i >= 0; i--) 303 - submit_cleanup_bo(submit, i, BO_LOCKED); 307 + submit_unlock_bo(submit, i); 304 308 305 309 if (slow_locked > 0) 306 - submit_cleanup_bo(submit, slow_locked, BO_LOCKED); 310 + submit_unlock_bo(submit, slow_locked); 307 311 308 312 if (ret == -EDEADLK) { 309 313 struct drm_gem_object *obj = submit->bos[contended].obj; ··· 529 533 */ 530 534 static void submit_cleanup(struct msm_gem_submit *submit, bool error) 531 535 { 532 - unsigned cleanup_flags = BO_LOCKED; 533 536 unsigned i; 534 537 535 538 if (error) ··· 536 541 537 542 for (i = 0; i < submit->nr_bos; i++) { 538 543 struct drm_gem_object *obj = submit->bos[i].obj; 539 - submit_cleanup_bo(submit, i, cleanup_flags); 544 + submit_unlock_bo(submit, i); 540 545 if (error) 541 546 drm_gem_object_put(obj); 542 547 }