]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
Merge tag 'h8300-for-linus-20190617' of git://git.sourceforge.jp/gitroot/uclinux...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ucode.c
index ee54d9e0ce1fc11232a952ad64afcef344d5cbae..c352a519ddd4f365081fc5ea1c1479a570db54e5 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/firmware.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <drm/drmP.h>
+
 #include "amdgpu.h"
 #include "amdgpu_ucode.h"
 
@@ -77,6 +77,14 @@ void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr)
                        container_of(hdr, struct smc_firmware_header_v1_0, header);
 
                DRM_DEBUG("ucode_start_addr: %u\n", le32_to_cpu(smc_hdr->ucode_start_addr));
+       } else if (version_major == 2) {
+               const struct smc_firmware_header_v1_0 *v1_hdr =
+                       container_of(hdr, struct smc_firmware_header_v1_0, header);
+               const struct smc_firmware_header_v2_0 *v2_hdr =
+                       container_of(v1_hdr, struct smc_firmware_header_v2_0, v1_0);
+
+               DRM_INFO("ppt_offset_bytes: %u\n", le32_to_cpu(v2_hdr->ppt_offset_bytes));
+               DRM_INFO("ppt_size_bytes: %u\n", le32_to_cpu(v2_hdr->ppt_size_bytes));
        } else {
                DRM_ERROR("Unknown SMC ucode version: %u.%u\n", version_major, version_minor);
        }
@@ -336,12 +344,11 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)
        case CHIP_RAVEN:
        case CHIP_VEGA12:
        case CHIP_VEGA20:
+       case CHIP_NAVI10:
                if (!load_type)
                        return AMDGPU_FW_LOAD_DIRECT;
                else
                        return AMDGPU_FW_LOAD_PSP;
-       case CHIP_NAVI10:
-               return AMDGPU_FW_LOAD_DIRECT;
        default:
                DRM_ERROR("Unknown firmware load type\n");
        }
This page took 0.037223 seconds and 4 git commands to generate.