When we don`t set "video=mxcfb0:dev=hdmi" in bootargs, but connect hdmi to imx6q, it will trigger a periodically hdmi interrupt in a few seconds. These repeated interruptions will read edid and alloc modedb, so we need to release the modedb before the next allocation.
Fix following memory leak. unreferenced object 0xc6a54000 (size 2048): comm "kworker/0:0", pid 2655, jiffies 756371 (age 952.680s) hex dump (first 32 bytes): 00 00 00 00 3b 00 00 00 90 06 00 00 1a 04 00 00 ....;........... b5 1a 00 00 18 01 00 00 68 00 00 00 1e 00 00 00 ........h....... backtrace: [<00623f2e>] mxc_edid_parse_ext_blk+0x79c/0x820 [<0ef13c8f>] mxc_edid_read+0x224/0x244 [<68bdc576>] mxc_hdmi_read_edid+0x6c/0x3d0 [<a64a63e8>] hotplug_worker+0x64/0x30c [<909541fa>] process_one_work+0x1f4/0x308 [<69f4c3c3>] worker_thread+0x2b0/0x360 [<7edd79c5>] kthread+0x144/0x150 [<18f0f29a>] ret_from_fork+0x14/0x24 [<00000000>] 0x0 Signed-off-by: Xiaolei Wang <[email protected]> Signed-off-by: Bruce Ashfield <[email protected]> --- drivers/video/fbdev/mxc/mxc_edid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/mxc/mxc_edid.c b/drivers/video/fbdev/mxc/mxc_edid.c index 903172e6ae77..7230fb68260a 100644 --- a/drivers/video/fbdev/mxc/mxc_edid.c +++ b/drivers/video/fbdev/mxc/mxc_edid.c @@ -737,6 +737,8 @@ int mxc_edid_read(struct i2c_adapter *adp, unsigned short addr, return extblknum; /* edid first block parsing */ + if (fbi->monspecs.modedb) + fb_destroy_modedb(fbi->monspecs.modedb); memset(&fbi->monspecs, 0, sizeof(fbi->monspecs)); fb_edid_to_monspecs(edid, &fbi->monspecs); -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12957): https://lists.yoctoproject.org/g/linux-yocto/message/12957 Mute This Topic: https://lists.yoctoproject.org/mt/100657724/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
