drm/i915: Don't cleanup plane state in intel_plane_destroy()
drm/i915: Don't cleanup plane state in intel_plane_destroy()

When we transitioned to the atomic plane helpers in commit:

        commit ea2c67bb4affa84080c616920f3899f123786e56
        Author: Matt Roper <f1605a76cb9f6387d99228a0a9260318379b62de@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 3009c0377f25c29852b218a6933a969d02cbdc5d
        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 <17227041d62225a8b18be8c9e33f1bc99023cd25@gmail.com>
Signed-off-by: Matt Roper <f1605a76cb9f6387d99228a0a9260318379b62de@intel.com>
Reviewed-by: Jani Nikula <ba783f3beccaedfda693f41a15407d612a629408@intel.com>
Signed-off-by: Daniel Vetter <c1b6782c4af8f0673da8923a0702a1832e5940f4@ffwll.ch>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs