Summary: | [bisected] CRTC cursor BO leak in 2D | ||
---|---|---|---|
Product: | xorg | Reporter: | Shuang He <shuang.he> |
Component: | Driver/intel | Assignee: | Chris Wilson <chris> |
Status: | CLOSED WONTFIX | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | trivial | ||
Priority: | high | ||
Version: | git | ||
Hardware: | Other | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Shuang He
2010-03-07 18:59:16 UTC
Apparently the destroy function isn't getting called? Either way, it's leaking allocated-once data when the server's about to go down anyway. I am failing to reproduce this on current xserver and ddx. Can you confirm if this has been fixed? The driver code looks correct, as Eric said, so if anything it's a failure to call the destroy routine by the xserver. (In reply to comment #2) > I am failing to reproduce this on current xserver and ddx. Can you confirm if > this has been fixed? The driver code looks correct, as Eric said, so if > anything it's a failure to call the destroy routine by the xserver. Per my debug, cursor is allocated in drmmode_crtc_init(), that should be freed by the time of calling drmmode_crtc_destroy(), but unfortunately, no one is calling xf86CrtcDestroy(), which will in turn call drmmode_crtc_destroy() commit 6ff369cd2602497ee11273b50f76d1a7bf25991d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Jul 9 14:00:31 2010 +0100 drmmode: Destroy Crtc on screen shutdown Should fix: Bug 26946 - CRTC cursor BO leak in 2D https://bugs.freedesktop.org/show_bug.cgi?id=26946 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> It's not totally fixed. seems drmmode_pre_init() get called twice because drmmode->mode_res->count_crtcs = 2, but drmmode_close_screen() only get called once. Sigh. I wasn't paying attention. This should fix that snafu: commit 5de1b74d64f807b59c730871d4cb171484db9780 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Jul 13 09:34:53 2010 +0100 modes: There may be more than one crtc and output... DESTROY THEM ALL! In order to cleanup all CRTCs and outputs on shutdown, we need to keep a list of the individual structures and iterate over that list on shutdown. Also, the output and crtcs are configured just once and not for each screen generation so move the shutdown to the termination and not on CloseScreen. Oops. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Hmm, staring at the code a bit more, the xserver never tries to free the screen on exit so there is no way we can be valgrind clean. We just have to avoid per-generation leaks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.