diff mbox

[1/3] drm/amd: Add get_fw_version to kfd-->kgd interface

Message ID 1418560200-17692-1-git-send-email-oded.gabbay@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Oded Gabbay Dec. 14, 2014, 12:29 p.m. UTC
This patch adds a new interface 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 kgd
(radeon).

v2: Added parameter of engine type to interface function

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
 drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Oded Gabbay Dec. 14, 2014, 12:31 p.m. UTC | #1
This should be [PATCH v2 x/3] for all three patches.
Sorry.

	Oded

On 12/14/2014 02:29 PM, Oded Gabbay wrote:
> This patch adds a new interface 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 kgd
> (radeon).
>
> v2: Added parameter of engine type to interface function
>
> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
> ---
>   drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> index 9c729dd..47b5519 100644
> --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> @@ -45,6 +45,17 @@ enum kgd_memory_pool {
>   	KGD_POOL_FRAMEBUFFER = 3,
>   };
>
> +enum kgd_engine_type {
> +	KGD_ENGINE_PFP = 1,
> +	KGD_ENGINE_ME,
> +	KGD_ENGINE_CE,
> +	KGD_ENGINE_MEC1,
> +	KGD_ENGINE_MEC2,
> +	KGD_ENGINE_RLC,
> +	KGD_ENGINE_SDMA,
> +	KGD_ENGINE_MAX
> +};
> +
>   struct kgd2kfd_shared_resources {
>   	/* Bit n == 1 means VMID n is available for KFD. */
>   	unsigned int compute_vmid_bitmap;
> @@ -137,6 +148,8 @@ struct kgd2kfd_calls {
>    *
>    * @hqd_destroy: Destructs and preempts the queue assigned to that hqd slot.
>    *
> + * @get_fw_version: Returns FW versions from the header
> + *
>    * This structure contains function pointers to services that the kgd driver
>    * provides to amdkfd driver.
>    *
> @@ -176,6 +189,8 @@ struct kfd2kgd_calls {
>   	int (*hqd_destroy)(struct kgd_dev *kgd, uint32_t reset_type,
>   				unsigned int timeout, uint32_t pipe_id,
>   				uint32_t queue_id);
> +	uint16_t (*get_fw_version)(struct kgd_dev *kgd,
> +				enum kgd_engine_type type);
>   };
>
>   bool kgd2kfd_init(unsigned interface_version,
>
Alex Deucher Dec. 15, 2014, 3:35 p.m. UTC | #2
On Sun, Dec 14, 2014 at 7:29 AM, Oded Gabbay <oded.gabbay@amd.com> wrote:
> This patch adds a new interface 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 kgd
> (radeon).
>
> v2: Added parameter of engine type to interface function
>
> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>

For the series:

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> index 9c729dd..47b5519 100644
> --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> @@ -45,6 +45,17 @@ enum kgd_memory_pool {
>         KGD_POOL_FRAMEBUFFER = 3,
>  };
>
> +enum kgd_engine_type {
> +       KGD_ENGINE_PFP = 1,
> +       KGD_ENGINE_ME,
> +       KGD_ENGINE_CE,
> +       KGD_ENGINE_MEC1,
> +       KGD_ENGINE_MEC2,
> +       KGD_ENGINE_RLC,
> +       KGD_ENGINE_SDMA,
> +       KGD_ENGINE_MAX
> +};
> +
>  struct kgd2kfd_shared_resources {
>         /* Bit n == 1 means VMID n is available for KFD. */
>         unsigned int compute_vmid_bitmap;
> @@ -137,6 +148,8 @@ struct kgd2kfd_calls {
>   *
>   * @hqd_destroy: Destructs and preempts the queue assigned to that hqd slot.
>   *
> + * @get_fw_version: Returns FW versions from the header
> + *
>   * This structure contains function pointers to services that the kgd driver
>   * provides to amdkfd driver.
>   *
> @@ -176,6 +189,8 @@ struct kfd2kgd_calls {
>         int (*hqd_destroy)(struct kgd_dev *kgd, uint32_t reset_type,
>                                 unsigned int timeout, uint32_t pipe_id,
>                                 uint32_t queue_id);
> +       uint16_t (*get_fw_version)(struct kgd_dev *kgd,
> +                               enum kgd_engine_type type);
>  };
>
>  bool kgd2kfd_init(unsigned interface_version,
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
index 9c729dd..47b5519 100644
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
@@ -45,6 +45,17 @@  enum kgd_memory_pool {
 	KGD_POOL_FRAMEBUFFER = 3,
 };
 
+enum kgd_engine_type {
+	KGD_ENGINE_PFP = 1,
+	KGD_ENGINE_ME,
+	KGD_ENGINE_CE,
+	KGD_ENGINE_MEC1,
+	KGD_ENGINE_MEC2,
+	KGD_ENGINE_RLC,
+	KGD_ENGINE_SDMA,
+	KGD_ENGINE_MAX
+};
+
 struct kgd2kfd_shared_resources {
 	/* Bit n == 1 means VMID n is available for KFD. */
 	unsigned int compute_vmid_bitmap;
@@ -137,6 +148,8 @@  struct kgd2kfd_calls {
  *
  * @hqd_destroy: Destructs and preempts the queue assigned to that hqd slot.
  *
+ * @get_fw_version: Returns FW versions from the header
+ *
  * This structure contains function pointers to services that the kgd driver
  * provides to amdkfd driver.
  *
@@ -176,6 +189,8 @@  struct kfd2kgd_calls {
 	int (*hqd_destroy)(struct kgd_dev *kgd, uint32_t reset_type,
 				unsigned int timeout, uint32_t pipe_id,
 				uint32_t queue_id);
+	uint16_t (*get_fw_version)(struct kgd_dev *kgd,
+				enum kgd_engine_type type);
 };
 
 bool kgd2kfd_init(unsigned interface_version,