HACK: hwc: reserve gscaler 2 for camera
authorGreg Hackmann <ghackmann@google.com>
Tue, 31 Jul 2012 16:50:38 +0000 (09:50 -0700)
committerGreg Hackmann <ghackmann@google.com>
Tue, 31 Jul 2012 16:50:38 +0000 (09:50 -0700)
Change-Id: Ic4a2e430849431212322d2cf6c1ae0cf588186c3
Signed-off-by: Greg Hackmann <ghackmann@google.com>
libhwc/hwc.cpp

index 7dd204b67203d6e0d485b8487fdc6c94bb151b67..35c1ad9d77fa3e67d53574f346be1e1fe2358c7a 100644 (file)
@@ -54,9 +54,10 @@ typedef android::Vector<struct hwc_callback_entry> hwc_callback_queue_t;
 const size_t NUM_HW_WINDOWS = 5;
 const size_t NO_FB_NEEDED = NUM_HW_WINDOWS + 1;
 const size_t MAX_PIXELS = 2560 * 1600 * 2;
-const size_t NUM_GSC_UNITS = 4;
+const size_t NUM_GSC_UNITS = 3;
 const size_t GSC_W_ALIGNMENT = 16;
 const size_t GSC_H_ALIGNMENT = 16;
+const int CAMERA_GSC_IDX = 2;
 
 struct exynos5_hwc_composer_device_1_t;
 
@@ -595,6 +596,8 @@ static int exynos5_prepare(hwc_composer_device_1_t *dev,
                     pdev->bufs.gsc_map[i].mode =
                             exynos5_gsc_map_t::GSC_M2M;
                     pdev->bufs.gsc_map[i].idx = nextGsc++;
+                    if (nextGsc == CAMERA_GSC_IDX)
+                        nextGsc++;
                 }
             }
             nextWindow++;