]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu.h
Merge tag 'drm-misc-next-2018-11-21' of git://anongit.freedesktop.org/drm/drm-misc...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu.h
index c05b394386634b971c5402cd2612f759de9cfe7a..42f882c633eeebff07513f2ba60fb0d995aa6c65 100644 (file)
 #include "amdgpu_sdma.h"
 #include "amdgpu_dm.h"
 #include "amdgpu_virt.h"
+#include "amdgpu_csa.h"
 #include "amdgpu_gart.h"
 #include "amdgpu_debugfs.h"
 #include "amdgpu_job.h"
 #include "amdgpu_bo_list.h"
 #include "amdgpu_gem.h"
 
+#define MAX_GPU_INSTANCE               16
+
+struct amdgpu_gpu_instance
+{
+       struct amdgpu_device            *adev;
+       int                             mgpu_fan_enabled;
+};
+
+struct amdgpu_mgpu_info
+{
+       struct amdgpu_gpu_instance      gpu_ins[MAX_GPU_INSTANCE];
+       struct mutex                    mutex;
+       uint32_t                        num_gpu;
+       uint32_t                        num_dgpu;
+       uint32_t                        num_apu;
+};
+
 /*
  * Modules parameters.
  */
@@ -134,6 +152,8 @@ extern int amdgpu_compute_multipipe;
 extern int amdgpu_gpu_recovery;
 extern int amdgpu_emu_mode;
 extern uint amdgpu_smu_memory_pool_size;
+extern uint amdgpu_dc_feature_mask;
+extern struct amdgpu_mgpu_info mgpu_info;
 
 #ifdef CONFIG_DRM_AMDGPU_SI
 extern int amdgpu_si_support;
@@ -414,7 +434,7 @@ typedef enum _AMDGPU_DOORBELL64_ASSIGNMENT
         * default non-graphics QWORD index is 0xe0 - 0xFF inclusive
         */
 
-       /* sDMA engines  reserved from 0xe0 -oxef  */
+       /* sDMA engines  reserved from 0xe0 -0xef  */
        AMDGPU_DOORBELL64_sDMA_ENGINE0            = 0xE0,
        AMDGPU_DOORBELL64_sDMA_HI_PRI_ENGINE0     = 0xE1,
        AMDGPU_DOORBELL64_sDMA_ENGINE1            = 0xE8,
@@ -598,31 +618,6 @@ void amdgpu_benchmark(struct amdgpu_device *adev, int test_number);
  */
 void amdgpu_test_moves(struct amdgpu_device *adev);
 
-
-/*
- * amdgpu smumgr functions
- */
-struct amdgpu_smumgr_funcs {
-       int (*check_fw_load_finish)(struct amdgpu_device *adev, uint32_t fwtype);
-       int (*request_smu_load_fw)(struct amdgpu_device *adev);
-       int (*request_smu_specific_fw)(struct amdgpu_device *adev, uint32_t fwtype);
-};
-
-/*
- * amdgpu smumgr
- */
-struct amdgpu_smumgr {
-       struct amdgpu_bo *toc_buf;
-       struct amdgpu_bo *smu_buf;
-       /* asic priv smu data */
-       void *priv;
-       spinlock_t smu_lock;
-       /* smumgr functions */
-       const struct amdgpu_smumgr_funcs *smumgr_funcs;
-       /* ucode loading complete flag */
-       uint32_t fw_flags;
-};
-
 /*
  * ASIC specific register table accessible by UMD
  */
@@ -837,7 +832,6 @@ struct amdgpu_device {
        bool                            need_dma32;
        bool                            need_swiotlb;
        bool                            accel_working;
-       struct work_struct              reset_work;
        struct notifier_block           acpi_nb;
        struct amdgpu_i2c_chan          *i2c_bus[AMDGPU_MAX_I2C_BUS];
        struct amdgpu_debugfs           debugfs[AMDGPU_DEBUGFS_MAX_COMPONENTS];
@@ -958,9 +952,6 @@ struct amdgpu_device {
        u32                             cg_flags;
        u32                             pg_flags;
 
-       /* amdgpu smumgr */
-       struct amdgpu_smumgr smu;
-
        /* gfx */
        struct amdgpu_gfx               gfx;
 
@@ -1025,6 +1016,9 @@ struct amdgpu_device {
        bool has_hw_reset;
        u8                              reset_magic[AMDGPU_RESET_MAGIC_NUM];
 
+       /* s3/s4 mask */
+       bool                            in_suspend;
+
        /* record last mm index being written through WREG32*/
        unsigned long last_mm_index;
        bool                            in_gpu_reset;
This page took 0.037613 seconds and 4 git commands to generate.