[PATCH 5/6] drm/amdgpu/navi1x: add SMU i2c support

Deucher, Alexander Alexander.Deucher at amd.com
Tue Jul 21 16:56:24 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Ignore this.  Sent out the wrong version.

Alex
________________________________
From: Alex Deucher <alexdeucher at gmail.com>
Sent: Tuesday, July 21, 2020 12:52 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH 5/6] drm/amdgpu/navi1x: add SMU i2c support

Enable SMU i2c bus access for navi1x asics.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index ead135f39c7e..56267e6c600e 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -23,6 +23,7 @@

 #include <linux/firmware.h>
 #include <linux/pci.h>
+#include <linux/i2c.h>
 #include "amdgpu.h"
 #include "amdgpu_smu.h"
 #include "smu_internal.h"
@@ -52,6 +53,8 @@
 #undef pr_info
 #undef pr_debug

+#define to_amdgpu_device(x) (container_of(x, struct amdgpu_device, pm.smu_i2c))
+
 #define FEATURE_MASK(feature) (1ULL << feature)
 #define SMC_DPM_FEATURE ( \
         FEATURE_MASK(FEATURE_DPM_PREFETCHER_BIT) | \
--
2.25.4

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200721/a248d79c/attachment-0001.htm>


More information about the amd-gfx mailing list