diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 36 | 
1 files changed, 31 insertions, 5 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index b3b84647207e..137a88b8de45 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -112,6 +112,9 @@  #include "amdgpu_xcp.h"  #include "amdgpu_seq64.h"  #include "amdgpu_reg_state.h" +#if defined(CONFIG_DRM_AMD_ISP) +#include "amdgpu_isp.h" +#endif  #define MAX_GPU_INSTANCE		64 @@ -139,6 +142,14 @@ enum amdgpu_ss {  	AMDGPU_SS_DRV_UNLOAD  }; +struct amdgpu_hwip_reg_entry { +	u32		hwip; +	u32		inst; +	u32		seg; +	u32		reg_offset; +	const char	*reg_name; +}; +  struct amdgpu_watchdog_timer {  	bool timeout_fatal_disable;  	uint32_t period; /* maxCycles = (1 << period), the number of cycles before a timeout */ @@ -212,6 +223,7 @@ extern int amdgpu_discovery;  extern int amdgpu_mes;  extern int amdgpu_mes_log_enable;  extern int amdgpu_mes_kiq; +extern int amdgpu_uni_mes;  extern int amdgpu_noretry;  extern int amdgpu_force_asic_type;  extern int amdgpu_smartshift_bias; @@ -245,10 +257,12 @@ extern int amdgpu_cik_support;  extern int amdgpu_num_kcq;  #define AMDGPU_VCNFW_LOG_SIZE (32 * 1024) +#define AMDGPU_UMSCHFW_LOG_SIZE (32 * 1024)  extern int amdgpu_vcnfw_log;  extern int amdgpu_sg_display;  extern int amdgpu_umsch_mm;  extern int amdgpu_seamless; +extern int amdgpu_umsch_mm_fwlog;  extern int amdgpu_user_partt_mode;  extern int amdgpu_agp; @@ -333,9 +347,9 @@ enum amdgpu_kiq_irq {  	AMDGPU_CP_KIQ_IRQ_DRIVER0 = 0,  	AMDGPU_CP_KIQ_IRQ_LAST  }; -#define SRIOV_USEC_TIMEOUT  1200000 /* wait 12 * 100ms for SRIOV */ -#define MAX_KIQ_REG_WAIT       5000 /* in usecs, 5ms */ -#define MAX_KIQ_REG_BAILOUT_INTERVAL   5 /* in msecs, 5ms */ +#define SRIOV_USEC_TIMEOUT 1200000 /* wait 12 * 100ms for SRIOV */ +#define MAX_KIQ_REG_WAIT (amdgpu_sriov_vf(adev) ? 50000 : 5000) /* in usecs, extend for VF */ +#define MAX_KIQ_REG_BAILOUT_INTERVAL 5 /* in msecs, 5ms */  #define MAX_KIQ_REG_TRY 1000  int amdgpu_device_ip_set_clockgating_state(void *dev, @@ -494,6 +508,7 @@ struct amdgpu_wb {  	uint64_t		gpu_addr;  	u32			num_wb;	/* Number of wb slots actually reserved for amdgpu. */  	unsigned long		used[DIV_ROUND_UP(AMDGPU_MAX_WB, BITS_PER_LONG)]; +	spinlock_t		lock;  };  int amdgpu_device_wb_get(struct amdgpu_device *adev, u32 *wb); @@ -606,7 +621,7 @@ struct amdgpu_asic_funcs {  	/* PCIe replay counter */  	uint64_t (*get_pcie_replay_count)(struct amdgpu_device *adev);  	/* device supports BACO */ -	bool (*supports_baco)(struct amdgpu_device *adev); +	int (*supports_baco)(struct amdgpu_device *adev);  	/* pre asic_init quirks */  	void (*pre_asic_init)(struct amdgpu_device *adev);  	/* enter/exit umd stable pstate */ @@ -708,6 +723,7 @@ enum amd_hw_ip_block_type {  	XGMI_HWIP,  	DCI_HWIP,  	PCIE_HWIP, +	ISP_HWIP,  	MAX_HWIP  }; @@ -1034,9 +1050,15 @@ struct amdgpu_device {  	/* display related functionality */  	struct amdgpu_display_manager dm; +#if defined(CONFIG_DRM_AMD_ISP) +	/* isp */ +	struct amdgpu_isp		isp; +#endif +  	/* mes */  	bool                            enable_mes;  	bool                            enable_mes_kiq; +	bool                            enable_uni_mes;  	struct amdgpu_mes               mes;  	struct amdgpu_mqd               mqds[AMDGPU_HW_IP_NUM]; @@ -1152,6 +1174,7 @@ struct amdgpu_device {  	bool                            debug_largebar;  	bool                            debug_disable_soft_recovery;  	bool                            debug_use_vram_fw_buf; +	bool                            debug_enable_ras_aca;  };  static inline uint32_t amdgpu_ip_version(const struct amdgpu_device *adev, @@ -1408,7 +1431,8 @@ bool amdgpu_device_supports_atpx(struct drm_device *dev);  bool amdgpu_device_supports_px(struct drm_device *dev);  bool amdgpu_device_supports_boco(struct drm_device *dev);  bool amdgpu_device_supports_smart_shift(struct drm_device *dev); -bool amdgpu_device_supports_baco(struct drm_device *dev); +int amdgpu_device_supports_baco(struct drm_device *dev); +void amdgpu_device_detect_runtime_pm_mode(struct amdgpu_device *adev);  bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,  				      struct amdgpu_device *peer_adev);  int amdgpu_device_baco_enter(struct drm_device *dev); @@ -1424,6 +1448,7 @@ u32 amdgpu_device_pcie_port_rreg(struct amdgpu_device *adev,  				u32 reg);  void amdgpu_device_pcie_port_wreg(struct amdgpu_device *adev,  				u32 reg, u32 v); +struct dma_fence *amdgpu_device_get_gang(struct amdgpu_device *adev);  struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev,  					    struct dma_fence *gang);  bool amdgpu_device_has_display_hardware(struct amdgpu_device *adev); @@ -1550,6 +1575,7 @@ static inline int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,  						  u8 dev_state, bool drv_state) { return 0; }  static inline int amdgpu_acpi_smart_shift_update(struct drm_device *dev,  						 enum amdgpu_ss ss_state) { return 0; } +static inline void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_caps *caps) { }  #endif  #if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND) |