diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-28 20:49:53 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-28 20:49:53 -0400 |
| commit | 53b3b6bbfde6aae8d1ededc86ad4e0e1e00eb5f8 (patch) | |
| tree | b29473f21270aefd113b298c9402be8b4b3c91b4 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | |
| parent | 746bb4ed6d626f3f9e431a7f9b20504538e62ded (diff) | |
| parent | f2bfc71aee75feff33ca659322b72ffeed5a243d (diff) | |
Merge tag 'drm-next-2018-10-24' of git://anongit.freedesktop.org/drm/drm
Pull drm updates from Dave Airlie:
"This is going to rebuild more than drm as it adds a new helper to
list.h for doing bulk updates. Seemed like a reasonable addition to
me.
Otherwise the usual merge window stuff lots of i915 and amdgpu, not so
much nouveau, and piles of everything else.
Core:
- Adds a new list.h helper for doing bulk list updates for TTM.
- Don't leak fb address in smem_start to userspace (comes with EXPORT
workaround for people using mali out of tree hacks)
- udmabuf device to turn memfd regions into dma-buf
- Per-plane blend mode property
- ref/unref replacements with get/put
- fbdev conflicting framebuffers code cleaned up
- host-endian format variants
- panel orientation quirk for Acer One 10
bridge:
- TI SN65DSI86 chip support
vkms:
- GEM support.
- Cursor support
amdgpu:
- Merge amdkfd and amdgpu into one module
- CEC over DP AUX support
- Picasso APU support + VCN dynamic powergating
- Raven2 APU support
- Vega20 enablement + kfd support
- ACP powergating improvements
- ABGR/XBGR display support
- VCN jpeg support
- xGMI support
- DC i2c/aux cleanup
- Ycbcr 4:2:0 support
- GPUVM improvements
- Powerplay and powerplay endian fixes
- Display underflow fixes
vmwgfx:
- Move vmwgfx specific TTM code to vmwgfx
- Split out vmwgfx buffer/resource validation code
- Atomic operation rework
bochs:
- use more helpers
- format/byteorder improvements
qxl:
- use more helpers
i915:
- GGTT coherency getparam
- Turn off resource streamer API
- More Icelake enablement + DMC firmware
- Full PPGTT for Ivybridge, Haswell and Valleyview
- DDB distribution based on resolution
- Limited range DP display support
nouveau:
- CEC over DP AUX support
- Initial HDMI 2.0 support
virtio-gpu:
- vmap support for PRIME objects
tegra:
- Initial Tegra194 support
- DMA/IOMMU integration fixes
msm:
- a6xx perf improvements + clock prefix
- GPU preemption optimisations
- a6xx devfreq support
- cursor support
rockchip:
- PX30 support
- rgb output interface support
mediatek:
- HDMI output support on mt2701 and mt7623
rcar-du:
- Interlaced modes on Gen3
- LVDS on R8A77980
- D3 and E3 SoC support
hisilicon:
- misc fixes
mxsfb:
- runtime pm support
sun4i:
- R40 TCON support
- Allwinner A64 support
- R40 HDMI support
omapdrm:
- Driver rework changing display pipeline ordering to use common code
- DMM memory barrier and irq fixes
- Errata workarounds
exynos:
- out-bridge support for LVDS bridge driver
- Samsung 16x16 tiled format support
- Plane alpha and pixel blend mode support
tilcdc:
- suspend/resume update
mali-dp:
- misc updates"
* tag 'drm-next-2018-10-24' of git://anongit.freedesktop.org/drm/drm: (1382 commits)
firmware/dmc/icl: Add missing MODULE_FIRMWARE() for Icelake.
drm/i915/icl: Fix signal_levels
drm/i915/icl: Fix DDI/TC port clk_off bits
drm/i915/icl: create function to identify combophy port
drm/i915/gen9+: Fix initial readout for Y tiled framebuffers
drm/i915: Large page offsets for pread/pwrite
drm/i915/selftests: Disable shrinker across mmap-exhaustion
drm/i915/dp: Link train Fallback on eDP only if fallback link BW can fit panel's native mode
drm/i915: Fix intel_dp_mst_best_encoder()
drm/i915: Skip vcpi allocation for MSTB ports that are gone
drm/i915: Don't unset intel_connector->mst_port
drm/i915: Only reset seqno if actually idle
drm/i915: Use the correct crtc when sanitizing plane mapping
drm/i915: Restore vblank interrupts earlier
drm/i915: Check fb stride against plane max stride
drm/amdgpu/vcn:Fix uninitialized symbol error
drm: panel-orientation-quirks: Add quirk for Acer One 10 (S1003)
drm/amd/amdgpu: Fix debugfs error handling
drm/amdgpu: Update gc_9_0 golden settings.
drm/amd/powerplay: update PPtable with DC BTC and Tvr SocLimit fields
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h index bdc472b6e641..aa6641b944a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | |||
| @@ -157,6 +157,13 @@ struct gpu_info_firmware_header_v1_0 { | |||
| 157 | uint16_t version_minor; /* version */ | 157 | uint16_t version_minor; /* version */ |
| 158 | }; | 158 | }; |
| 159 | 159 | ||
| 160 | /* version_major=1, version_minor=0 */ | ||
| 161 | struct dmcu_firmware_header_v1_0 { | ||
| 162 | struct common_firmware_header header; | ||
| 163 | uint32_t intv_offset_bytes; /* interrupt vectors offset from end of header, in bytes */ | ||
| 164 | uint32_t intv_size_bytes; /* size of interrupt vectors, in bytes */ | ||
| 165 | }; | ||
| 166 | |||
| 160 | /* header is fixed size */ | 167 | /* header is fixed size */ |
| 161 | union amdgpu_firmware_header { | 168 | union amdgpu_firmware_header { |
| 162 | struct common_firmware_header common; | 169 | struct common_firmware_header common; |
| @@ -170,6 +177,7 @@ union amdgpu_firmware_header { | |||
| 170 | struct sdma_firmware_header_v1_0 sdma; | 177 | struct sdma_firmware_header_v1_0 sdma; |
| 171 | struct sdma_firmware_header_v1_1 sdma_v1_1; | 178 | struct sdma_firmware_header_v1_1 sdma_v1_1; |
| 172 | struct gpu_info_firmware_header_v1_0 gpu_info; | 179 | struct gpu_info_firmware_header_v1_0 gpu_info; |
| 180 | struct dmcu_firmware_header_v1_0 dmcu; | ||
| 173 | uint8_t raw[0x100]; | 181 | uint8_t raw[0x100]; |
| 174 | }; | 182 | }; |
| 175 | 183 | ||
| @@ -193,8 +201,11 @@ enum AMDGPU_UCODE_ID { | |||
| 193 | AMDGPU_UCODE_ID_STORAGE, | 201 | AMDGPU_UCODE_ID_STORAGE, |
| 194 | AMDGPU_UCODE_ID_SMC, | 202 | AMDGPU_UCODE_ID_SMC, |
| 195 | AMDGPU_UCODE_ID_UVD, | 203 | AMDGPU_UCODE_ID_UVD, |
| 204 | AMDGPU_UCODE_ID_UVD1, | ||
| 196 | AMDGPU_UCODE_ID_VCE, | 205 | AMDGPU_UCODE_ID_VCE, |
| 197 | AMDGPU_UCODE_ID_VCN, | 206 | AMDGPU_UCODE_ID_VCN, |
| 207 | AMDGPU_UCODE_ID_DMCU_ERAM, | ||
| 208 | AMDGPU_UCODE_ID_DMCU_INTV, | ||
| 198 | AMDGPU_UCODE_ID_MAXIMUM, | 209 | AMDGPU_UCODE_ID_MAXIMUM, |
| 199 | }; | 210 | }; |
| 200 | 211 | ||
| @@ -205,6 +216,12 @@ enum AMDGPU_UCODE_STATUS { | |||
| 205 | AMDGPU_UCODE_STATUS_LOADED, | 216 | AMDGPU_UCODE_STATUS_LOADED, |
| 206 | }; | 217 | }; |
| 207 | 218 | ||
| 219 | enum amdgpu_firmware_load_type { | ||
| 220 | AMDGPU_FW_LOAD_DIRECT = 0, | ||
| 221 | AMDGPU_FW_LOAD_SMU, | ||
| 222 | AMDGPU_FW_LOAD_PSP, | ||
| 223 | }; | ||
| 224 | |||
| 208 | /* conform to smu_ucode_xfer_cz.h */ | 225 | /* conform to smu_ucode_xfer_cz.h */ |
| 209 | #define AMDGPU_SDMA0_UCODE_LOADED 0x00000001 | 226 | #define AMDGPU_SDMA0_UCODE_LOADED 0x00000001 |
| 210 | #define AMDGPU_SDMA1_UCODE_LOADED 0x00000002 | 227 | #define AMDGPU_SDMA1_UCODE_LOADED 0x00000002 |
| @@ -232,6 +249,24 @@ struct amdgpu_firmware_info { | |||
| 232 | uint32_t tmr_mc_addr_hi; | 249 | uint32_t tmr_mc_addr_hi; |
| 233 | }; | 250 | }; |
| 234 | 251 | ||
| 252 | struct amdgpu_firmware { | ||
| 253 | struct amdgpu_firmware_info ucode[AMDGPU_UCODE_ID_MAXIMUM]; | ||
| 254 | enum amdgpu_firmware_load_type load_type; | ||
| 255 | struct amdgpu_bo *fw_buf; | ||
| 256 | unsigned int fw_size; | ||
| 257 | unsigned int max_ucodes; | ||
| 258 | /* firmwares are loaded by psp instead of smu from vega10 */ | ||
| 259 | const struct amdgpu_psp_funcs *funcs; | ||
| 260 | struct amdgpu_bo *rbuf; | ||
| 261 | struct mutex mutex; | ||
| 262 | |||
| 263 | /* gpu info firmware data pointer */ | ||
| 264 | const struct firmware *gpu_info_fw; | ||
| 265 | |||
| 266 | void *fw_buf_ptr; | ||
| 267 | uint64_t fw_buf_mc; | ||
| 268 | }; | ||
| 269 | |||
| 235 | void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr); | 270 | void amdgpu_ucode_print_mc_hdr(const struct common_firmware_header *hdr); |
| 236 | void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr); | 271 | void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr); |
| 237 | void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr); | 272 | void amdgpu_ucode_print_gfx_hdr(const struct common_firmware_header *hdr); |
| @@ -241,8 +276,10 @@ void amdgpu_ucode_print_gpu_info_hdr(const struct common_firmware_header *hdr); | |||
| 241 | int amdgpu_ucode_validate(const struct firmware *fw); | 276 | int amdgpu_ucode_validate(const struct firmware *fw); |
| 242 | bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr, | 277 | bool amdgpu_ucode_hdr_version(union amdgpu_firmware_header *hdr, |
| 243 | uint16_t hdr_major, uint16_t hdr_minor); | 278 | uint16_t hdr_major, uint16_t hdr_minor); |
| 279 | |||
| 244 | int amdgpu_ucode_init_bo(struct amdgpu_device *adev); | 280 | int amdgpu_ucode_init_bo(struct amdgpu_device *adev); |
| 245 | int amdgpu_ucode_fini_bo(struct amdgpu_device *adev); | 281 | int amdgpu_ucode_create_bo(struct amdgpu_device *adev); |
| 282 | void amdgpu_ucode_free_bo(struct amdgpu_device *adev); | ||
| 246 | 283 | ||
| 247 | enum amdgpu_firmware_load_type | 284 | enum amdgpu_firmware_load_type |
| 248 | amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type); | 285 | amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type); |
