]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Don't cleanup plane state in intel_plane_destroy()
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 16 Jan 2015 15:25:24 +0000 (07:25 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Jan 2015 08:50:42 +0000 (09:50 +0100)
commit34c202d1b856063558bfc7d1e368fa58ba3474da
tree50944b7495cd00ef353118029633b86888cfefec
parente7db0de3a454a8d5e9ab7aa7d5db8057e3494608
drm/i915: Don't cleanup plane state in intel_plane_destroy()

When we transitioned to the atomic plane helpers in commit:

        commit d54784c5d74be213f9d41293d39182a3d69ddf85
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Dec 23 10:41:52 2014 -0800

            drm/i915: Move to atomic plane helpers (v9)

one of the changes was to call intel_plane_destroy_state() while tearing
down a plane to prevent leaks when unloading the driver.  That made
sense when the patches were first written, but before they were merged,

        commit 188cdaf278ba62f24f37be253962ee061aacc733
        Author:     Thierry Reding <treding@nvidia.com>
        Date:       Tue Nov 25 12:09:49 2014 +0100

            drm: Free atomic state during cleanup

had already landed, which made this the responsibility of the DRM core.
The result was that we were kfree()'ing the state twice, and also
possibly double-unref'ing a framebuffer, leading to memory corruption
when the driver was unloaded.

The fix is to simply not try to cleanup the state in the i915 teardown
code now that the core handles this for us.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88433
Testcase: igt/drv_module_reload
Root-cause-analysis-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c