[PATCH libdrm 2/3] libdrm: Add drmModeFreePlaneResources()

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Tue Dec 20 10:26:53 PST 2011


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

This function was missing.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 xf86drmMode.c |    9 +++++++++
 xf86drmMode.h |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xf86drmMode.c b/xf86drmMode.c
index e67ed4a..473e734 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -965,3 +965,12 @@ err_allocs:
 
 	return r;
 }
+
+void drmModeFreePlaneResources(drmModePlaneResPtr ptr)
+{
+	if (!ptr)
+		return;
+
+	drmFree(ptr->planes);
+	drmFree(ptr);
+}
diff --git a/xf86drmMode.h b/xf86drmMode.h
index c0fc2ef..34f5fb1 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -305,6 +305,7 @@ extern void drmModeFreeCrtc( drmModeCrtcPtr ptr );
 extern void drmModeFreeConnector( drmModeConnectorPtr ptr );
 extern void drmModeFreeEncoder( drmModeEncoderPtr ptr );
 extern void drmModeFreePlane( drmModePlanePtr ptr );
+extern void drmModeFreePlaneResources(drmModePlaneResPtr ptr);
 
 /**
  * Retrives all of the resources associated with a card.
-- 
1.7.3.4



More information about the dri-devel mailing list