linux/drivers/gpu/drm/radeon/ni_dpm.h

/*
 * Copyright 2012 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.
 *
 */
#ifndef __NI_DPM_H__
#define __NI_DPM_H__

#include "cypress_dpm.h"
#include "btc_dpm.h"
#include "nislands_smc.h"

struct ni_clock_registers {};

struct ni_mc_reg_entry {};

struct ni_mc_reg_table {};

#define NISLANDS_MCREGISTERTABLE_FIRST_DRIVERSTATE_SLOT

enum ni_dc_cac_level {};

struct ni_leakage_coeffients {};

struct ni_cac_data {};

struct ni_cac_weights {};

struct ni_ps {};

struct ni_power_info {};

#define NISLANDS_INITIAL_STATE_ARB_INDEX
#define NISLANDS_ACPI_STATE_ARB_INDEX
#define NISLANDS_ULV_STATE_ARB_INDEX
#define NISLANDS_DRIVER_STATE_ARB_INDEX

#define NISLANDS_DPM2_MAX_PULSE_SKIP

#define NISLANDS_DPM2_NEAR_TDP_DEC
#define NISLANDS_DPM2_ABOVE_SAFE_INC
#define NISLANDS_DPM2_BELOW_SAFE_INC

#define NISLANDS_DPM2_TDP_SAFE_LIMIT_PERCENT

#define NISLANDS_DPM2_MAXPS_PERCENT_H
#define NISLANDS_DPM2_MAXPS_PERCENT_M

#define NISLANDS_DPM2_SQ_RAMP_MAX_POWER
#define NISLANDS_DPM2_SQ_RAMP_MIN_POWER
#define NISLANDS_DPM2_SQ_RAMP_MAX_POWER_DELTA
#define NISLANDS_DPM2_SQ_RAMP_STI_SIZE
#define NISLANDS_DPM2_SQ_RAMP_LTI_RATIO

int ni_copy_and_switch_arb_sets(struct radeon_device *rdev,
				u32 arb_freq_src, u32 arb_freq_dest);
void ni_update_current_ps(struct radeon_device *rdev,
			  struct radeon_ps *rps);
void ni_update_requested_ps(struct radeon_device *rdev,
			    struct radeon_ps *rps);

void ni_set_uvd_clock_before_set_eng_clock(struct radeon_device *rdev,
					   struct radeon_ps *new_ps,
					   struct radeon_ps *old_ps);
void ni_set_uvd_clock_after_set_eng_clock(struct radeon_device *rdev,
					  struct radeon_ps *new_ps,
					  struct radeon_ps *old_ps);

bool ni_dpm_vblank_too_short(struct radeon_device *rdev);

struct ni_power_info *ni_get_pi(struct radeon_device *rdev);
struct ni_ps *ni_get_ps(struct radeon_ps *rps);

#endif