hwc: store gscaler configuration in correct slot
gsc_map is indexed by window #, not by layer #
Change-Id: I6f89e9b0de3787e0ab2aeb490bb6eb3c86bdcf8a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
diff --git a/libhwc/hwc.cpp b/libhwc/hwc.cpp
index c2cb284..271542d 100644
--- a/libhwc/hwc.cpp
+++ b/libhwc/hwc.cpp
@@ -927,9 +927,9 @@
private_handle_t::dynamicCast(layer.handle);
if (exynos5_format_requires_gscaler(handle->format)) {
ALOGV("\tusing gscaler %u", AVAILABLE_GSC_UNITS[nextGsc]);
- pdev->bufs.gsc_map[i].mode =
+ pdev->bufs.gsc_map[nextWindow].mode =
exynos5_gsc_map_t::GSC_M2M;
- pdev->bufs.gsc_map[i].idx = nextGsc++;
+ pdev->bufs.gsc_map[nextWindow].idx = nextGsc++;
}
}
nextWindow++;