drm: rcar-du: Fix crash with groups that have less than 9 planes
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 25 May 2015 13:32:45 +0000 (16:32 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 16 Jun 2015 11:25:43 +0000 (14:25 +0300)
commitd6aed57481c5b746f91792c8a977f537c09e52c5
tree8682803bf6b4d391c4df4a3df094cfdba5eeb5e8
parent911316fe2f4113a096b9975f2467fc501864aef0
drm: rcar-du: Fix crash with groups that have less than 9 planes

Commit 917de180379d ("drm: rcar-du: Implement universal plane support")
made the number of planes per group dynamic, but didn't update all loops
over the planes array, resulting in out-of-bound accesses on DU
instances that have an odd number of CRTCs (such as the R8A7790). Fix
it.

Fixes: 917de180379d ("drm: rcar-du: Implement universal plane support")
Cc: stable@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
drivers/gpu/drm/rcar-du/rcar_du_group.h
drivers/gpu/drm/rcar-du/rcar_du_kms.c
drivers/gpu/drm/rcar-du/rcar_du_plane.c