Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81f91ce4 authored by Manoj Kumar AVM's avatar Manoj Kumar AVM Committed by Linux Build Service Account
Browse files

sf: Allow hardware acceleration of VDS

Allow hardware acceleration of VDS if debug.vds.allow_hwc is
set to true for debugging purposes.

CRs-Fixed: 1027244
Change-Id: I12710349b1e74d419f9e0216bf29e70201fe20e6
parent 8fd9696e
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -167,13 +167,16 @@ bool DisplayUtils::createV4L2BasedVirtualDisplay(HWComposer* hwc, int32_t &hwcDi
bool DisplayUtils::canAllocateHwcDisplayIdForVDS(int usage) {
bool DisplayUtils::canAllocateHwcDisplayIdForVDS(int usage) {
    // on AOSP builds with QTI_BSP disabled, we should allocate hwc display id for virtual display
    // on AOSP builds with QTI_BSP disabled, we should allocate hwc display id for virtual display
    int flag_mask = 0xffffffff;
    int flag_mask = 0xffffffff;
    char value[PROPERTY_VALUE_MAX];
    property_get("debug.vds.allow_hwc", value, "0");
    int allowHwcForVDS = atoi(value);


#if QTI_BSP
#if QTI_BSP
    // Reserve hardware acceleration for WFD use-case
    // Reserve hardware acceleration for WFD use-case
    flag_mask = GRALLOC_USAGE_PRIVATE_WFD;
    flag_mask = GRALLOC_USAGE_PRIVATE_WFD;
#endif
#endif


    return (usage & flag_mask);
    return allowHwcForVDS || (usage & flag_mask);
}
}


}; // namespace android
}; // namespace android