From: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Cc: Ken Wang <Qingqing.Wang-5C7GfCeVMHo@public.gmane.org>,
Hui Yu <Hui.Yu-5C7GfCeVMHo@public.gmane.org>,
Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>,
Alvin Huan <Alvin.Huan-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 01/14] drm/amdgpu: add gfx v6 firmware versions for sysfs dump
Date: Tue, 30 Aug 2016 19:49:58 +0800 [thread overview]
Message-ID: <1472557811-8015-2-git-send-email-ray.huang@amd.com> (raw)
In-Reply-To: <1472557811-8015-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
Change-Id: I4af15bca9b20190803411afcd8711c10ec25ac56
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index f3ad4aa..17a560c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -298,6 +298,8 @@ static int gfx_v6_0_init_microcode(struct amdgpu_device *adev)
const char *chip_name;
char fw_name[30];
int err;
+ const struct gfx_firmware_header_v1_0 *cp_hdr;
+ const struct rlc_firmware_header_v1_0 *rlc_hdr;
DRM_DEBUG("\n");
@@ -327,6 +329,9 @@ static int gfx_v6_0_init_microcode(struct amdgpu_device *adev)
err = amdgpu_ucode_validate(adev->gfx.pfp_fw);
if (err)
goto out;
+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.pfp_fw->data;
+ adev->gfx.pfp_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
+ adev->gfx.pfp_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
snprintf(fw_name, sizeof(fw_name), "radeon/%s_me.bin", chip_name);
err = request_firmware(&adev->gfx.me_fw, fw_name, adev->dev);
@@ -335,6 +340,9 @@ static int gfx_v6_0_init_microcode(struct amdgpu_device *adev)
err = amdgpu_ucode_validate(adev->gfx.me_fw);
if (err)
goto out;
+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
+ adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
+ adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
snprintf(fw_name, sizeof(fw_name), "radeon/%s_ce.bin", chip_name);
err = request_firmware(&adev->gfx.ce_fw, fw_name, adev->dev);
@@ -343,12 +351,18 @@ static int gfx_v6_0_init_microcode(struct amdgpu_device *adev)
err = amdgpu_ucode_validate(adev->gfx.ce_fw);
if (err)
goto out;
+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data;
+ adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
+ adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
snprintf(fw_name, sizeof(fw_name), "radeon/%s_rlc.bin", chip_name);
err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
if (err)
goto out;
err = amdgpu_ucode_validate(adev->gfx.rlc_fw);
+ rlc_hdr = (const struct rlc_firmware_header_v1_0 *)adev->gfx.rlc_fw->data;
+ adev->gfx.rlc_fw_version = le32_to_cpu(rlc_hdr->header.ucode_version);
+ adev->gfx.rlc_feature_version = le32_to_cpu(rlc_hdr->ucode_feature_version);
out:
if (err) {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2016-08-30 11:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 11:49 [PATCH 00/14] drm/amdgpu/si: Make SI DPM workable Huang Rui
[not found] ` <1472557811-8015-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2016-08-30 11:49 ` Huang Rui [this message]
2016-08-30 11:49 ` [PATCH 02/14] drm/amdgpu: add gmc v6 firmware versions for sysfs dump Huang Rui
2016-08-30 11:50 ` [PATCH 03/14] drm/amdgpu/si: add SI smc " Huang Rui
2016-08-30 11:50 ` [PATCH 04/14] drm/amdgpu: remove useless functions of si dpm Huang Rui
2016-08-30 11:50 ` [PATCH 05/14] drm/amdgpu: use DRM print instead of printk Huang Rui
2016-08-30 11:50 ` [PATCH 06/14] drm/amdgpu: fix oland and hainan asic specific handle at si_program_aspm Huang Rui
2016-08-30 11:50 ` [PATCH 07/14] drm/amdgpu/si: fix the dce6 for si macro Huang Rui
[not found] ` <1472557811-8015-8-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2016-08-30 14:17 ` Deucher, Alexander
[not found] ` <MWHPR12MB169435C80C235E574E2D61FBF7E00-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-08-30 16:04 ` Huang Rui
2016-08-30 11:50 ` [PATCH 08/14] drm/amdgpu: fix the tahiti specific value of DEEP_SLEEP_CLK_SEL field Huang Rui
2016-08-30 11:50 ` [PATCH 09/14] drm/amdgpu: fix to miss adding thermal controller Huang Rui
2016-08-30 11:50 ` [PATCH 10/14] drm/amdgpu: add rv770_get_memory_type to set the GDDR5 flag Huang Rui
[not found] ` <1472557811-8015-11-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2016-08-30 14:21 ` Deucher, Alexander
[not found] ` <MWHPR12MB1694FA622ACA818EB655A084F7E00-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-08-30 16:07 ` Huang Rui
2016-08-30 16:17 ` Deucher, Alexander
[not found] ` <MWHPR12MB1694B6182E10BB1F6D03897FF7E00-Gy0DoCVfaSW4WA4dJ5YXGAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-08-30 16:28 ` Huang Rui
2016-08-30 11:50 ` [PATCH 11/14] drm/amdgpu: fix incorrect index of CG_FFCT_0 register Huang Rui
2016-08-30 11:50 ` [PATCH 12/14] drm/amdgpu: introduce pcie port read/write entry Huang Rui
2016-08-30 11:50 ` [PATCH 13/14] drm/amdgpu: fix incorrect reading method at si_get_current_pcie_speed Huang Rui
2016-08-30 11:50 ` [PATCH 14/14] drm/amdgpu/si: enable SI DPM by default Huang Rui
2016-08-30 12:30 ` [PATCH 00/14] drm/amdgpu/si: Make SI DPM workable Christian König
[not found] ` <9298c36a-caef-3b43-285b-d118134a73e6-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-30 15:57 ` Huang Rui
2016-08-30 14:23 ` Deucher, Alexander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472557811-8015-2-git-send-email-ray.huang@amd.com \
--to=ray.huang-5c7gfcevmho@public.gmane.org \
--cc=Alvin.Huan-5C7GfCeVMHo@public.gmane.org \
--cc=Hui.Yu-5C7GfCeVMHo@public.gmane.org \
--cc=Qingqing.Wang-5C7GfCeVMHo@public.gmane.org \
--cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox