hwc: Fallback to GPU if source image width or height is less than 2
There is h/w limitation when MDP_OP_SCALE_RGB_ENHANCED bit and
MDP4_OP_SCALEX_EN or MDP_OP_SCALEY_EN bit is set.
The minimum block size is 2x2. MDP will hang if the source RGB image
height or width is equal to 1. Hence fallback to GPU in such cases.
Change-Id: I7333b097fd26bfb888865de9c39d1664bc87acca
diff --git a/libhwcomposer/hwc_mdpcomp.h b/libhwcomposer/hwc_mdpcomp.h
index 4aedd77..c5212ef 100644
--- a/libhwcomposer/hwc_mdpcomp.h
+++ b/libhwcomposer/hwc_mdpcomp.h
@@ -150,8 +150,8 @@
static bool isDebug() { return sDebugLogs ? true : false; };
/* Is feature enabled */
static bool isEnabled() { return sEnabled; };
- /* checks for mdp comp width limitation */
- bool isWidthValid(hwc_context_t *ctx, hwc_layer_1_t *layer);
+ /* checks for mdp comp dimension limitation */
+ bool isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer);
/* tracks non updating layers*/
void updateLayerCache(hwc_context_t* ctx, hwc_display_contents_1_t* list);
/* optimize layers for mdp comp*/