linux/drivers/gpu/drm/amd/display/dc/dce/dce_transform.h

/*
 * Copyright 2012-16 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 _DCE_DCE_TRANSFORM_H_
#define _DCE_DCE_TRANSFORM_H_


#include "transform.h"

#define TO_DCE_TRANSFORM(transform)

#define LB_TOTAL_NUMBER_OF_ENTRIES
#define LB_BITS_PER_ENTRY

#define XFM_COMMON_REG_LIST_DCE_BASE(id)

#define XFM_COMMON_REG_LIST_DCE80(id)

#define XFM_COMMON_REG_LIST_DCE100(id)

#define XFM_COMMON_REG_LIST_DCE110(id)

#if defined(CONFIG_DRM_AMD_DC_SI)
#define XFM_COMMON_REG_LIST_DCE60_BASE(id)

#define XFM_COMMON_REG_LIST_DCE60(id)
#endif

#define XFM_SF(reg_name, field_name, post_fix)

#define XFM_COMMON_MASK_SH_LIST_DCE_COMMON_BASE(mask_sh)

#define XFM_COMMON_MASK_SH_LIST_DCE80(mask_sh)

#define XFM_COMMON_MASK_SH_LIST_DCE110(mask_sh)

#if defined(CONFIG_DRM_AMD_DC_SI)
#define XFM_COMMON_MASK_SH_LIST_DCE60(mask_sh)

#define XFM_COMMON_MASK_SH_LIST_DCE60_COMMON_BASE(mask_sh)
#endif

#define XFM_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh)

#define XFM_REG_FIELD_LIST(type)

struct dce_transform_shift {};

struct dce_transform_mask {};

struct dce_transform_registers {};

struct init_int_and_frac {};

struct scl_ratios_inits {};

#if defined(CONFIG_DRM_AMD_DC_SI)
struct sclh_ratios_inits {};
#endif

enum ram_filter_type {};

struct dce_transform {};

void dce_transform_construct(struct dce_transform *xfm_dce,
	struct dc_context *ctx,
	uint32_t inst,
	const struct dce_transform_registers *regs,
	const struct dce_transform_shift *xfm_shift,
	const struct dce_transform_mask *xfm_mask);

#if defined(CONFIG_DRM_AMD_DC_SI)
void dce60_transform_construct(struct dce_transform *xfm_dce,
	struct dc_context *ctx,
	uint32_t inst,
	const struct dce_transform_registers *regs,
	const struct dce_transform_shift *xfm_shift,
	const struct dce_transform_mask *xfm_mask);
#endif

bool dce_transform_get_optimal_number_of_taps(
	struct transform *xfm,
	struct scaler_data *scl_data,
	const struct scaling_taps *in_taps);

void dce110_opp_set_csc_adjustment(
	struct transform *xfm,
	const struct out_csc_color_matrix *tbl_entry);

void dce110_opp_set_csc_default(
	struct transform *xfm,
	const struct default_adjustment *default_adjust);

/* REGAMMA RELATED */
void dce110_opp_power_on_regamma_lut(
	struct transform *xfm,
	bool power_on);

void dce110_opp_program_regamma_pwl(
	struct transform *xfm,
	const struct pwl_params *params);

void dce110_opp_set_regamma_mode(struct transform *xfm,
		enum opp_regamma mode);

#endif /* _DCE_DCE_TRANSFORM_H_ */