From d1283432f64ccad924d5f4ba21a64bf0458a66c2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 20 Sep 2023 09:43:17 +0200 Subject: [PATCH] drop queue-6.5/drm-amd-display-add-stream-overhead-in-bw-calculatio.patch Breaks the build and doesn't seem to be needed at all. --- ...add-stream-overhead-in-bw-calculatio.patch | 114 ------------------ queue-6.5/series | 1 - 2 files changed, 115 deletions(-) delete mode 100644 queue-6.5/drm-amd-display-add-stream-overhead-in-bw-calculatio.patch diff --git a/queue-6.5/drm-amd-display-add-stream-overhead-in-bw-calculatio.patch b/queue-6.5/drm-amd-display-add-stream-overhead-in-bw-calculatio.patch deleted file mode 100644 index b6bec308d15..00000000000 --- a/queue-6.5/drm-amd-display-add-stream-overhead-in-bw-calculatio.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 2fc4e68e9746ea47bbab63d153532970277f9a6a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 10 Apr 2023 20:00:46 -0400 -Subject: drm/amd/display: Add stream overhead in BW calculations for 128b/132b - -From: George Shen - -[ Upstream commit 974764180838516f80a13257da67a1ec6afb87d4 ] - -[Why] -Current BW calculations do not account for the additional padding added -for uncompressed pixel-to-symbol packing. - -This results in X.Y being too low for 128b/132b SST streams in certain -scenarios. If X.Y is too low, end user can observe image corruption. - -[How] -Add function to calculate stream overhead to timing BW calculation for -128b/132b SST cases. - -Reviewed-by: Wenjing Liu -Acked-by: Alan Liu -Signed-off-by: George Shen -Tested-by: Daniel Wheeler -Signed-off-by: Alex Deucher -Signed-off-by: Sasha Levin ---- - drivers/gpu/drm/amd/display/dc/dc.h | 2 + - drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 42 +++++++++++++++++++++ - 2 files changed, 44 insertions(+) - -diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h -index 63948170fd6d9..3d4180f7ba349 100644 ---- a/drivers/gpu/drm/amd/display/dc/dc.h -+++ b/drivers/gpu/drm/amd/display/dc/dc.h -@@ -1409,6 +1409,8 @@ struct dc_plane_state *dc_get_surface_for_mpcc(struct dc *dc, - - uint32_t dc_get_opp_for_plane(struct dc *dc, struct dc_plane_state *plane); - -+void dc_set_disable_128b_132b_stream_overhead(bool disable); -+ - /* The function returns minimum bandwidth required to drive a given timing - * return - minimum required timing bandwidth in kbps. - */ -diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c -index 58dd62cce4bb9..aed0d3dafa247 100644 ---- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c -+++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c -@@ -40,6 +40,8 @@ static bool dsc_policy_enable_dsc_when_not_needed; - - static bool dsc_policy_disable_dsc_stream_overhead; - -+static bool disable_128b_132b_stream_overhead; -+ - #ifndef MAX - #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) - #endif -@@ -47,6 +49,41 @@ static bool dsc_policy_disable_dsc_stream_overhead; - #define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) - #endif - -+/* Need to account for padding due to pixel-to-symbol packing -+ * for uncompressed 128b/132b streams. -+ */ -+static uint32_t apply_128b_132b_stream_overhead( -+ const struct dc_crtc_timing *timing, const uint32_t kbps) -+{ -+ uint32_t total_kbps = kbps; -+ -+ if (disable_128b_132b_stream_overhead) -+ return kbps; -+ -+ if (!timing->flags.DSC) { -+ struct fixed31_32 bpp; -+ struct fixed31_32 overhead_factor; -+ -+ bpp = dc_fixpt_from_int(kbps); -+ bpp = dc_fixpt_div_int(bpp, timing->pix_clk_100hz / 10); -+ -+ /* Symbols_per_HActive = HActive * bpp / (4 lanes * 32-bit symbol size) -+ * Overhead_factor = ceil(Symbols_per_HActive) / Symbols_per_HActive -+ */ -+ overhead_factor = dc_fixpt_from_int(timing->h_addressable); -+ overhead_factor = dc_fixpt_mul(overhead_factor, bpp); -+ overhead_factor = dc_fixpt_div_int(overhead_factor, 128); -+ overhead_factor = dc_fixpt_div( -+ dc_fixpt_from_int(dc_fixpt_ceil(overhead_factor)), -+ overhead_factor); -+ -+ total_kbps = dc_fixpt_ceil( -+ dc_fixpt_mul_int(overhead_factor, total_kbps)); -+ } -+ -+ return total_kbps; -+} -+ - uint32_t dc_bandwidth_in_kbps_from_timing( - const struct dc_crtc_timing *timing) - { -@@ -1165,6 +1202,11 @@ void dc_dsc_policy_set_disable_dsc_stream_overhead(bool disable) - dsc_policy_disable_dsc_stream_overhead = disable; - } - -+void dc_set_disable_128b_132b_stream_overhead(bool disable) -+{ -+ disable_128b_132b_stream_overhead = disable; -+} -+ - void dc_dsc_get_default_config_option(const struct dc *dc, struct dc_dsc_config_options *options) - { - options->dsc_min_slice_height_override = dc->debug.dsc_min_slice_height_override; --- -2.40.1 - diff --git a/queue-6.5/series b/queue-6.5/series index fc849f93d0b..52d05b21560 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -70,7 +70,6 @@ arm64-dts-qcom-sm6350-correct-ramoops-pmsg-size.patch arm64-dts-qcom-sm8150-kumano-correct-ramoops-pmsg-si.patch arm64-dts-qcom-sm8250-edo-correct-ramoops-pmsg-size.patch drm-amdgpu-increase-soft-ih-ring-size.patch -drm-amd-display-add-stream-overhead-in-bw-calculatio.patch samples-hw_breakpoint-fix-kernel-bug-invalid-opcode-.patch drm-amdgpu-update-ring-scheduler-info-as-needed.patch drm-amd-display-fix-underflow-issue-on-175hz-timing.patch -- 2.47.3