linux/drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c

/*
 * Copyright 2021 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.
 *
 */

#define SWSMU_CODE_LAYER_L2

#include "amdgpu.h"
#include "amdgpu_smu.h"
#include "smu_v11_0.h"
#include "smu11_driver_if_cyan_skillfish.h"
#include "cyan_skillfish_ppt.h"
#include "smu_v11_8_ppsmc.h"
#include "smu_v11_8_pmfw.h"
#include "smu_cmn.h"
#include "soc15_common.h"

/*
 * DO NOT use these for err/warn/info/debug messages.
 * Use dev_err, dev_warn, dev_info and dev_dbg instead.
 * They are more MGPU friendly.
 */

#undef pr_err
#undef pr_warn
#undef pr_info
#undef pr_debug

/* unit: MHz */
#define CYAN_SKILLFISH_SCLK_MIN
#define CYAN_SKILLFISH_SCLK_MAX

/* unit: mV */
#define CYAN_SKILLFISH_VDDC_MIN
#define CYAN_SKILLFISH_VDDC_MAX
#define CYAN_SKILLFISH_VDDC_MAGIC

static struct gfx_user_settings {} cyan_skillfish_user_settings;

static uint32_t cyan_skillfish_sclk_default;

#define FEATURE_MASK(feature)
#define SMC_DPM_FEATURE

static struct cmn2asic_msg_mapping cyan_skillfish_message_map[SMU_MSG_MAX_COUNT] =;

static struct cmn2asic_mapping cyan_skillfish_table_map[SMU_TABLE_COUNT] =;

static int cyan_skillfish_tables_init(struct smu_context *smu)
{}

static int cyan_skillfish_init_smc_tables(struct smu_context *smu)
{}

static int
cyan_skillfish_get_smu_metrics_data(struct smu_context *smu,
					MetricsMember_t member,
					uint32_t *value)
{}

static int cyan_skillfish_read_sensor(struct smu_context *smu,
					enum amd_pp_sensors sensor,
					void *data,
					uint32_t *size)
{}

static int cyan_skillfish_get_current_clk_freq(struct smu_context *smu,
						enum smu_clk_type clk_type,
						uint32_t *value)
{}

static int cyan_skillfish_print_clk_levels(struct smu_context *smu,
					enum smu_clk_type clk_type,
					char *buf)
{}

static bool cyan_skillfish_is_dpm_running(struct smu_context *smu)
{}

static ssize_t cyan_skillfish_get_gpu_metrics(struct smu_context *smu,
						void **table)
{}

static int cyan_skillfish_od_edit_dpm_table(struct smu_context *smu,
					enum PP_OD_DPM_TABLE_COMMAND type,
					long input[], uint32_t size)
{}

static int cyan_skillfish_get_dpm_ultimate_freq(struct smu_context *smu,
						enum smu_clk_type clk_type,
						uint32_t *min,
						uint32_t *max)
{}

static int cyan_skillfish_get_enabled_mask(struct smu_context *smu,
					   uint64_t *feature_mask)
{}

static const struct pptable_funcs cyan_skillfish_ppt_funcs =;

void cyan_skillfish_set_ppt_funcs(struct smu_context *smu)
{}