diff mbox

[4/5] drm: fix issue copying supported plane formats

Message ID 1331513325-1554-4-git-send-email-rob.clark@linaro.org
State New
Headers show

Commit Message

Rob Clark March 12, 2012, 12:48 a.m. UTC
From: Rob Clark <rob@ti.com>

Originally on the first 1/4th of the plane formats were copied, leading
to problems if AR24/XR24 appears later in the list.
---
 src/compositor-drm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index cf9a937..c8e6eaf 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1230,7 +1230,7 @@  create_sprites(struct drm_compositor *ec)
 		sprite->compositor = ec;
 		sprite->count_formats = plane->count_formats;
 		memcpy(sprite->formats, plane->formats,
-		       plane->count_formats);
+		       plane->count_formats * sizeof(plane->formats[0]));
 		drmModeFreePlane(plane);
 
 		wl_list_insert(&ec->sprite_list, &sprite->link);