linux/drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.h

/*
 * Copyright 2023 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

#ifndef __DC_MPCC_DCN401_H__
#define __DC_MPCC_DCN401_H__
#include "dcn30/dcn30_mpc.h"
#include "dcn32/dcn32_mpc.h"

#define TO_DCN401_MPC(mpc_base)

#define MPC_REG_VARIABLE_LIST_DCN4_01

#define MPC_COMMON_MASK_SH_LIST_DCN4_01(mask_sh)


#define MPC_REG_LIST_DCN4_01_RI(inst)

#define MPC_REG_FIELD_LIST_DCN4_01(type)

struct dcn401_mpc_shift {};

struct dcn401_mpc_mask {};

struct dcn401_mpc_registers {};

struct dcn401_mpc {};
void dcn401_mpc_construct(struct dcn401_mpc *mpc401,
	struct dc_context *ctx,
	const struct dcn401_mpc_registers *mpc_regs,
	const struct dcn401_mpc_shift *mpc_shift,
	const struct dcn401_mpc_mask *mpc_mask,
	int num_mpcc,
	int num_rmu);

void mpc401_set_movable_cm_location(struct mpc *mpc, enum mpcc_movable_cm_location location, int mpcc_id);
void mpc401_populate_lut(struct mpc *mpc, const enum MCM_LUT_ID id, const union mcm_lut_params params,
		bool lut_bank_a, int mpcc_id);

void mpc401_program_lut_mode(
		struct mpc *mpc,
		const enum MCM_LUT_ID id,
		const enum MCM_LUT_XABLE xable,
		bool lut_bank_a,
		int mpcc_id);

void mpc401_program_lut_read_write_control(
		struct mpc *mpc,
		const enum MCM_LUT_ID id,
		bool lut_bank_a,
		int mpcc_id);

void mpc401_program_3dlut_size(
		struct mpc *mpc,
		bool is_17x17x17,
		int mpcc_id);

void mpc401_set_gamut_remap(
	struct mpc *mpc,
	int mpcc_id,
	const struct mpc_grph_gamut_adjustment *adjust);

void mpc401_get_gamut_remap(
	struct mpc *mpc,
	int mpcc_id,
	struct mpc_grph_gamut_adjustment *adjust);

#endif