All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Harry.Wentland@amd.com>, <Sunpeng.Li@amd.com>,
	<Rodrigo.Siqueira@amd.com>, <Aurabindo.Pillai@amd.com>,
	<roman.li@amd.com>, <wayne.lin@amd.com>,
	<agustin.gutierrez@amd.com>, <chiahsuan.chung@amd.com>,
	<hersenxs.wu@amd.com>, <jerry.zuo@amd.com>,
	Gabe Teeger <gabe.teeger@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	<stable@vger.kernel.org>, George Shen <george.shen@amd.com>,
	Charlene Liu <charlene.liu@amd.com>, Jun Lei <jun.lei@amd.com>
Subject: [PATCH 17/43] drm/amd/display: Revert Add left edge pixel + ODM pipe split
Date: Tue, 12 Mar 2024 17:20:10 +0800	[thread overview]
Message-ID: <20240312092036.3283319-18-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20240312092036.3283319-1-Wayne.Lin@amd.com>

From: Gabe Teeger <gabe.teeger@amd.com>

This reverts commit 97c109f498da ("drm/amd/display: Add left edge pixel for
YCbCr422/420 + ODM pipe split")

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: George Shen <george.shen@amd.com>
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  4 --
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 37 -------------------
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   | 10 -----
 .../gpu/drm/amd/display/dc/inc/core_types.h   |  2 -
 drivers/gpu/drm/amd/display/dc/inc/resource.h |  4 --
 5 files changed, 57 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index ad969e1dd427..a372c4965adf 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3258,10 +3258,6 @@ static bool update_planes_and_stream_state(struct dc *dc,
 
 			if (otg_master && otg_master->stream->test_pattern.type != DP_TEST_PATTERN_VIDEO_MODE)
 				resource_build_test_pattern_params(&context->res_ctx, otg_master);
-
-			if (otg_master && (otg_master->stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR422 ||
-					otg_master->stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR420))
-				resource_build_subsampling_params(&context->res_ctx, otg_master);
 		}
 	}
 	update_seamless_boot_flags(dc, context, surface_count, stream);
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 945ee57f1721..96b4f68ec374 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -828,16 +828,6 @@ static struct rect calculate_odm_slice_in_timing_active(struct pipe_ctx *pipe_ct
 			stream->timing.v_border_bottom +
 			stream->timing.v_border_top;
 
-	/* Recout for ODM slices after the first slice need one extra left edge pixel
-	 * for 3-tap chroma subsampling.
-	 */
-	if (odm_slice_idx > 0 &&
-			(pipe_ctx->stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR422 ||
-				pipe_ctx->stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR420)) {
-		odm_rec.x -= 1;
-		odm_rec.width += 1;
-	}
-
 	return odm_rec;
 }
 
@@ -1454,7 +1444,6 @@ void resource_build_test_pattern_params(struct resource_context *res_ctx,
 	enum controller_dp_test_pattern controller_test_pattern;
 	enum controller_dp_color_space controller_color_space;
 	enum dc_color_depth color_depth = otg_master->stream->timing.display_color_depth;
-	enum dc_pixel_encoding pixel_encoding = otg_master->stream->timing.pixel_encoding;
 	int h_active = otg_master->stream->timing.h_addressable +
 		otg_master->stream->timing.h_border_left +
 		otg_master->stream->timing.h_border_right;
@@ -1486,36 +1475,10 @@ void resource_build_test_pattern_params(struct resource_context *res_ctx,
 		else
 			params->width = last_odm_slice_width;
 
-		/* Extra left edge pixel is required for 3-tap chroma subsampling. */
-		if (i != 0 && (pixel_encoding == PIXEL_ENCODING_YCBCR422 ||
-				pixel_encoding == PIXEL_ENCODING_YCBCR420)) {
-			params->offset -= 1;
-			params->width += 1;
-		}
-
 		offset += odm_slice_width;
 	}
 }
 
-void resource_build_subsampling_params(struct resource_context *res_ctx,
-	struct pipe_ctx *otg_master)
-{
-	struct pipe_ctx *opp_heads[MAX_PIPES];
-	int odm_cnt = 1;
-	int i;
-
-	odm_cnt = resource_get_opp_heads_for_otg_master(otg_master, res_ctx, opp_heads);
-
-	/* For ODM slices after the first slice, extra left edge pixel is required
-	 * for 3-tap chroma subsampling.
-	 */
-	if (otg_master->stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR422 ||
-			otg_master->stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR420) {
-		for (i = 0; i < odm_cnt; i++)
-			opp_heads[i]->stream_res.left_edge_extra_pixel = (i == 0) ? false : true;
-	}
-}
-
 bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
 {
 	const struct dc_plane_state *plane_state = pipe_ctx->plane_state;
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
index 4dfc2dff5e01..8b3536c380b8 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
@@ -1579,11 +1579,6 @@ static void dcn20_detect_pipe_changes(struct dc_state *old_state,
 	if (old_pipe->stream_res.tg != new_pipe->stream_res.tg)
 		new_pipe->update_flags.bits.tg_changed = 1;
 
-	if (resource_is_pipe_type(new_pipe, OPP_HEAD)) {
-		if (old_pipe->stream_res.left_edge_extra_pixel != new_pipe->stream_res.left_edge_extra_pixel)
-			new_pipe->update_flags.bits.opp_changed = 1;
-	}
-
 	/*
 	 * Detect mpcc blending changes, only dpp inst and opp matter here,
 	 * mpccs getting removed/inserted update connected ones during their own
@@ -1967,11 +1962,6 @@ static void dcn20_program_pipe(
 			pipe_ctx->stream_res.opp,
 			&pipe_ctx->stream->bit_depth_params,
 			&pipe_ctx->stream->clamping);
-
-		if (resource_is_pipe_type(pipe_ctx, OPP_HEAD))
-			pipe_ctx->stream_res.opp->funcs->opp_program_left_edge_extra_pixel(
-				pipe_ctx->stream_res.opp,
-				pipe_ctx->stream_res.left_edge_extra_pixel);
 	}
 
 	/* Set ABM pipe after other pipe configurations done */
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
index b5b090197ad7..34764094f546 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -333,8 +333,6 @@ struct stream_resource {
 	uint8_t gsl_group;
 
 	struct test_pattern_params test_pattern_params;
-
-	bool left_edge_extra_pixel;
 };
 
 struct plane_resource {
diff --git a/drivers/gpu/drm/amd/display/dc/inc/resource.h b/drivers/gpu/drm/amd/display/dc/inc/resource.h
index b14d52e52fa2..77a60aa9f27b 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/resource.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h
@@ -107,10 +107,6 @@ void resource_build_test_pattern_params(
 		struct resource_context *res_ctx,
 		struct pipe_ctx *pipe_ctx);
 
-void resource_build_subsampling_params(
-		struct resource_context *res_ctx,
-		struct pipe_ctx *pipe_ctx);
-
 bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx);
 
 enum dc_status resource_build_scaling_params_for_context(
-- 
2.37.3


  parent reply	other threads:[~2024-03-12  9:22 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12  9:19 [PATCH 00/43] DC Patches March 18, 2024 Wayne Lin
2024-03-12  9:19 ` [PATCH 01/43] drm/amd/display: Remove code duplication Wayne Lin
2024-03-12  9:19 ` [PATCH 02/43] drm/amd/display: Remove wrong signal from vrr calculation Wayne Lin
2024-03-12  9:19 ` [PATCH 03/43] drm/amd/display: Enable 2to1 ODM policy for DCN35 Wayne Lin
2024-03-12 10:20   ` Christian König
2024-03-13  6:35     ` Lin, Wayne
2024-03-12  9:19 ` [PATCH 04/43] drm/amd/display: Delete duplicated function prototypes Wayne Lin
2024-03-12  9:19 ` [PATCH 05/43] drm/amd/display: Correct indentations and spaces Wayne Lin
2024-03-12  9:19 ` [PATCH 06/43] drm/amd/display: Add the MALL size in the fallback function Wayne Lin
2024-03-12  9:20 ` [PATCH 07/43] drm/amd/display: Move define to the proper header Wayne Lin
2024-03-12  9:20 ` [PATCH 08/43] drm/amd/display: Enable fast update for DCN314 Wayne Lin
2024-03-12  9:20 ` [PATCH 09/43] drm/amd/display: Remove legacy code Wayne Lin
2024-03-12  9:20 ` [PATCH 10/43] drm/amd/display: correct hostvm flag Wayne Lin
2024-03-12  9:20 ` [PATCH 11/43] drm/amd/display: Comments adjustments Wayne Lin
2024-03-12  9:20 ` [PATCH 12/43] drm/amd/display: Add missing registers and offset Wayne Lin
2024-03-12  9:20 ` [PATCH 13/43] drm/amd/display: Fix noise issue on HDMI AV mute Wayne Lin
2024-03-12  9:20 ` [PATCH 14/43] drm/amd/display: skip forcing odm in minimal transition Wayne Lin
2024-03-12  9:20 ` [PATCH 15/43] drm/amd/display: revert Exit idle optimizations before HDCP execution Wayne Lin
2024-03-12  9:20 ` [PATCH 16/43] drm/amd/display: Add debug option for idle reg checks Wayne Lin
2024-03-12  9:20 ` Wayne Lin [this message]
2024-03-12  9:20 ` [PATCH 18/43] drm/amd/display: To adjust dprefclk by down spread percentage Wayne Lin
2024-03-12  9:20 ` [PATCH 19/43] drm/amd/display: Enabling urgent latency adjustment for DCN35 Wayne Lin
2024-03-12  9:20 ` [PATCH 20/43] drm/amd/display: Revert "Set the power_down_on_boot function pointer to null" Wayne Lin
2024-03-12  9:20 ` [PATCH 21/43] drm/amd/display: add stream clock source to DP DTO params Wayne Lin
2024-03-12  9:20 ` [PATCH 22/43] drm/amd/display: Program pixclk according to dcn revision Wayne Lin
2024-03-12  9:20 ` [PATCH 23/43] drm/amd/display: clear mpc_tree in init_pipes Wayne Lin
2024-03-12  9:20 ` [PATCH 24/43] drm/amd/display: [FW Promotion] Release 0.0.208.0 Wayne Lin
2024-03-12  9:20 ` [PATCH 25/43] drm/amd/display: 3.2.276 Wayne Lin
2024-03-12  9:20 ` [PATCH 26/43] drm/amd/display: Workaround register access in idle race with cursor Wayne Lin
2024-03-12  9:20 ` [PATCH 27/43] drm/amd/display: Revert Remove pixle rate limit for subvp Wayne Lin
2024-03-12  9:20 ` [PATCH 28/43] drm/amd/display: fix debug key not working on dml2 Wayne Lin
2024-03-12  9:20 ` [PATCH 29/43] drm/amd/display: Power on VPG memory unconditionally if off Wayne Lin
2024-03-12  9:20 ` [PATCH 30/43] drm/amd/display: Added debug prints for zstate_support and StutterPeriod Wayne Lin
2024-03-12  9:20 ` [PATCH 31/43] drm/amd/display: change aux_init to apu version Wayne Lin
2024-03-12  9:20 ` [PATCH 32/43] drm/amd/display: Increase Z8 watermark times Wayne Lin
2024-03-12  9:20 ` [PATCH 33/43] drm/amd/display: Prevent crash on bring-up Wayne Lin
2024-03-13 14:40   ` Pillai, Aurabindo
2024-03-12  9:20 ` [PATCH 34/43] drm/amd/display: increase bb clock for DCN351 Wayne Lin
2024-03-12  9:20 ` [PATCH 35/43] drm/amd/display: Detect and disallow idle reallow during reentrancy Wayne Lin
2024-03-12  9:20 ` [PATCH 36/43] drm/amd/display: Add optional optimization for IPS handshake Wayne Lin
2024-03-12  9:20 ` [PATCH 37/43] drm/amd/display: Enable optimized handshake for DCN35 Wayne Lin
2024-03-12  9:20 ` [PATCH 38/43] drm/amd/display: Remove unnecessary hard coded DPM states Wayne Lin
2024-03-12  9:20 ` [PATCH 39/43] drm/amd/display: Enable new interface design for alternate scrambling Wayne Lin
2024-03-12  9:20 ` [PATCH 40/43] drm/amd/display: Enable reallow for idle on DCN35 Wayne Lin
2024-03-12  9:20 ` [PATCH 41/43] drm/amd/display: fix a bug to dereference already freed old current state memory Wayne Lin
2024-03-12  9:20 ` [PATCH 42/43] drm/amd/display: Add TB_BORROWED_MAX definition Wayne Lin
2024-03-12  9:20 ` [PATCH 43/43] drm/amd/display: 3.2.277 Wayne Lin
2024-03-18 13:54 ` [PATCH 00/43] DC Patches March 18, 2024 Wheeler, Daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240312092036.3283319-18-Wayne.Lin@amd.com \
    --to=wayne.lin@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=agustin.gutierrez@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=charlene.liu@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=gabe.teeger@amd.com \
    --cc=george.shen@amd.com \
    --cc=hersenxs.wu@amd.com \
    --cc=jerry.zuo@amd.com \
    --cc=jun.lei@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=roman.li@amd.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.