From: Rob Clark Date: Mon, 12 Mar 2012 00:48:44 +0000 (-0500) Subject: drm: fix issue copying supported plane formats X-Git-Tag: 20120702.1049~389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8efbc8ee621edac19341f993624c6d5a27686803;p=profile%2Fivi%2Fweston.git drm: fix issue copying supported plane formats Originally on the first 1/4th of the plane formats were copied, leading to problems if AR24/XR24 appears later in the list. --- diff --git a/src/compositor-drm.c b/src/compositor-drm.c index ba376eb..edeb0ab 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1227,7 +1227,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);