drm/msm: cache active displays within display manager

Update dsi driver to fill a provided array with display pointers
of all active dsi displays, and cache them within the display
manager structure.

This way, the display manager can simply look up the desired
display pointer based on a local index rather than asking the
dsi driver to perform a lookup each time and checking if it's
valid and active.

Change-Id: I213f66b96c44e95cd91face84005d67b3a9d92a6
Signed-off-by: Clarence Ip <cip@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_display.h b/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
index 1731e9d..f941cd4 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
@@ -177,12 +177,13 @@
 u32 dsi_display_get_num_of_displays(void);
 
 /**
- * dsi_display_get_display_by_index()- finds display by index
- * @index:      index of the display.
- *
- * Return: handle to the display or error code.
+ * dsi_display_get_active_displays - returns pointers for active display devices
+ * @display_array: Pointer to display array to be filled
+ * @max_display_count: Size of display_array
+ * @Returns: Number of display entries filled
  */
-struct dsi_display *dsi_display_get_display_by_index(u32 index);
+int dsi_display_get_active_displays(void **display_array,
+		u32 max_display_count);
 
 /**
  * dsi_display_get_display_by_name()- finds display by name
@@ -200,14 +201,6 @@
 void dsi_display_set_active_state(struct dsi_display *display, bool is_active);
 
 /**
- * dsi_display_is_active() - returns the state of the display
- * @display:        Handle to the display.
- *
- * Return: state.
- */
-bool dsi_display_is_active(struct dsi_display *display);
-
-/**
  * dsi_display_dev_init() - Initializes the display device
  * @display:         Handle to the display.
  *