diff options
author | Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> | 2019-05-29 11:24:35 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-22 10:34:14 -0400 |
commit | c00d56fede05a36b1718c3d23496c887f232448f (patch) | |
tree | caf6efa52eb5c237526c83070e616b36ee09d03a | |
parent | 1a7d296d162ede31d170fdb9205ce07c8cb7dfac (diff) |
drm/amd/display: add missing mod_vmid destructor
mod_vmid is missing a destructor.
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/modules/vmid/vmid.c | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h b/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h index c7672f3b837f..a3787fdf0c08 100644 --- a/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h +++ b/drivers/gpu/drm/amd/display/modules/inc/mod_vmid.h | |||
@@ -41,4 +41,6 @@ struct mod_vmid *mod_vmid_create( | |||
41 | unsigned int num_vmid, | 41 | unsigned int num_vmid, |
42 | struct dc_virtual_addr_space_config *va_config); | 42 | struct dc_virtual_addr_space_config *va_config); |
43 | 43 | ||
44 | void mod_vmid_destroy(struct mod_vmid *mod_vmid); | ||
45 | |||
44 | #endif /* MOD_VMID_H_ */ | 46 | #endif /* MOD_VMID_H_ */ |
diff --git a/drivers/gpu/drm/amd/display/modules/vmid/vmid.c b/drivers/gpu/drm/amd/display/modules/vmid/vmid.c index 431052626d93..f0a153704f6e 100644 --- a/drivers/gpu/drm/amd/display/modules/vmid/vmid.c +++ b/drivers/gpu/drm/amd/display/modules/vmid/vmid.c | |||
@@ -156,3 +156,12 @@ fail_alloc_context: | |||
156 | fail_dc_null: | 156 | fail_dc_null: |
157 | return NULL; | 157 | return NULL; |
158 | } | 158 | } |
159 | |||
160 | void mod_vmid_destroy(struct mod_vmid *mod_vmid) | ||
161 | { | ||
162 | if (mod_vmid != NULL) { | ||
163 | struct core_vmid *core_vmid = MOD_VMID_TO_CORE(mod_vmid); | ||
164 | |||
165 | kfree(core_vmid); | ||
166 | } | ||
167 | } | ||