From 0935c7595fc0057787bff64ebd7b0df2e5e415c0 Mon Sep 17 00:00:00 2001 From: Sushil Chauhan Date: Fri, 19 Jan 2018 10:58:13 -0800 Subject: [PATCH] hwc2: Update layer frame rate from metadata only if it is valid To compare for Skip Validate feature, update the layer frame rate from the buffer metadata, only if it is valid. CRs-Fixed: 2175653 Change-Id: Ia3f6a8e928ded91c26729062e7ed20a687744ad1 --- sdm/libs/hwc2/hwc_layers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp index 0bcffc62..b42eda74 100644 --- a/sdm/libs/hwc2/hwc_layers.cpp +++ b/sdm/libs/hwc2/hwc_layers.cpp @@ -728,7 +728,7 @@ DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *la float fps = 0; uint32_t frame_rate = layer->frame_rate; if (getMetaData(handle, GET_REFRESH_RATE, &fps) == 0) { - frame_rate = RoundToStandardFPS(fps); + frame_rate = (fps != 0) ? RoundToStandardFPS(fps) : layer->frame_rate; } int32_t interlaced = 0;