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

Commit 08d69389 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dp: fix YUV422 wrong bitdepth"

parents 7048538e a9da5c4c
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -1053,25 +1053,6 @@ static int dp_display_set_mode(struct dp_display *dp_display,
	mode->timing.bpp = dp->panel->get_mode_bpp(dp->panel,
			mode->timing.bpp, pixel_clk_khz);

	/* Refactor bits per pixel for YUV422 format */
	if (mode->timing.out_format == MSM_MODE_FLAG_COLOR_FORMAT_YCBCR422) {
		switch (mode->timing.bpp) {
		case 18:
			mode->timing.bpp = 24;
			break;
		case 24:
			mode->timing.bpp = 30;
			break;
		case 30:
			mode->timing.bpp = 36;
			break;
		default:
			mode->timing.bpp = 30;
			break;
		};
		pr_debug("YCC422 bpp = %d\n", mode->timing.bpp);
	}

	dp->panel->pinfo = mode->timing;
	dp->panel->init(dp->panel);
	mutex_unlock(&dp->session_lock);