Commit 9ed90489 authored by Aric Cyr's avatar Aric Cyr Committed by Alex Deucher
Browse files

drm/amd/display: Reorder dc_state fields to optimize clearing the struct



[why & how]
By moving bw_ctx field to the end of the dc_state the state can be
cleared more efficiently without resulting in large DML memcpy
operations, resulting in better mode enumeration performance on some
platforms.

Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAric Cyr <aric.cyr@amd.com>
Reviewed-by: default avatarNevenko Stupar <Nevenko.Stupar@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b0fcf88b
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -546,15 +546,6 @@ struct dc_state {
	 */
	struct resource_context res_ctx;

	/**
	 * @bw_ctx: The output from bandwidth and watermark calculations and the DML
	 *
	 * Each context must have its own instance of VBA, and in order to
	 * initialize and obtain IP and SOC, the base DML instance from DC is
	 * initially copied into every context.
	 */
	struct bw_context bw_ctx;

	/**
	 * @pp_display_cfg: PowerPlay clocks and settings
	 * Note: this is a big struct, do *not* put on stack!
@@ -569,6 +560,15 @@ struct dc_state {

	struct clk_mgr *clk_mgr;

	/**
	 * @bw_ctx: The output from bandwidth and watermark calculations and the DML
	 *
	 * Each context must have its own instance of VBA, and in order to
	 * initialize and obtain IP and SOC, the base DML instance from DC is
	 * initially copied into every context.
	 */
	struct bw_context bw_ctx;

	/**
	 * @refcount: refcount reference
	 *