summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/df_v1_7.c
diff options
context:
space:
mode:
authorJack Zhang <Jack.Zhang1@amd.com>2019-09-03 10:15:23 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-09-13 17:42:15 -0500
commitf1d59e00ff5f1822ff9359beb0c315fdd9660626 (patch)
tree9b0782191b29b868d07930725be49d52f308c781 /drivers/gpu/drm/amd/amdgpu/df_v1_7.c
parent9dc913425807c82a7cb942458540a9423182697d (diff)
downloadlinux-f1d59e00ff5f1822ff9359beb0c315fdd9660626.tar.gz
linux-f1d59e00ff5f1822ff9359beb0c315fdd9660626.tar.bz2
linux-f1d59e00ff5f1822ff9359beb0c315fdd9660626.zip
drm/amd/amdgpu: add sw_fini interface for df_funcs
add sw_fini interface of df_funcs. This interface will remove sysfs file of df_cntr_avail function. The old behavior only create sysfs of df_cntr_avail in sw_init, but never remove it for lack of sw_fini interface. With this,driver will report create sysfs fail when it's loaded for the second time. Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com> Reviewed-by: Jonathan Kim <Jonathan.Kim@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/df_v1_7.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/df_v1_7.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/df_v1_7.c b/drivers/gpu/drm/amd/amdgpu/df_v1_7.c
index 844c03868248..d6221298b477 100644
--- a/drivers/gpu/drm/amd/amdgpu/df_v1_7.c
+++ b/drivers/gpu/drm/amd/amdgpu/df_v1_7.c
@@ -33,6 +33,10 @@ static void df_v1_7_sw_init(struct amdgpu_device *adev)
{
}
+static void df_v1_7_sw_fini(struct amdgpu_device *adev)
+{
+}
+
static void df_v1_7_enable_broadcast_mode(struct amdgpu_device *adev,
bool enable)
{
@@ -111,6 +115,7 @@ static void df_v1_7_enable_ecc_force_par_wr_rmw(struct amdgpu_device *adev,
const struct amdgpu_df_funcs df_v1_7_funcs = {
.sw_init = df_v1_7_sw_init,
+ .sw_fini = df_v1_7_sw_fini,
.enable_broadcast_mode = df_v1_7_enable_broadcast_mode,
.get_fb_channel_number = df_v1_7_get_fb_channel_number,
.get_hbm_channel_number = df_v1_7_get_hbm_channel_number,