From 679188367b21e4e52b04e1288e4602e963801211 Mon Sep 17 00:00:00 2001 From: Bharath Gopal Date: Thu, 4 Jan 2018 17:46:53 +0530 Subject: [PATCH] hwc2: Determine virtual display presence based on target specific property GetMaxVirtualDisplayCount returns a hard-coded value. Return virtual display count based on a property that is target specific. Return a value of 1 by default when the property is not found in the target device. Bug: 79541227 Change-Id: I4c9727ad1687fc7e53c89ce5e41973628022acec --- msm8909w_3100/sdm/libs/hwc2/hwc_session.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/msm8909w_3100/sdm/libs/hwc2/hwc_session.cpp b/msm8909w_3100/sdm/libs/hwc2/hwc_session.cpp index 0ebe6391..f1c3d664 100644 --- a/msm8909w_3100/sdm/libs/hwc2/hwc_session.cpp +++ b/msm8909w_3100/sdm/libs/hwc2/hwc_session.cpp @@ -491,7 +491,9 @@ static int32_t GetHdrCapabilities(hwc2_device_t* device, hwc2_display_t display, } static uint32_t GetMaxVirtualDisplayCount(hwc2_device_t *device) { - return 1; + char property[PROPERTY_VALUE_MAX]; + property_get("debug.sdm.support_writeback", property, "1"); + return (uint32_t) atoi(property); } static int32_t GetReleaseFences(hwc2_device_t *device, hwc2_display_t display,