diff options
| author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-03-01 07:56:11 -0500 |
|---|---|---|
| committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2019-04-24 05:23:37 -0400 |
| commit | d08106796a78a4273e39e1bbdf538dc4334b2635 (patch) | |
| tree | 4a80d46dbb3d6c3f54c0ba73897e567ddc8cc52d | |
| parent | f5a9ed867c83875546c9aadd4ed8e785e9adcc3c (diff) | |
drm/vc4: Fix memory leak during gpu reset.
__drm_atomic_helper_crtc_destroy_state does not free memory, it only
cleans it up. Fix this by calling the functions own destroy function.
Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.")
Cc: Eric Anholt <eric@anholt.net>
Cc: <stable@vger.kernel.org> # v4.6+
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-2-maarten.lankhorst@linux.intel.com
| -rw-r--r-- | drivers/gpu/drm/vc4/vc4_crtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 730008d3da76..e7c04a9eb219 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c | |||
| @@ -1042,7 +1042,7 @@ static void | |||
| 1042 | vc4_crtc_reset(struct drm_crtc *crtc) | 1042 | vc4_crtc_reset(struct drm_crtc *crtc) |
| 1043 | { | 1043 | { |
| 1044 | if (crtc->state) | 1044 | if (crtc->state) |
| 1045 | __drm_atomic_helper_crtc_destroy_state(crtc->state); | 1045 | vc4_crtc_destroy_state(crtc->state); |
| 1046 | 1046 | ||
| 1047 | crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); | 1047 | crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); |
| 1048 | if (crtc->state) | 1048 | if (crtc->state) |
