Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b37df495 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: sde: fix the race condition with wb output buffers"

parents 84fc2163 d28cec1b
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -368,6 +368,7 @@ static void sde_encoder_phys_wb_setup_fb(struct sde_encoder_phys *phys_enc,
	/* cache framebuffer for cleanup in writeback done */
	/* cache framebuffer for cleanup in writeback done */
	wb_enc->wb_fb = fb;
	wb_enc->wb_fb = fb;
	wb_enc->wb_aspace = aspace;
	wb_enc->wb_aspace = aspace;
	drm_framebuffer_get(fb);


	format = msm_framebuffer_format(fb);
	format = msm_framebuffer_format(fb);
	if (!format) {
	if (!format) {
@@ -1256,6 +1257,7 @@ static int _sde_encoder_phys_wb_wait_for_commit_done(
	/* cleanup writeback framebuffer */
	/* cleanup writeback framebuffer */
	if (wb_enc->wb_fb && wb_enc->wb_aspace) {
	if (wb_enc->wb_fb && wb_enc->wb_aspace) {
		msm_framebuffer_cleanup(wb_enc->wb_fb, wb_enc->wb_aspace);
		msm_framebuffer_cleanup(wb_enc->wb_fb, wb_enc->wb_aspace);
		drm_framebuffer_put(wb_enc->wb_fb);
		wb_enc->wb_fb = NULL;
		wb_enc->wb_fb = NULL;
		wb_enc->wb_aspace = NULL;
		wb_enc->wb_aspace = NULL;
	}
	}
@@ -1274,6 +1276,7 @@ static int _sde_encoder_phys_wb_wait_for_commit_done(
	/* cleanup previous buffer if pending */
	/* cleanup previous buffer if pending */
	if (wb_enc->cwb_old_fb && wb_enc->cwb_old_aspace) {
	if (wb_enc->cwb_old_fb && wb_enc->cwb_old_aspace) {
		msm_framebuffer_cleanup(wb_enc->cwb_old_fb, wb_enc->cwb_old_aspace);
		msm_framebuffer_cleanup(wb_enc->cwb_old_fb, wb_enc->cwb_old_aspace);
		drm_framebuffer_put(wb_enc->cwb_old_fb);
		wb_enc->cwb_old_fb = NULL;
		wb_enc->cwb_old_fb = NULL;
		wb_enc->cwb_old_aspace = NULL;
		wb_enc->cwb_old_aspace = NULL;
	}
	}