From: Oded Gabbay <oded.gabbay@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/radeon: Add implementation of get_fw_version
Date: Sun, 14 Dec 2014 12:24:03 +0200 [thread overview]
Message-ID: <548D6543.8010604@amd.com> (raw)
In-Reply-To: <CADnq5_MSMdMZOuuvmWbNqxeAaXctw477g6b_PxY-cvfT9ZJW8A@mail.gmail.com>
On 12/10/2014 11:57 PM, Alex Deucher wrote:
> On Wed, Dec 10, 2014 at 8:13 AM, Oded Gabbay <oded.gabbay@amd.com> wrote:
>> From: Alexey Skidanov <Alexey.Skidanov@amd.com>
>>
>> This patch implements a new interface that was added to the kfd-->kgd interface.
>> The new interface function retrieves the firmware version that is currently
>> in use by the MEC engine. The firmware was uploaded to the MEC engine by the
>> radeon driver.
>>
>> Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
>> Reviewed-by: Oded Gabbay <oded.gabbay@amd.com>
>> ---
>> drivers/gpu/drm/radeon/radeon_kfd.c | 23 +++++++++++++++++++++++
>> 1 file changed, 23 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c
>> index 065d020..223c831 100644
>> --- a/drivers/gpu/drm/radeon/radeon_kfd.c
>> +++ b/drivers/gpu/drm/radeon/radeon_kfd.c
>> @@ -28,6 +28,8 @@
>> #include "cikd.h"
>> #include "cik_reg.h"
>> #include "radeon_kfd.h"
>> +#include "radeon_ucode.h"
>> +#include <linux/firmware.h>
>>
>> #define CIK_PIPE_PER_MEC (4)
>>
>> @@ -49,6 +51,7 @@ static uint64_t get_vmem_size(struct kgd_dev *kgd);
>> static uint64_t get_gpu_clock_counter(struct kgd_dev *kgd);
>>
>> static uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd);
>> +static uint16_t get_fw_version(struct kgd_dev *kgd);
>>
>> /*
>> * Register access functions
>> @@ -91,6 +94,7 @@ static const struct kfd2kgd_calls kfd2kgd = {
>> .hqd_load = kgd_hqd_load,
>> .hqd_is_occupies = kgd_hqd_is_occupies,
>> .hqd_destroy = kgd_hqd_destroy,
>> + .get_fw_version = get_fw_version
>> };
>>
>> static const struct kgd2kfd_calls *kgd2kfd;
>> @@ -561,3 +565,22 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type,
>> release_queue(kgd);
>> return 0;
>> }
>> +
>> +static uint16_t get_fw_version(struct kgd_dev *kgd)
>
> I think it would be better to call the is get_mec_fw_version or add an
> engine and/or instance parameter if it need to query other engines
> (e.g., MEC2 or GFX).
>
Right, I will add the engine parameter.
>> +{
>> + struct radeon_device *rdev;
>> + const struct gfx_firmware_header_v1_0 *hdr;
>> +
>> + BUG_ON(kgd == NULL);
>> +
>> + rdev = (struct radeon_device *) kgd;
>> +
>> + BUG_ON(rdev->mec_fw == NULL);
>> +
>> + hdr = (const struct gfx_firmware_header_v1_0 *)rdev->mec_fw->data;
>> +
>
> Do you care about the fw version of MEC2?
Not currently, as MEC1 & MEC2 have the same fw version, although we load
different fw files to them.
Oded
>
> Alex
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-12-14 10:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 13:13 [PATCH 1/3] drm/amd: Add get_fw_version to kfd-->kgd interface Oded Gabbay
2014-12-10 13:13 ` [PATCH 2/3] drm/radeon: Add implementation of get_fw_version Oded Gabbay
2014-12-10 21:57 ` Alex Deucher
2014-12-14 10:24 ` Oded Gabbay [this message]
2014-12-10 13:13 ` [PATCH 3/3] amdkfd: Display MEC fw version in topology node Oded Gabbay
-- strict thread matches above, loose matches on Subject: below --
2014-12-14 12:29 [PATCH 1/3] drm/amd: Add get_fw_version to kfd-->kgd interface Oded Gabbay
2014-12-14 12:29 ` [PATCH 2/3] drm/radeon: Add implementation of get_fw_version Oded Gabbay
2014-12-15 15:33 ` Alex Deucher
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=548D6543.8010604@amd.com \
--to=oded.gabbay@amd.com \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.