]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon/kms: unpin fb in atombios crtc disable
authorIlija Hadzic <ilijahadzic@gmail.com>
Sun, 3 Nov 2013 03:00:19 +0000 (23:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Nov 2013 17:33:36 +0000 (12:33 -0500)
commit21bbfb8b1a96caaa01020f20e9314db048ae442c
treefd3bb5b05aa1cca4a6d3d9df94266f5b0a9d6616
parentb1b16de43439ab5eec443deabf34ddda29bdd364
drm/radeon/kms: unpin fb in atombios crtc disable

When drm_helper_disable_unused_functions calls disable
function of the CRTC, it also sets the crtc->fb pointer
to NULL. This can later (when the mode on that CRTC is setup
again from user space) cause ***_do_set_base functions to
"think" that there is no old buffer and skip the unpinning
code. Consequently, the buffer that has been NULL-ified in
drm_helper_disable_unused_functions will never be unpinned
causing a leak in VRAM.

This patch plugs the leak by unpinning the frame buffer
in crtc_disable function.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/atombios_crtc.c