Commit 5324e2b2 authored by Dillon Varone's avatar Dillon Varone Committed by Alex Deucher
Browse files

drm/amd/display: Add driver support for future FAMS versions



[WHY&HOW]
Changes to support future versions of FAMS.

Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarDillon Varone <dillon.varone@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 19407237
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@

#include "bios_parser_common.h"

#include "dc.h"

#define THREE_PERCENT_OF_10000 300

#define LAST_RECORD_TYPE 0xff
+4 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include "resource.h"
#include "dc_state.h"
#include "dc_state_priv.h"
#include "dc_plane_priv.h"

#include "gpio_service_interface.h"
#include "clk_mgr.h"
@@ -3561,6 +3562,7 @@ static void commit_planes_for_stream_fast(struct dc *dc,
	int i, j;
	struct pipe_ctx *top_pipe_to_program = NULL;
	struct dc_stream_status *stream_status = NULL;

	dc_exit_ips_for_hw_access(dc);

	dc_z10_restore(dc);
@@ -3618,7 +3620,8 @@ static void commit_planes_for_stream_fast(struct dc *dc,
			context->block_sequence,
			&(context->block_sequence_steps),
			top_pipe_to_program,
			stream_status);
			stream_status,
			context);
	hwss_execute_sequence(dc,
			context->block_sequence,
			context->block_sequence_steps);
+2 −1
Original line number Diff line number Diff line
@@ -560,7 +560,8 @@ void hwss_build_fast_sequence(struct dc *dc,
		struct block_sequence block_sequence[],
		unsigned int *num_steps,
		struct pipe_ctx *pipe_ctx,
		struct dc_stream_status *stream_status)
		struct dc_stream_status *stream_status,
		struct dc_state *context)
{
	struct dc_plane_state *plane = pipe_ctx->plane_state;
	struct dc_stream_state *stream = pipe_ctx->stream;
+1 −0
Original line number Diff line number Diff line
@@ -915,3 +915,4 @@ struct dc_stream_state *dc_state_get_stream_from_id(const struct dc_state *state

	return stream;
}
+20 −0
Original line number Diff line number Diff line
@@ -60,6 +60,26 @@ void dc_plane_destruct(struct dc_plane_state *plane_state)
	// no more pointers to free within dc_plane_state
}


/* dc_state is passed in separately since it may differ from the current dc state accessible from plane_state e.g.
 * if the driver is doing an update from an old context to a new one and the caller wants the pipe mask for the new
 * context rather than the existing one
 */
uint8_t  dc_plane_get_pipe_mask(struct dc_state *dc_state, const struct dc_plane_state *plane_state)
{
	uint8_t pipe_mask = 0;
	int i;

	for (i = 0; i < plane_state->ctx->dc->res_pool->pipe_count; i++) {
		struct pipe_ctx *pipe_ctx = &dc_state->res_ctx.pipe_ctx[i];

		if (pipe_ctx->plane_state == plane_state && pipe_ctx->plane_res.hubp)
			pipe_mask |= 1 << pipe_ctx->plane_res.hubp->inst;
	}

	return pipe_mask;
}

/*******************************************************************************
 * Public functions
 ******************************************************************************/
Loading