diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 | 
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 2eca58220550..164141bc8b4a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -52,8 +52,7 @@  #include <linux/pci.h>  #include <linux/aer.h> -#include <drm/ttm/ttm_bo_api.h> -#include <drm/ttm/ttm_bo_driver.h> +#include <drm/ttm/ttm_bo.h>  #include <drm/ttm/ttm_placement.h>  #include <drm/ttm/ttm_execbuf_util.h> @@ -82,7 +81,6 @@  #include "amdgpu_vce.h"  #include "amdgpu_vcn.h"  #include "amdgpu_jpeg.h" -#include "amdgpu_mn.h"  #include "amdgpu_gmc.h"  #include "amdgpu_gfx.h"  #include "amdgpu_sdma.h" @@ -151,7 +149,7 @@ struct amdgpu_watchdog_timer   * Modules parameters.   */  extern int amdgpu_modeset; -extern int amdgpu_vram_limit; +extern unsigned int amdgpu_vram_limit;  extern int amdgpu_vis_vram_limit;  extern int amdgpu_gart_size;  extern int amdgpu_gtt_size; @@ -196,6 +194,7 @@ extern int amdgpu_emu_mode;  extern uint amdgpu_smu_memory_pool_size;  extern int amdgpu_smu_pptable_id;  extern uint amdgpu_dc_feature_mask; +extern uint amdgpu_freesync_vid_mode;  extern uint amdgpu_dc_debug_mask;  extern uint amdgpu_dc_visual_confirm;  extern uint amdgpu_dm_abm_level; @@ -219,10 +218,12 @@ extern int amdgpu_use_xgmi_p2p;  extern int sched_policy;  extern bool debug_evictions;  extern bool no_system_mem_limit; +extern int halt_if_hws_hang;  #else  static const int __maybe_unused sched_policy = KFD_SCHED_POLICY_HWS;  static const bool __maybe_unused debug_evictions; /* = false */  static const bool __maybe_unused no_system_mem_limit; +static const int __maybe_unused halt_if_hws_hang;  #endif  #ifdef CONFIG_HSA_AMD_P2P  extern bool pcie_p2p; @@ -241,6 +242,7 @@ extern int amdgpu_num_kcq;  #define AMDGPU_VCNFW_LOG_SIZE (32 * 1024)  extern int amdgpu_vcnfw_log; +extern int amdgpu_sg_display;  #define AMDGPU_VM_MAX_NUM_CTX			4096  #define AMDGPU_SG_THRESHOLD			(256*1024*1024) @@ -607,7 +609,7 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, void *data,  				struct drm_file *filp);  /* VRAM scratch page for HDP bug, default vram page */ -struct amdgpu_vram_scratch { +struct amdgpu_mem_scratch {  	struct amdgpu_bo		*robj;  	volatile uint32_t		*ptr;  	u64				gpu_addr; @@ -675,7 +677,7 @@ enum amd_hw_ip_block_type {  	MAX_HWIP  }; -#define HWIP_MAX_INSTANCE	11 +#define HWIP_MAX_INSTANCE	28  #define HW_ID_MAX		300  #define IP_VERSION(mj, mn, rv) (((mj) << 16) | ((mn) << 8) | (rv)) @@ -754,6 +756,11 @@ struct amdgpu_mqd {  #define AMDGPU_PRODUCT_NAME_LEN 64  struct amdgpu_reset_domain; +/* + * Non-zero (true) if the GPU has VRAM. Zero (false) otherwise. + */ +#define AMDGPU_HAS_VRAM(_adev) ((_adev)->gmc.real_vram_size) +  struct amdgpu_device {  	struct device			*dev;  	struct pci_dev			*pdev; @@ -847,7 +854,7 @@ struct amdgpu_device {  	/* memory management */  	struct amdgpu_mman		mman; -	struct amdgpu_vram_scratch	vram_scratch; +	struct amdgpu_mem_scratch	mem_scratch;  	struct amdgpu_wb		wb;  	atomic64_t			num_bytes_moved;  	atomic64_t			num_evictions; @@ -869,7 +876,7 @@ struct amdgpu_device {  	struct amdgpu_vkms_output       *amdgpu_vkms_output;  	struct amdgpu_mode_info		mode_info;  	/* For pre-DCE11. DCE11 and later are in "struct amdgpu_device->dm" */ -	struct work_struct		hotplug_work; +	struct delayed_work         hotplug_work;  	struct amdgpu_irq_src		crtc_irq;  	struct amdgpu_irq_src		vline0_irq;  	struct amdgpu_irq_src		vupdate_irq; @@ -1063,6 +1070,7 @@ struct amdgpu_device {  	struct work_struct		reset_work;  	bool                            job_hang; +	bool                            dc_enabled;  };  static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev) @@ -1120,6 +1128,8 @@ void amdgpu_device_indirect_wreg64(struct amdgpu_device *adev,  bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type);  bool amdgpu_device_has_dc_support(struct amdgpu_device *adev); +void amdgpu_device_set_sriov_virtual_display(struct amdgpu_device *adev); +  int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,  				 struct amdgpu_reset_context *reset_context);  |