drm/i915/display: cleanup intel_bw_state on i915 module removal
intel_bw_state allocated memory is not getting freed even after
module removal.
kmemleak reported backtrace:
[<
0000000079019739>] kmemdup+0x17/0x40
[<
00000000d58c1b9d>] intel_bw_duplicate_state+0x1b/0x40 [i915]
[<
000000007423ed0c>] drm_atomic_get_private_obj_state+0xca/0x140
[<
00000000100e3533>] intel_bw_atomic_check+0x133/0x350 [i915]
[<
00000000126d0e0c>] intel_atomic_check+0x1ab7/0x20d0 [i915]
[<
00000000d5dfc004>] drm_atomic_check_only+0x563/0x810
[<
00000000c9379611>] drm_atomic_commit+0xe/0x50
[<
00000000ec82b765>] drm_atomic_helper_disable_all+0x133/0x160
[<
000000003c44760c>] drm_atomic_helper_shutdown+0x65/0xc0
[<
00000000414e3e5c>] i915_driver_remove+0xcb/0x130 [i915]
[<
00000000f8544c2a>] i915_pci_remove+0x19/0x40 [i915]
[<
000000002dcbd148>] pci_device_remove+0x36/0xb0
[<
000000003c8c6b0a>] device_release_driver_internal+0xe0/0x1c0
[<
00000000580e9566>] unbind_store+0xc3/0x120
[<
00000000869d0df5>] kernfs_fop_write+0x104/0x190
[<
000000004dc1a355>] vfs_write+0xb9/0x1d0
Call the drm_atomic_private_obj_fini(), which inturn calls the
intel_bw_destroy_state() to make sure the intel_bw_state memory is
freed properly.
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191209143921.9240-1-pankaj.laxminarayan.bharadiya@intel.com