Skip to contentSkip to conversation

drm/amd/include/vg20: hack VCE_BASE

PATCH In review James Zhu 2 participants 2 messages Apr 17, 2018 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1523997193-14921-1-git-send-email-James.Zhu-5C7GfCeVMHo@public.gmane.org

James Zhu

author
#3 lore raw

PATCH v2 2/2 drm/amd/include/vg20: hack VCE_BASE

Vega20 uses vce_4_1 engine. By hacking vega20 VCE_BASE, vce_4_1 can reuse vce_4.0 header file.

---
 drivers/gpu/drm/amd/include/vega20_ip_offset.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/include/vega20_ip_offset.h +2 -1
index 2da2d97..f345e0d 100644
@@ -144,7 +144,8 @@ static const struct IP_BASE UVD_BASE            ={ { { { 0x00007800, 0x00007E00,
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } } } };
-static const struct IP_BASE VCE_BASE            ={ { { { 0x00008800, 0, 0, 0, 0, 0 } },
+/* Hack VCE_BASE to make vce_4_1 use vce_4_0 offset header files*/
+static const struct IP_BASE VCE_BASE            ={ { { { 0x00007E00/* 0x00008800 */, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
Signature · 6 lines
2.7.4

_______________________________________________
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): 1523997193-14921-2-git-send-email-James.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#5 lore raw
Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of James Zhu
Sent: Tuesday, April 17, 2018 4:33 PM
To: [email protected]
Subject: [PATCH v2 2/2] drm/amd/include/vg20: hack VCE_BASE

Vega20 uses vce_4_1 engine. By hacking vega20 VCE_BASE, vce_4_1 can reuse vce_4.0 header file.

Maybe instead of saying hack, say something like:
Adjust VCE_BASE so that we can re-use the VCE 4.0 register headers on 4.1 hardware. All the registers have the same absolute offset.

With that changed:

Quoted 23 lines
---
 drivers/gpu/drm/amd/include/vega20_ip_offset.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/include/vega20_ip_offset.h +2 -1
index 2da2d97..f345e0d 100644
@@ -144,7 +144,8 @@ static const struct IP_BASE UVD_BASE            ={ { { {
 0x00007800, 0x00007E00,
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } } } };
-static const struct IP_BASE VCE_BASE            ={ { { { 0x00008800, 0, 0, 0, 0, 0 } },
+/* Hack VCE_BASE to make vce_4_1 use vce_4_0 offset header files*/
+static const struct IP_BASE VCE_BASE            ={ { { { 0x00007E00/* 0x00008800
 */, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
                                         { { 0, 0, 0, 0, 0, 0 } },
Quoted 7 lines

--
2.7.4

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

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