svn commit: r261624 - stable/9/sys/dev/drm2

Jean-Sebastien Pedron dumbbell at FreeBSD.org
Sat Feb 8 08:50:45 UTC 2014


Author: dumbbell
Date: Sat Feb  8 08:50:44 2014
New Revision: 261624
URL: http://svnweb.freebsd.org/changeset/base/261624

Log:
  MFC r248061:
  
  Import Linux commit a1b7736dac5f2d5876e68c47a0fce3f423840070
  Author: Sascha Hauer <s.hauer at pengutronix.de>
  Date:   Wed Feb 1 11:38:22 2012 +0100
  
      drm drm_fb_helper: destroy modes
  
      drm_setup_crtcs allocated modes using drm_mode_duplicate. Free
      them in drm_fb_helper_crtc_free.
  
      Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
      Signed-off-by: Dave Airlie <airlied at redhat.com>
  
  Discussed with:	Konstantin Belousov (kib@)

Modified:
  stable/9/sys/dev/drm2/drm_fb_helper.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_fb_helper.c
==============================================================================
--- stable/9/sys/dev/drm2/drm_fb_helper.c	Sat Feb  8 08:16:38 2014	(r261623)
+++ stable/9/sys/dev/drm2/drm_fb_helper.c	Sat Feb  8 08:50:44 2014	(r261624)
@@ -555,8 +555,11 @@ static void drm_fb_helper_crtc_free(stru
 	for (i = 0; i < helper->connector_count; i++)
 		free(helper->connector_info[i], DRM_MEM_KMS);
 	free(helper->connector_info, DRM_MEM_KMS);
-	for (i = 0; i < helper->crtc_count; i++)
+	for (i = 0; i < helper->crtc_count; i++) {
 		free(helper->crtc_info[i].mode_set.connectors, DRM_MEM_KMS);
+		if (helper->crtc_info[i].mode_set.mode)
+			drm_mode_destroy(helper->dev, helper->crtc_info[i].mode_set.mode);
+	}
 	free(helper->crtc_info, DRM_MEM_KMS);
 }
 


More information about the svn-src-stable-9 mailing list