Commit 0c9c0674 authored by Joshua Aberback's avatar Joshua Aberback Committed by Alex Deucher
Browse files

Revert "drm/amd/display: Fix incorrect pointer assignment"



This reverts commit 0a571e86.

[Why]
The change being reverted incorrectly assumes that a pointer type was
intended, however copying to a new structure is correct. As well, there
is no compiler error, it was instead an error in the testing framework
being used.

Reviewed-by: default avatarChaitanya Dhere <chaitanya.dhere@amd.com>
Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarJoshua Aberback <joshua.aberback@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dacb68ca
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ static void init_state(struct dc *dc, struct dc_state *state)
struct dc_state *dc_state_create(struct dc *dc, struct dc_state_create_params *params)
{
#ifdef CONFIG_DRM_AMD_DC_FP
	struct dml2_configuration_options *dml2_opt = &dc->dml2_options;
	struct dml2_configuration_options dml2_opt = dc->dml2_options;
#endif
	struct dc_state *state = kvzalloc(sizeof(struct dc_state),
			GFP_KERNEL);
@@ -207,11 +207,11 @@ struct dc_state *dc_state_create(struct dc *dc, struct dc_state_create_params *p

#ifdef CONFIG_DRM_AMD_DC_FP
	if (dc->debug.using_dml2) {
		dml2_opt->use_clock_dc_limits = false;
		dml2_create(dc, dml2_opt, &state->bw_ctx.dml2);
		dml2_opt.use_clock_dc_limits = false;
		dml2_create(dc, &dml2_opt, &state->bw_ctx.dml2);

		dml2_opt->use_clock_dc_limits = true;
		dml2_create(dc, dml2_opt, &state->bw_ctx.dml2_dc_power_source);
		dml2_opt.use_clock_dc_limits = true;
		dml2_create(dc, &dml2_opt, &state->bw_ctx.dml2_dc_power_source);
	}
#endif