Skip to contentSkip to conversation

drm/amd: Add DMCU firmware loading on raven

PATCH In review David Francis 1 participant 3 messages Sep 7, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd: Add DMCU firmware loading on raven

[Why]
DMCU (Display MicroController Unit) is an on-GPU microcontroller in AMD graphics cards that is used in features for embedded displays such as Panel Self-Refresh

DMCU is part of the DM IP block

[How]
DMCU is added as an option in the enum AMDGPU_UCODE_ID

DMCU needs two pieces of firmware - the initial eram and the interrupt vectors. These are treated as seperate pieces of firmware and loaded by PSP

The loading occurs in the sw_init hook of DM

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h     |  2 +
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c        |  6 ++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 93 +++++++++++++++++++
 3 files changed, 101 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +2 -0
index b358e7519987..38d3af317aa2 100644
@@ -196,6 +196,8 @@ enum AMDGPU_UCODE_ID {
 	AMDGPU_UCODE_ID_UVD1,
 	AMDGPU_UCODE_ID_VCE,
 	AMDGPU_UCODE_ID_VCN,
+	AMDGPU_UCODE_ID_DMCU_ERAM,
+	AMDGPU_UCODE_ID_DMCU_INTV,
 	AMDGPU_UCODE_ID_MAXIMUM,
 };
 
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +6 -0
index 02be34e72ed9..240dc8c85867 100644
@@ -91,6 +91,12 @@ psp_v10_0_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *
 	case AMDGPU_UCODE_ID_VCN:
 		*type = GFX_FW_TYPE_VCN;
 		break;
+	case AMDGPU_UCODE_ID_DMCU_ERAM:
+		*type = GFX_FW_TYPE_DMCU_ERAM;
+		break;
+	case AMDGPU_UCODE_ID_DMCU_INTV:
+		*type = GFX_FW_TYPE_DMCU_ISR;
+		break;
 	case AMDGPU_UCODE_ID_MAXIMUM:
 	default:
 		return -EINVAL;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +93 -0

117 lines not on this page · raw message

Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180907141656.10673-1-David.Francis-5C7GfCeVMHo@public.gmane.org

#2 lore raw

This will cause amdgpu startup to fail if the firmware does not exist: this should either wait until the firmware is available or not return an error value if -ENOENT is returned from request_firmware

________________________________
From: David Francis <[email protected]>
Sent: September 7, 2018 10:16:56 AM
To: [email protected]
Cc: Francis, David
Subject: [PATCH] drm/amd: Add DMCU firmware loading on raven

[Why]
DMCU (Display MicroController Unit) is an on-GPU microcontroller in AMD graphics cards that is used in features for embedded displays such as Panel Self-Refresh

DMCU is part of the DM IP block

[How]
DMCU is added as an option in the enum AMDGPU_UCODE_ID

DMCU needs two pieces of firmware - the initial eram and the interrupt vectors. These are treated as seperate pieces of firmware and loaded by PSP

The loading occurs in the sw_init hook of DM

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h     |  2 +
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c        |  6 ++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 93 +++++++++++++++++++
 3 files changed, 101 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +2 -0
index b358e7519987..38d3af317aa2 100644
@@ -196,6 +196,8 @@ enum AMDGPU_UCODE_ID {
         AMDGPU_UCODE_ID_UVD1,
         AMDGPU_UCODE_ID_VCE,
         AMDGPU_UCODE_ID_VCN,
+       AMDGPU_UCODE_ID_DMCU_ERAM,
+       AMDGPU_UCODE_ID_DMCU_INTV,
         AMDGPU_UCODE_ID_MAXIMUM,
 };
 
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +6 -0
index 02be34e72ed9..240dc8c85867 100644
@@ -91,6 +91,12 @@ psp_v10_0_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *
         case AMDGPU_UCODE_ID_VCN:
                 *type = GFX_FW_TYPE_VCN;
                 break;
+       case AMDGPU_UCODE_ID_DMCU_ERAM:
+               *type = GFX_FW_TYPE_DMCU_ERAM;
+               break;
+       case AMDGPU_UCODE_ID_DMCU_INTV:
+               *type = GFX_FW_TYPE_DMCU_ISR;
+               break;
         case AMDGPU_UCODE_ID_MAXIMUM:
         default:
                 return -EINVAL;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +93 -0

117 lines not on this page · raw message

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): DM3PR1201MB103921CD29A1AA63F57BC2D7EF000-BBcFnVpqZhVMmo+XJk11QmrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]

#4 lore raw

Ignore this thread - new, fixed patch is up

________________________________
From: Francis, David
Sent: September 7, 2018 10:26:59 AM
To: [email protected]
Subject: Re: [PATCH] drm/amd: Add DMCU firmware loading on raven

This will cause amdgpu startup to fail if the firmware does not exist: this should either wait until the firmware is available or not return an error value if -ENOENT is returned from request_firmware

________________________________
From: David Francis <[email protected]>
Sent: September 7, 2018 10:16:56 AM
To: [email protected]
Cc: Francis, David
Subject: [PATCH] drm/amd: Add DMCU firmware loading on raven

[Why]
DMCU (Display MicroController Unit) is an on-GPU microcontroller in AMD graphics cards that is used in features for embedded displays such as Panel Self-Refresh

DMCU is part of the DM IP block

[How]
DMCU is added as an option in the enum AMDGPU_UCODE_ID

DMCU needs two pieces of firmware - the initial eram and the interrupt vectors. These are treated as seperate pieces of firmware and loaded by PSP

The loading occurs in the sw_init hook of DM

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h     |  2 +
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c        |  6 ++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 93 +++++++++++++++++++
 3 files changed, 101 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +2 -0
index b358e7519987..38d3af317aa2 100644
@@ -196,6 +196,8 @@ enum AMDGPU_UCODE_ID {
         AMDGPU_UCODE_ID_UVD1,
         AMDGPU_UCODE_ID_VCE,
         AMDGPU_UCODE_ID_VCN,
+       AMDGPU_UCODE_ID_DMCU_ERAM,
+       AMDGPU_UCODE_ID_DMCU_INTV,
         AMDGPU_UCODE_ID_MAXIMUM,
 };
 
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +6 -0
index 02be34e72ed9..240dc8c85867 100644
@@ -91,6 +91,12 @@ psp_v10_0_get_fw_type(struct amdgpu_firmware_info *ucode, enum psp_gfx_fw_type *
         case AMDGPU_UCODE_ID_VCN:
                 *type = GFX_FW_TYPE_VCN;
                 break;
+       case AMDGPU_UCODE_ID_DMCU_ERAM:
+               *type = GFX_FW_TYPE_DMCU_ERAM;
+               break;
+       case AMDGPU_UCODE_ID_DMCU_INTV:
+               *type = GFX_FW_TYPE_DMCU_ISR;
+               break;
         case AMDGPU_UCODE_ID_MAXIMUM:
         default:
                 return -EINVAL;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +93 -0

117 lines not on this page · raw message

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx