Commit fcd2f4bf authored by Amy Zhang's avatar Amy Zhang Committed by Alex Deucher
Browse files

drm/amd/display: Output Transfer Function Regamma Refactor



- Create translation function to translate logical format to hw format
- Refactor to use transfer function in dc instead of input gamma

Signed-off-by: default avatarAmy Zhang <Amy.Zhang@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 457b74cb
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -246,6 +246,15 @@ struct fixed31_32 dal_fixed31_32_add(
	return res;
}

struct fixed31_32 dal_fixed31_32_add_int(
	struct fixed31_32 arg1,
	int32_t arg2)
{
	return dal_fixed31_32_add(
		arg1,
		dal_fixed31_32_from_int(arg2));
}

struct fixed31_32 dal_fixed31_32_sub_int(
	struct fixed31_32 arg1,
	int32_t arg2)
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
# It calculates Bandwidth and Watermarks values for HW programming
#

BW_CALCS = bandwidth_calcs.o bw_fixed.o gamma_calcs.o
BW_CALCS = bandwidth_calcs.o bw_fixed.o

AMD_DAL_BW_CALCS = $(addprefix $(AMDDALPATH)/dc/calcs/,$(BW_CALCS))

+0 −1481

File deleted.

Preview size limit exceeded, changes collapsed.

+5 −5
Original line number Diff line number Diff line
@@ -1519,23 +1519,23 @@ void dc_update_surfaces_for_stream(struct dc *dc, struct dc_surface_update *upda
			if (dc->debug.disable_color_module)
				continue;  /* skip below color updates */

			if (updates[i].hdr_static_metadata) {
				resource_build_info_frame(pipe_ctx);
				core_dc->hwss.update_info_frame(pipe_ctx);
			}
			if (is_new_pipe_surface[j] ||
					updates[i].in_transfer_func)
				core_dc->hwss.set_input_transfer_func(
						pipe_ctx, pipe_ctx->surface);

			if (is_new_pipe_surface[j] ||
					updates[i].gamma ||
					updates[i].out_transfer_func)
				core_dc->hwss.set_output_transfer_func(
						pipe_ctx,
						pipe_ctx->surface,
						pipe_ctx->stream);

			if (updates[i].hdr_static_metadata) {
				resource_build_info_frame(pipe_ctx);
				core_dc->hwss.update_info_frame(pipe_ctx);
			}

		}
		if (apply_ctx) {
			core_dc->hwss.apply_ctx_for_surface(core_dc, surface, context);
+7 −4
Original line number Diff line number Diff line
@@ -213,11 +213,14 @@ enum dc_transfer_func_type {
};

struct dc_transfer_func_distributed_points {
	uint16_t red[TRANSFER_FUNC_POINTS];
	uint16_t green[TRANSFER_FUNC_POINTS];
	uint16_t blue[TRANSFER_FUNC_POINTS];
	struct fixed31_32 red[TRANSFER_FUNC_POINTS];
	struct fixed31_32 green[TRANSFER_FUNC_POINTS];
	struct fixed31_32 blue[TRANSFER_FUNC_POINTS];

	uint16_t end_exponent;
	uint16_t x_point_at_y1;
	uint16_t x_point_at_y1_red;
	uint16_t x_point_at_y1_green;
	uint16_t x_point_at_y1_blue;
};

enum dc_transfer_func_predefined {
Loading