Merge "sdm: Check for color manager object presence."
diff --git a/sdm/include/core/buffer_allocator.h b/sdm/include/core/buffer_allocator.h
index 5c5597e..5e83537 100644
--- a/sdm/include/core/buffer_allocator.h
+++ b/sdm/include/core/buffer_allocator.h
@@ -45,15 +45,13 @@
 */
 
 struct BufferConfig {
-  uint32_t width;            //!< Specifies buffer width for buffer allocation.
-  uint32_t height;           //!< Specifies buffer height for buffer allocation.
-  LayerBufferFormat format;  //!< Specifies buffer format for buffer allocation.
-  uint32_t buffer_count;     //!< Specifies number of buffers to be allocated.
-  bool secure;               //!< Specifies buffer to be allocated from secure region.
-  bool cache;                //!< Specifies whether the buffer needs to be cache.
-
-  BufferConfig() : width(0), height(0), format(kFormatInvalid), buffer_count(0), secure(false),
-                  cache(false) { }
+  uint32_t width = 0;                         //!< Specifies buffer width for buffer allocation.
+  uint32_t height = 0;                        //!< Specifies buffer height for buffer allocation.
+  LayerBufferFormat format = kFormatInvalid;  //!< Specifies buffer format for buffer allocation.
+  uint32_t buffer_count = 0;                  //!< Specifies number of buffers to be allocated.
+  bool secure = false;                        //!< Specifies buffer to be allocated from
+                                              //!< secure region.
+  bool cache = false;                         //!< Specifies whether the buffer needs to be cache.
 };
 
 /*! @brief Holds the information about the allocated buffer.
@@ -62,11 +60,9 @@
   @sa BufferAllocator::FreeBuffer
 */
 struct AllocatedBufferInfo {
-  int fd;                    //!< Specifies the fd of the allocated buffer.
-  uint32_t stride;           //!< Specifies aligned buffer width of the allocated buffer.
-  uint32_t size;             //!< Specifies the size of the allocated buffer.
-
-  AllocatedBufferInfo() : fd(-1), stride(0), size(0) { }
+  int fd = -1;                   //!< Specifies the fd of the allocated buffer.
+  uint32_t stride = 0;           //!< Specifies aligned buffer width of the allocated buffer.
+  uint32_t size = 0;             //!< Specifies the size of the allocated buffer.
 };
 
 /*! @brief Holds the information about the input/output configuration of an output buffer.
@@ -78,9 +74,7 @@
   BufferConfig buffer_config;             //!< Specifies configuration of a buffer to be allocated.
   AllocatedBufferInfo alloc_buffer_info;  //!< Specifies buffer information of allocated buffer.
 
-  void *private_data;                      //!< Pointer to private data.
-
-  BufferInfo() : private_data(NULL) { }
+  void *private_data = NULL;              //!< Pointer to private data.
 };
 
 /*! @brief Buffer allocator implemented by the client
diff --git a/sdm/include/core/display_interface.h b/sdm/include/core/display_interface.h
index 140ac77..9edd9c8 100644
--- a/sdm/include/core/display_interface.h
+++ b/sdm/include/core/display_interface.h
@@ -79,10 +79,8 @@
   @sa DisplayInterface::SetConfig
 */
 struct DisplayConfigFixedInfo {
-  bool underscan;   //!< If display support CE underscan.
-  bool secure;      //!< If this display is capable of handling secure content.
-
-  DisplayConfigFixedInfo() : underscan(false), secure(false) { }
+  bool underscan = false;   //!< If display support CE underscan.
+  bool secure = false;      //!< If this display is capable of handling secure content.
 };
 
 /*! @brief This structure defines configuration for variable properties of a display device.
@@ -91,15 +89,12 @@
   @sa DisplayInterface::SetConfig
 */
 struct DisplayConfigVariableInfo {
-  uint32_t x_pixels;          //!< Total number of pixels in X-direction on the display panel.
-  uint32_t y_pixels;          //!< Total number of pixels in Y-direction on the display panel.
-  float x_dpi;                //!< Dots per inch in X-direction.
-  float y_dpi;                //!< Dots per inch in Y-direction.
-  uint32_t fps;               //!< Frame rate per second.
-  uint32_t vsync_period_ns;   //!< VSync period in nanoseconds.
-
-  DisplayConfigVariableInfo() : x_pixels(0), y_pixels(0), x_dpi(0.0f), y_dpi(0.0f),
-                                fps(0), vsync_period_ns(0) { }
+  uint32_t x_pixels = 0;          //!< Total number of pixels in X-direction on the display panel.
+  uint32_t y_pixels = 0;          //!< Total number of pixels in Y-direction on the display panel.
+  float x_dpi = 0.0f;             //!< Dots per inch in X-direction.
+  float y_dpi = 0.0f;             //!< Dots per inch in Y-direction.
+  uint32_t fps = 0;               //!< Frame rate per second.
+  uint32_t vsync_period_ns = 0;   //!< VSync period in nanoseconds.
 };
 
 /*! @brief Event data associated with VSync event.
@@ -107,9 +102,7 @@
   @sa DisplayEventHandler::VSync
 */
 struct DisplayEventVSync {
-  int64_t timestamp;    //!< System monotonic clock timestamp in nanoseconds.
-
-  DisplayEventVSync() : timestamp(0) { }
+  int64_t timestamp = 0;    //!< System monotonic clock timestamp in nanoseconds.
 };
 
 /*! @brief Display device event handler implemented by the client.
diff --git a/sdm/include/core/layer_buffer.h b/sdm/include/core/layer_buffer.h
index 65ecc91..524a84b 100644
--- a/sdm/include/core/layer_buffer.h
+++ b/sdm/include/core/layer_buffer.h
@@ -123,11 +123,9 @@
   @sa LayerBuffer
 */
 struct LayerBufferPlane {
-  int fd;           //!< File descriptor referring to the buffer associated with this plane.
-  uint32_t offset;  //!< Offset of the plane in bytes from beginning of the buffer.
-  uint32_t stride;  //!< Stride in bytes i.e. length of a scanline including padding.
-
-  LayerBufferPlane() : fd(-1), offset(0), stride(0) { }
+  int fd = -1;           //!< File descriptor referring to the buffer associated with this plane.
+  uint32_t offset = 0;   //!< Offset of the plane in bytes from beginning of the buffer.
+  uint32_t stride = 0;   //!< Stride in bytes i.e. length of a scanline including padding.
 };
 
 /*! @brief This structure defines flags associated with a layer buffer. The 1-bit flag can be set
@@ -156,10 +154,9 @@
                                     //!< session can not coexist with non-secure session.
       };
 
-      uint32_t flags;   //!< For initialization purpose only. Client shall not refer it directly.
+      uint32_t flags = 0;           //!< For initialization purpose only.
+                                    //!< Client shall not refer to it directly.
   };
-
-  LayerBufferFlags() : flags(0) { }
 };
 
 /*! @brief This structure defines a layer buffer handle which contains raw buffer and its associated
@@ -169,15 +166,15 @@
   @sa LayerStack
 */
 struct LayerBuffer {
-  uint32_t width;               //!< Actual width of the Layer that this buffer is for.
-  uint32_t height;              //!< Actual height of the Layer that this buffer is for.
-  LayerBufferFormat format;     //!< Format of the buffer content.
+  uint32_t width = 0;           //!< Actual width of the Layer that this buffer is for.
+  uint32_t height = 0;          //!< Actual height of the Layer that this buffer is for.
+  LayerBufferFormat format = kFormatRGBA8888;     //!< Format of the buffer content.
   LayerBufferPlane planes[4];   //!< Array of planes that this buffer contains. RGB buffer formats
                                 //!< have 1 plane whereas YUV buffer formats may have upto 4 planes.
                                 //!< Total number of planes for the buffer will be interpreted based
                                 //!< on the buffer format specified.
 
-  int acquire_fence_fd;         //!< File descriptor referring to a sync fence object which will be
+  int acquire_fence_fd = -1;    //!< File descriptor referring to a sync fence object which will be
                                 //!< signaled when buffer can be read/write by display manager.
                                 //!< This fence object is set by the client during Commit(). For
                                 //!< input buffers client shall signal this fence when buffer
@@ -188,7 +185,7 @@
                                 //!< This field is used only during Commit() and shall be set to -1
                                 //!< by the client when buffer is already available for read/write.
 
-  int release_fence_fd;         //!< File descriptor referring to a sync fence object which will be
+  int release_fence_fd = -1;    //!< File descriptor referring to a sync fence object which will be
                                 //!< signaled when buffer has been read/written by display manager.
                                 //!< This fence object is set by display manager during Commit().
                                 //!< For input buffers display manager will signal this fence when
@@ -200,9 +197,6 @@
                                 //!< read/write.
 
   LayerBufferFlags flags;       //!< Flags associated with this buffer.
-
-  LayerBuffer() : width(0), height(0), format(kFormatRGBA8888), acquire_fence_fd(-1),
-                  release_fence_fd(-1) { }
 };
 
 }  // namespace sdm
diff --git a/sdm/include/core/layer_stack.h b/sdm/include/core/layer_stack.h
index 06c8577..b2a8210 100644
--- a/sdm/include/core/layer_stack.h
+++ b/sdm/include/core/layer_stack.h
@@ -138,10 +138,9 @@
                               //!< Display Device may handle this layer using HWCursor
     };
 
-    uint32_t flags;   //!< For initialization purpose only. Client shall not refer it directly.
+    uint32_t flags = 0;       //!< For initialization purpose only.
+                              //!< Client shall not refer it directly.
   };
-
-  LayerFlags() : flags(0) { }
 };
 
 /*! @brief This structure defines flags associated with a layer stack. The 1-bit flag can be set to
@@ -177,10 +176,9 @@
                                       //!< stack contains cursor layer.
     };
 
-    uint32_t flags;   //!< For initialization purpose only. Client shall not refer it directly.
+    uint32_t flags = 0;               //!< For initialization purpose only.
+                                      //!< Client shall not refer it directly.
   };
-
-  LayerStackFlags() : flags(0) { }
 };
 
 /*! @brief This structure defines a rectanglular area inside a display layer.
@@ -188,13 +186,12 @@
   @sa LayerRectArray
 */
 struct LayerRect {
-  float left;     //!< Left-most pixel coordinate.
-  float top;      //!< Top-most pixel coordinate.
-  float right;    //!< Right-most pixel coordinate.
-  float bottom;   //!< Bottom-most pixel coordinate.
+  float left   = 0.0f;   //!< Left-most pixel coordinate.
+  float top    = 0.0f;   //!< Top-most pixel coordinate.
+  float right  = 0.0f;   //!< Right-most pixel coordinate.
+  float bottom = 0.0f;   //!< Bottom-most pixel coordinate.
 
-  LayerRect() : left(0.0f), top(0.0f), right(0.0f), bottom(0.0f) { }
-
+  LayerRect() = default;
   LayerRect(float l, float t, float r, float b) : left(l), top(t), right(r), bottom(b) { }
 };
 
@@ -203,10 +200,8 @@
   @sa LayerRect
 */
 struct LayerRectArray {
-  LayerRect *rect;  //!< Pointer to first element of array.
-  uint32_t count;   //!< Number of elements in the array.
-
-  LayerRectArray() : rect(NULL), count(0) { }
+  LayerRect *rect = NULL;  //!< Pointer to first element of array.
+  uint32_t count = 0;      //!< Number of elements in the array.
 };
 
 /*! @brief This structure defines display layer object which contains layer properties and a drawing
@@ -215,58 +210,65 @@
   @sa LayerArray
 */
 struct Layer {
-  LayerBuffer *input_buffer;        //!< Pointer to the buffer to be composed. If this remains
-                                    //!< unchanged between two consecutive Prepare() calls and
-                                    //!< geometry_changed flag is not set for the second call, then
-                                    //!< the display device will assume that buffer content has not
-                                    //!< changed.
+  LayerBuffer *input_buffer = NULL;                //!< Pointer to the buffer to be composed.
+                                                   //!< If this remains unchanged between two
+                                                   //!< consecutive Prepare() calls and
+                                                   //!< geometry_changed flag is not set for the
+                                                   //!< second call, then the display device will
+                                                   //!< assume that buffer content has not
+                                                   //!< changed.
 
-  LayerComposition composition;     //!< Composition type which can be set by either the client or
-                                    //!< the display device. This value should be preserved between
-                                    //!< Prepare() and Commit() calls.
+  LayerComposition composition = kCompositionGPU;  //!< Composition type which can be set by either
+                                                   //!< the client or the display device. This value
+                                                   //!< should be preserved between Prepare() and
+                                                   //!< Commit() calls.
 
-  LayerRect src_rect;               //!< Rectangular area of the layer buffer to consider for
-                                    //!< composition.
+  LayerRect src_rect;                              //!< Rectangular area of the layer buffer to
+                                                   //!< consider for composition.
 
-  LayerRect dst_rect;               //!< The target position where the frame will be displayed.
-                                    //!< Cropping rectangle is scaled to fit into this rectangle.
-                                    //!< The origin is top-left corner of the screen.
+  LayerRect dst_rect;                              //!< The target position where the frame will be
+                                                   //!< displayed. Cropping rectangle is scaled to
+                                                   //!< fit into this rectangle. The origin is the
+                                                   //!< top-left corner of the screen.
 
-  LayerRectArray visible_regions;   //!< Visible rectangular areas in screen space. The visible
-                                    //!< region includes areas overlapped by a translucent layer.
+  LayerRectArray visible_regions;                  //!< Visible rectangular areas in screen space.
+                                                   //!< The visible region includes areas overlapped
+                                                   //!< by a translucent layer.
 
-  LayerRectArray dirty_regions;     //!< Rectangular areas in the current frames that have changed
-                                    //!< in comparison to previous frame.
+  LayerRectArray dirty_regions;                    //!< Rectangular areas in the current frames
+                                                   //!< that have changed in comparison to
+                                                   //!< previous frame.
 
-  LayerRectArray blit_regions;      //!< Rectangular areas of this layer which need to composed
-                                    //!< to blit target. Display device will update blit rectangles
-                                    //!< if a layer composition is set as hybrid. Nth blit rectangle
-                                    //!< shall be composed onto Nth blit target.
+  LayerRectArray blit_regions;                     //!< Rectangular areas of this layer which need
+                                                   //!< to be composed to blit target. Display
+                                                   //!< device will update blit rectangles if a
+                                                   //!< layer composition is set as hybrid. Nth blit
+                                                   //!< rectangle shall be composed onto Nth blit
+                                                   //!< target.
 
-  LayerBlending blending;           //!< Blending operation which need to be applied on the layer
-                                    //!< buffer during composition.
+  LayerBlending blending = kBlendingOpaque;        //!< Blending operation which need to be applied
+                                                   //!< on the layer buffer during composition.
 
-  LayerTransform transform;         //!< Rotation/Flip operations which need to be applied to the
-                                    //!< layer buffer during composition.
+  LayerTransform transform;                        //!< Rotation/Flip operations which need to be
+                                                   //!< applied to the layer buffer during
+                                                   //!< composition.
 
-  uint8_t plane_alpha;              //!< Alpha value applied to the whole layer. Value of each pixel
-                                    //!< computed as:
-                                    //!<    if(kBlendingPremultiplied) {
-                                    //!<      pixel.RGB = pixel.RGB * planeAlpha / 255
-                                    //!<    }
-                                    //!<    pixel.a = pixel.a * planeAlpha
+  uint8_t plane_alpha = 0;                         //!< Alpha value applied to the whole layer.
+                                                   //!< Value of each pixel is computed as:
+                                                   //!<    if(kBlendingPremultiplied) {
+                                                   //!<      pixel.RGB = pixel.RGB * planeAlpha/255
+                                                   //!<    }
+                                                   //!<    pixel.a = pixel.a * planeAlpha
 
-  LayerFlags flags;                 //!< Flags associated with this layer.
+  LayerFlags flags;                                //!< Flags associated with this layer.
 
-  uint32_t frame_rate;              //!< Rate at which frames are being updated for this layer.
+  uint32_t frame_rate = 0;                         //!< Rate at which frames are being updated for
+                                                   //!< this layer.
 
-  LayerColorSpace color_space;      //!< Color Space of the layer
+  LayerColorSpace color_space = kLimitedRange601;  //!< Color Space of the layer
 
-  uint32_t solid_fill_color;        //!< Solid color used to fill the layer when no content is
-                                    //!< associated with the layer.
-
-  Layer() : input_buffer(NULL), composition(kCompositionGPU), blending(kBlendingOpaque),
-            plane_alpha(0), frame_rate(0), color_space(kLimitedRange601), solid_fill_color(0) { }
+  uint32_t solid_fill_color = 0;                   //!< Solid color used to fill the layer when
+                                                   //!< no content is associated with the layer.
 };
 
 /*! @brief This structure defines a layer stack that contains layers which need to be composed and
@@ -276,24 +278,22 @@
   @sa DisplayInterface::Commit
 */
 struct LayerStack {
-  Layer *layers;                //!< Array of layers.
-  uint32_t layer_count;         //!< Total number of layers.
+  Layer *layers = NULL;                //!< Array of layers.
+  uint32_t layer_count = 0;            //!< Total number of layers.
 
-  int retire_fence_fd;          //!< File descriptor referring to a sync fence object which will
-                                //!< be signaled when this composited frame has been replaced on
-                                //!< screen by a subsequent frame on a physical display. The fence
-                                //!< object is created and returned during Commit(). Client shall
-                                //!< Client shall close the returned file descriptor.
-                                //!< NOTE: This field applies to a physical display only.
+  int retire_fence_fd = -1;            //!< File descriptor referring to a sync fence object which
+                                       //!< will be signaled when this composited frame has been
+                                       //!< replaced on screen by a subsequent frame on a physical
+                                       //!< display. The fence object is created and returned during
+                                       //!< Commit(). Client shall close the returned file
+                                       //!< descriptor.
+                                       //!< NOTE: This field applies to a physical display only.
 
-  LayerBuffer *output_buffer;   //!< Pointer to the buffer where composed buffer would be rendered
-                                //!< for virtual displays.
-                                //!< NOTE: This field applies to a virtual display only.
+  LayerBuffer *output_buffer = NULL;   //!< Pointer to the buffer where composed buffer would be
+                                       //!< rendered for virtual displays.
+                                       //!< NOTE: This field applies to a virtual display only.
 
-
-  LayerStackFlags flags;        //!< Flags associated with this layer set.
-
-  LayerStack() : layers(NULL), layer_count(0), retire_fence_fd(-1), output_buffer(NULL) { }
+  LayerStackFlags flags;               //!< Flags associated with this layer set.
 };
 
 }  // namespace sdm
diff --git a/sdm/include/private/color_params.h b/sdm/include/private/color_params.h
index 66fd840..e36f8e5 100644
--- a/sdm/include/private/color_params.h
+++ b/sdm/include/private/color_params.h
@@ -65,27 +65,26 @@
 };
 
 struct PPPendingParams {
-  PendingAction action;
-  void *params;
-  PPPendingParams() : action(kNoAction), params(NULL) {}
+  PendingAction action = kNoAction;
+  void *params = NULL;
 };
 
 struct PPColorInfo {
-  uint32_t r_bitdepth;
-  uint32_t r;
-  uint32_t g_bitdepth;
-  uint32_t g;
-  uint32_t b_bitdepth;
-  uint32_t b;
+  uint32_t r_bitdepth = 0;
+  uint32_t r = 0;
+  uint32_t g_bitdepth = 0;
+  uint32_t g = 0;
+  uint32_t b_bitdepth = 0;
+  uint32_t b = 0;
 };
 
 struct PPColorFillParams {
-  uint32_t flags;
+  uint32_t flags = 0;
   struct {
-    uint32_t width;
-    uint32_t height;
-    int32_t x;
-    int32_t y;
+    uint32_t width = 0;
+    uint32_t height = 0;
+    int32_t x = 0;
+    int32_t y = 0;
   } rect;
 
   PPColorInfo color;
@@ -106,10 +105,10 @@
 };
 
 struct PPHWAttributes : HWResourceInfo, HWPanelInfo, DisplayConfigVariableInfo {
-  const char *panel_name;  // TODO(user):  Add into HWPanelInfo to retrieve panel_name from HW.
+  const char *panel_name = "generic_panel";  // TODO(user):  Add into HWPanelInfo
+                                             // to retrieve panel_name from HW.
   PPFeatureVersion version;
 
-  PPHWAttributes() : panel_name("generic_panel"), version() {}
   inline void Set(const HWResourceInfo &hw_res, const HWPanelInfo &panel_info,
                   const DisplayConfigVariableInfo &attr, const PPFeatureVersion &feature_ver) {
     HWResourceInfo &res = *this;
@@ -123,13 +122,13 @@
 };
 
 struct PPDisplayAPIPayload {
-  bool own_payload;  // to indicate if *payload is owned by this or just a reference.
-  uint32_t size;
-  uint8_t *payload;
+  bool own_payload = false;  // to indicate if *payload is owned by this or just a reference.
+  uint32_t size = 0;
+  uint8_t *payload = NULL;
 
-  PPDisplayAPIPayload() : own_payload(false), size(0), payload(NULL) {}
+  PPDisplayAPIPayload() = default;
   PPDisplayAPIPayload(uint32_t size, uint8_t *param)
-      : own_payload(false), size(size), payload(param) {}
+      : size(size), payload(param) {}
 
   template <typename T>
   DisplayError CreatePayload(T *&output) {
@@ -175,78 +174,71 @@
 };
 
 struct SDEPccCoeff {
-  uint32_t c;
-  uint32_t r;
-  uint32_t g;
-  uint32_t b;
-  uint32_t rg;
-  uint32_t gb;
-  uint32_t rb;
-  uint32_t rgb;
-
-  SDEPccCoeff() : c(0), r(0), g(0), b(0), rg(0), gb(0), rb(0), rgb(0) {}
+  uint32_t c = 0;
+  uint32_t r = 0;
+  uint32_t g = 0;
+  uint32_t b = 0;
+  uint32_t rg = 0;
+  uint32_t gb = 0;
+  uint32_t rb = 0;
+  uint32_t rgb = 0;
 };
 
 struct SDEPccCfg {
   SDEPccCoeff red;
   SDEPccCoeff green;
   SDEPccCoeff blue;
-  SDEPccCfg() : red(), green(), blue() {}
 
   static SDEPccCfg *Init(uint32_t arg __attribute__((__unused__)));
   SDEPccCfg *GetConfig() { return this; }
 };
 
 struct SDEPaMemColorData {
-  uint32_t adjust_p0;
-  uint32_t adjust_p1;
-  uint32_t adjust_p2;
-  uint32_t blend_gain;
-  uint8_t sat_hold;
-  uint8_t val_hold;
-  uint32_t hue_region;
-  uint32_t sat_region;
-  uint32_t val_region;
+  uint32_t adjust_p0 = 0;
+  uint32_t adjust_p1 = 0;
+  uint32_t adjust_p2 = 0;
+  uint32_t blend_gain = 0;
+  uint8_t sat_hold = 0;
+  uint8_t val_hold = 0;
+  uint32_t hue_region = 0;
+  uint32_t sat_region = 0;
+  uint32_t val_region = 0;
 };
 
 struct SDEPaData {
   static const int kSixZoneLUTSize = 384;
-  uint32_t mode;
-  uint32_t hue_adj;
-  uint32_t sat_adj;
-  uint32_t val_adj;
+  uint32_t mode = 0;
+  uint32_t hue_adj = 0;
+  uint32_t sat_adj = 0;
+  uint32_t val_adj = 0;
   uint32_t cont_adj;
   SDEPaMemColorData skin;
   SDEPaMemColorData sky;
   SDEPaMemColorData foliage;
-  uint32_t six_zone_thresh;
-  uint32_t six_zone_adj_p0;
-  uint32_t six_zone_adj_p1;
-  uint8_t six_zone_sat_hold;
-  uint8_t six_zone_val_hold;
-  uint32_t six_zone_len;
-  uint32_t *six_zone_curve_p0;
-  uint32_t *six_zone_curve_p1;
+  uint32_t six_zone_thresh = 0;
+  uint32_t six_zone_adj_p0 = 0;
+  uint32_t six_zone_adj_p1 = 0;
+  uint8_t six_zone_sat_hold = 0;
+  uint8_t six_zone_val_hold = 0;
+  uint32_t six_zone_len = 0;
+  uint32_t *six_zone_curve_p0 = NULL;
+  uint32_t *six_zone_curve_p1 = NULL;
 };
 
 struct SDEIgcLUTData {
   static const int kMaxIgcLUTEntries = 256;
-  uint32_t table_fmt;
-  uint32_t len;
-  uint32_t *c0_c1_data;
-  uint32_t *c2_data;
-
-  SDEIgcLUTData() : table_fmt(0), len(0), c0_c1_data(NULL), c2_data(NULL) {}
+  uint32_t table_fmt = 0;
+  uint32_t len = 0;
+  uint32_t *c0_c1_data = NULL;
+  uint32_t *c2_data = NULL;
 };
 
 struct SDEPgcLUTData {
   static const int kPgcLUTEntries = 1024;
-  uint32_t len;
-  uint32_t *c0_data;
-  uint32_t *c1_data;
-  uint32_t *c2_data;
-
-  SDEPgcLUTData() : len(0), c0_data(NULL), c1_data(NULL), c2_data(NULL) {}
+  uint32_t len = 0;
+  uint32_t *c0_data = NULL;
+  uint32_t *c1_data = NULL;
+  uint32_t *c2_data = NULL;
 };
 
 // Wrapper on HW block config data structure to encapsulate the details of allocating
@@ -272,8 +264,8 @@
   inline SDEGamutCfg *GetConfig(void) { return this; }
 
  private:
-  SDEGamutCfgWrapper() : buffer_(NULL) {}
-  uint32_t *buffer_;
+  SDEGamutCfgWrapper() {}
+  uint32_t *buffer_ = NULL;
 };
 
 class SDEPaCfgWrapper : private SDEPaData {
@@ -286,8 +278,8 @@
   inline SDEPaData *GetConfig(void) { return this; }
 
  private:
-  SDEPaCfgWrapper() : buffer_(NULL) {}
-  uint32_t *buffer_;
+  SDEPaCfgWrapper() {}
+  uint32_t *buffer_ = NULL;
 };
 
 class SDEIgcLUTWrapper : private SDEIgcLUTData {
@@ -300,8 +292,8 @@
   inline SDEIgcLUTData *GetConfig(void) { return this; }
 
  private:
-  SDEIgcLUTWrapper() : buffer_(NULL) {}
-  uint32_t *buffer_;
+  SDEIgcLUTWrapper() {}
+  uint32_t *buffer_ = NULL;
 };
 
 class SDEPgcLUTWrapper : private SDEPgcLUTData {
@@ -314,24 +306,21 @@
   inline SDEPgcLUTData *GetConfig(void) { return this; }
 
  private:
-  SDEPgcLUTWrapper() : buffer_(NULL) {}
-  uint32_t *buffer_;
+  SDEPgcLUTWrapper() {}
+  uint32_t *buffer_ = NULL;
 };
 
 // Base Postprocessing features information.
 class PPFeatureInfo {
  public:
-  uint32_t enable_flags_;  // bitmap to indicate subset of parameters enabling or not.
-  uint32_t feature_version_;
-  uint32_t feature_id_;
-  uint32_t disp_id_;
-  uint32_t pipe_id_;
+  uint32_t enable_flags_ = 0;  // bitmap to indicate subset of parameters enabling or not.
+  uint32_t feature_version_ = 0;
+  uint32_t feature_id_ = 0;
+  uint32_t disp_id_ = 0;
+  uint32_t pipe_id_ = 0;
 
   virtual ~PPFeatureInfo() {}
   virtual void *GetConfigData(void) const = 0;
-
-  PPFeatureInfo()
-      : enable_flags_(0), feature_version_(0), feature_id_(0), disp_id_(0), pipe_id_(0) {}
 };
 
 // Individual Postprocessing feature representing physical attributes and information
@@ -367,10 +356,10 @@
   }
 
  protected:
-  TPPFeatureInfo() : params_(NULL) {}
+  TPPFeatureInfo() = default;
 
  private:
-  T *params_;
+  T *params_ = NULL;
 };
 
 // This singleton class serves as data exchanging central between data producer
@@ -381,7 +370,7 @@
 // All API exposed are not threadsafe, it's caller's responsiblity to acquire the locker.
 class PPFeaturesConfig {
  public:
-  PPFeaturesConfig() : dirty_(0), next_idx_(0) { memset(feature_, 0, sizeof(feature_)); }
+  PPFeaturesConfig() { memset(feature_, 0, sizeof(feature_)); }
   ~PPFeaturesConfig() { Reset(); }
 
   // ColorManager installs one TFeatureInfo<T> to take the output configs computed
@@ -433,10 +422,10 @@
   inline void MarkAsDirty() { dirty_ = true; }
 
  private:
-  bool dirty_;
+  bool dirty_ = 0;
   Locker locker_;
   PPFeatureInfo *feature_[kMaxNumPPFeatures];  // reference to TFeatureInfo<T>.
-  uint32_t next_idx_;
+  uint32_t next_idx_ = 0;
 };
 
 }  // namespace sdm
diff --git a/sdm/include/private/hw_info_types.h b/sdm/include/private/hw_info_types.h
index 846a722..44dd63a 100644
--- a/sdm/include/private/hw_info_types.h
+++ b/sdm/include/private/hw_info_types.h
@@ -66,62 +66,49 @@
 };
 
 struct HWResourceInfo {
-  uint32_t hw_version;
-  uint32_t hw_revision;
-  uint32_t num_dma_pipe;
-  uint32_t num_vig_pipe;
-  uint32_t num_rgb_pipe;
-  uint32_t num_cursor_pipe;
-  uint32_t num_blending_stages;
-  uint32_t num_rotator;
-  uint32_t num_control;
-  uint32_t num_mixer_to_disp;
-  uint32_t smp_total;
-  uint32_t smp_size;
-  uint32_t num_smp_per_pipe;
-  uint32_t max_scale_up;
-  uint32_t max_scale_down;
-  uint64_t max_bandwidth_low;
-  uint64_t max_bandwidth_high;
-  uint32_t max_mixer_width;
-  uint32_t max_pipe_width;
-  uint32_t max_cursor_size;
-  uint32_t max_pipe_bw;
-  uint32_t max_sde_clk;
-  float clk_fudge_factor;
-  uint32_t macrotile_nv12_factor;
-  uint32_t macrotile_factor;
-  uint32_t linear_factor;
-  uint32_t scale_factor;
-  uint32_t extra_fudge_factor;
-  bool has_bwc;
-  bool has_ubwc;
-  bool has_decimation;
-  bool has_macrotile;
-  bool has_rotator_downscale;
-  bool has_non_scalar_rgb;
-  bool is_src_split;
-
-  HWResourceInfo()
-    : hw_version(0), hw_revision(0), num_dma_pipe(0), num_vig_pipe(0), num_rgb_pipe(0),
-      num_cursor_pipe(0), num_blending_stages(0), num_rotator(0), num_control(0),
-      num_mixer_to_disp(0), smp_total(0), smp_size(0), num_smp_per_pipe(0), max_scale_up(1),
-      max_scale_down(1), max_bandwidth_low(0), max_bandwidth_high(0), max_mixer_width(2048),
-      max_pipe_width(2048),  max_cursor_size(0), max_pipe_bw(0), max_sde_clk(0),
-      clk_fudge_factor(1.0f), macrotile_nv12_factor(0), macrotile_factor(0), linear_factor(0),
-      scale_factor(0), extra_fudge_factor(0), has_bwc(false), has_ubwc(false),
-      has_decimation(false), has_macrotile(false), has_rotator_downscale(false),
-      has_non_scalar_rgb(false), is_src_split(false) { }
+  uint32_t hw_version = 0;
+  uint32_t hw_revision = 0;
+  uint32_t num_dma_pipe = 0;
+  uint32_t num_vig_pipe = 0;
+  uint32_t num_rgb_pipe = 0;
+  uint32_t num_cursor_pipe = 0;
+  uint32_t num_blending_stages = 0;
+  uint32_t num_rotator = 0;
+  uint32_t num_control = 0;
+  uint32_t num_mixer_to_disp = 0;
+  uint32_t smp_total = 0;
+  uint32_t smp_size = 0;
+  uint32_t num_smp_per_pipe = 0;
+  uint32_t max_scale_up = 1;
+  uint32_t max_scale_down = 1;
+  uint64_t max_bandwidth_low = 0;
+  uint64_t max_bandwidth_high = 0;
+  uint32_t max_mixer_width = 2048;
+  uint32_t max_pipe_width = 2048;
+  uint32_t max_cursor_size = 0;
+  uint32_t max_pipe_bw =  0;
+  uint32_t max_sde_clk = 0;
+  float clk_fudge_factor = 1.0f;
+  uint32_t macrotile_nv12_factor = 0;
+  uint32_t macrotile_factor = 0;
+  uint32_t linear_factor = 0;
+  uint32_t scale_factor = 0;
+  uint32_t extra_fudge_factor = 0;
+  bool has_bwc = false;
+  bool has_ubwc = false;
+  bool has_decimation = false;
+  bool has_macrotile = false;
+  bool has_rotator_downscale = false;
+  bool has_non_scalar_rgb = false;
+  bool is_src_split = false;
 
   void Reset() { *this = HWResourceInfo(); }
 };
 
 struct HWSplitInfo {
-  uint32_t left_split;
-  uint32_t right_split;
-  bool always_src_split;
-
-  HWSplitInfo() : left_split(0), right_split(0), always_src_split(false) { }
+  uint32_t left_split = 0;
+  uint32_t right_split = 0;
+  bool always_src_split = false;
 
   bool operator !=(const HWSplitInfo &split_info) {
     return ((left_split != split_info.left_split) || (right_split != split_info.right_split) ||
@@ -134,25 +121,21 @@
 };
 
 struct HWPanelInfo {
-  HWDisplayPort port;      // Display port
-  HWDisplayMode mode;      // Display mode
-  bool partial_update;     // Partial update feature
-  int left_align;          // ROI left alignment restriction
-  int width_align;         // ROI width alignment restriction
-  int top_align;;          // ROI top alignment restriction
-  int height_align;        // ROI height alignment restriction
-  int min_roi_width;       // Min width needed for ROI
-  int min_roi_height;      // Min height needed for ROI
-  bool needs_roi_merge;    // Merge ROI's of both the DSI's
-  bool dynamic_fps;        // Panel Supports dynamic fps
-  uint32_t min_fps;        // Min fps supported by panel
-  uint32_t max_fps;        // Max fps supported by panel
-  bool is_primary_panel;   // Panel is primary display
-  HWSplitInfo split_info;  // Panel split configuration
-
-  HWPanelInfo() : port(kPortDefault), mode(kModeDefault), partial_update(false), left_align(false),
-    width_align(false), top_align(false), height_align(false), min_roi_width(0), min_roi_height(0),
-    needs_roi_merge(false), dynamic_fps(false), min_fps(0), max_fps(0), is_primary_panel(false) { }
+  HWDisplayPort port = kPortDefault;  // Display port
+  HWDisplayMode mode = kModeDefault;  // Display mode
+  bool partial_update = false;        // Partial update feature
+  int left_align = 0;                 // ROI left alignment restriction
+  int width_align = 0;                // ROI width alignment restriction
+  int top_align = 0;                  // ROI top alignment restriction
+  int height_align = 0;               // ROI height alignment restriction
+  int min_roi_width = 0;              // Min width needed for ROI
+  int min_roi_height = 0;             // Min height needed for ROI
+  bool needs_roi_merge = false;       // Merge ROI's of both the DSI's
+  bool dynamic_fps = false;           // Panel Supports dynamic fps
+  uint32_t min_fps = 0;               // Min fps supported by panel
+  uint32_t max_fps = 0;               // Max fps supported by panel
+  bool is_primary_panel = false;      // Panel is primary display
+  HWSplitInfo split_info;             // Panel split configuration
 
   bool operator !=(const HWPanelInfo &panel_info) {
     return ((port != panel_info.port) || (mode != panel_info.mode) ||
@@ -173,20 +156,16 @@
 };
 
 struct HWSessionConfig {
-  uint32_t src_width;
-  uint32_t src_height;
-  LayerBufferFormat src_format;
-  uint32_t dst_width;
-  uint32_t dst_height;
-  LayerBufferFormat dst_format;
-  uint32_t buffer_count;
-  bool secure;
-  bool cache;
-  uint32_t frame_rate;
-
-  HWSessionConfig()
-    : src_width(0), src_height(0), src_format(kFormatInvalid), dst_width(0), dst_height(0),
-      dst_format(kFormatInvalid), buffer_count(0), secure(false), cache(false), frame_rate(0) { }
+  uint32_t src_width = 0;
+  uint32_t src_height = 0;
+  LayerBufferFormat src_format = kFormatInvalid;
+  uint32_t dst_width = 0;
+  uint32_t dst_height = 0;
+  LayerBufferFormat dst_format = kFormatInvalid;
+  uint32_t buffer_count = 0;
+  bool secure = false;
+  bool cache = false;
+  uint32_t frame_rate = 0;
 
   bool operator != (const HWSessionConfig &input_config) const {
     if ((src_width != input_config.src_width) || (src_height != input_config.src_height) ||
@@ -206,34 +185,27 @@
 };
 
 struct HWRotateInfo {
-  int pipe_id;
-  int writeback_id;
+  int pipe_id = -1;
+  int writeback_id = -1;
   LayerRect src_roi;
   LayerRect dst_roi;
-  bool valid;
-  int rotate_id;
-
-  HWRotateInfo()
-    : pipe_id(-1), writeback_id(-1), valid(false), rotate_id(-1) { }
+  bool valid = false;
+  int rotate_id = -1;
 
   void Reset() { *this = HWRotateInfo(); }
 };
 
 struct HWRotatorSession {
   HWRotateInfo hw_rotate_info[kMaxRotatePerLayer];
-  uint32_t hw_block_count;  // number of rotator hw blocks used by rotator session
-  float downscale_ratio;
+  uint32_t hw_block_count = 0;  // number of rotator hw blocks used by rotator session
+  float downscale_ratio = 1.0f;
   LayerTransform transform;
   HWSessionConfig hw_session_config;
   LayerBuffer output_buffer;
-  int session_id;
-  float input_compression;
-  float output_compression;
-  bool is_buffer_cached;
-
-  HWRotatorSession()
-    : hw_block_count(0), downscale_ratio(1.0f), session_id(-1), input_compression(1.0f),
-      output_compression(1.0f), is_buffer_cached(false) { }
+  int session_id = -1;
+  float input_compression = 1.0f;
+  float output_compression = 1.0f;
+  bool is_buffer_cached = false;
 };
 
 struct HWPixelExtension {
@@ -249,73 +221,62 @@
 };
 
 struct HWPlane {
-  int init_phase_x;
-  int phase_step_x;
-  int init_phase_y;
-  int phase_step_y;
+  int init_phase_x = 0;
+  int phase_step_x = 0;
+  int init_phase_y = 0;
+  int phase_step_y = 0;
   HWPixelExtension left;
   HWPixelExtension top;
   HWPixelExtension right;
   HWPixelExtension bottom;
-  uint32_t roi_width;
+  uint32_t roi_width = 0;
 };
 
 struct ScaleData {
   uint8_t enable_pixel_ext;
-  uint32_t src_width;
-  uint32_t src_height;
+  uint32_t src_width = 0;
+  uint32_t src_height = 0;
   HWPlane plane[4];
 };
 
 struct HWPipeInfo {
-  uint32_t pipe_id;
+  uint32_t pipe_id = 0;
   LayerRect src_roi;
   LayerRect dst_roi;
-  uint8_t horizontal_decimation;
-  uint8_t vertical_decimation;
+  uint8_t horizontal_decimation = 0;
+  uint8_t vertical_decimation = 0;
   ScaleData scale_data;
-  bool valid;
-  uint32_t z_order;
-
-  HWPipeInfo()
-    : pipe_id(0), horizontal_decimation(0), vertical_decimation(0), valid(false), z_order(0) { }
+  bool valid = false;
+  uint32_t z_order = 0;
 
   void Reset() { *this = HWPipeInfo(); }
 };
 
 struct HWLayerConfig {
-  bool use_non_dma_pipe;  // set by client
-  HWPipeInfo left_pipe;   // pipe for left side of output
-  HWPipeInfo right_pipe;  // pipe for right side of output
+  bool use_non_dma_pipe = false;  // set by client
+  HWPipeInfo left_pipe;           // pipe for left side of output
+  HWPipeInfo right_pipe;          // pipe for right side of output
   HWRotatorSession hw_rotator_session;
-  float compression;
-
-  HWLayerConfig() : use_non_dma_pipe(false), compression(1.0f) { }
+  float compression = 1.0f;
 
   void Reset() { *this = HWLayerConfig(); }
 };
 
 struct HWLayersInfo {
-  LayerStack *stack;        // Input layer stack. Set by the caller.
+  LayerStack *stack = NULL;        // Input layer stack. Set by the caller.
 
-  uint32_t index[kMaxSDELayers];
-                            // Indexes of the layers from the layer stack which need to be
-                            // programmed on hardware.
+  uint32_t index[kMaxSDELayers];   // Indexes of the layers from the layer stack which need to be
+                                   // programmed on hardware.
 
-  uint32_t count;           // Total number of layers which need to be set on hardware.
+  uint32_t count = 0;              // Total number of layers which need to be set on hardware.
 
-  bool need_sync_handle;
-  int sync_handle;
+  bool need_sync_handle = false;
+  int sync_handle = -1;
 
-  LayerRect left_partial_update;
-                            // Left ROI.
+  LayerRect left_partial_update;   // Left ROI.
+  LayerRect right_partial_update;  // Right ROI.
 
-  LayerRect right_partial_update;
-                            // Right ROI.
-  bool use_hw_cursor;       // Indicates that HWCursor pipe needs to be used for cursor layer
-
-
-  HWLayersInfo() : stack(NULL), count(0), need_sync_handle(false), sync_handle(-1) { }
+  bool use_hw_cursor = false;      // Indicates that HWCursor pipe needs to be used for cursor layer
 };
 
 struct HWLayers {
@@ -325,16 +286,13 @@
 };
 
 struct HWDisplayAttributes : DisplayConfigVariableInfo {
-  bool is_device_split;
-  uint32_t split_left;
-  bool always_src_split;
-  uint32_t v_front_porch;  //!< Vertical front porch of panel
-  uint32_t v_back_porch;   //!< Vertical back porch of panel
-  uint32_t v_pulse_width;  //!< Vertical pulse width of panel
-  uint32_t h_total;        //!< Total width of panel (hActive + hFP + hBP + hPulseWidth)
-
-  HWDisplayAttributes() : is_device_split(false), split_left(0), always_src_split(false),
-                          v_front_porch(0), v_back_porch(0), v_pulse_width(0), h_total(0) { }
+  bool is_device_split = false;
+  uint32_t split_left = 0;
+  bool always_src_split = false;
+  uint32_t v_front_porch = 0;  //!< Vertical front porch of panel
+  uint32_t v_back_porch = 0;   //!< Vertical back porch of panel
+  uint32_t v_pulse_width = 0;  //!< Vertical pulse width of panel
+  uint32_t h_total = 0;        //!< Total width of panel (hActive + hFP + hBP + hPulseWidth)
 
   void Reset() { *this = HWDisplayAttributes(); }
 
diff --git a/sdm/include/private/strategy_interface.h b/sdm/include/private/strategy_interface.h
index f2c5f78..f175311 100644
--- a/sdm/include/private/strategy_interface.h
+++ b/sdm/include/private/strategy_interface.h
@@ -32,17 +32,15 @@
 namespace sdm {
 
 struct StrategyConstraints {
-  bool safe_mode;         //!< In this mode, strategy manager chooses the composition strategy
-                          //!< that requires minimum number of pipe for the current frame. i.e.,
-                          //!< video only composition, secure only composition or GPU composition
+  bool safe_mode = false;   //!< In this mode, strategy manager chooses the composition strategy
+                            //!< that requires minimum number of pipe for the current frame. i.e.,
+                            //!< video only composition, secure only composition or GPU composition
 
-  bool use_cursor;        //!<  If this is set, strategy manager will configure cursor layer in the
-                          //!<  layer stack as hw cursor else it will be treated as a normal layer
+  bool use_cursor = false;  //!< If this is set, strategy manager will configure cursor layer in the
+                            //!< layer stack as hw cursor else it will be treated as a normal layer
 
-  uint32_t max_layers;    //!< Maximum number of layers that shall be programmed on hardware for the
-                          //!< given layer stack.
-
-  StrategyConstraints() : safe_mode(false), use_cursor(false), max_layers(kMaxSDELayers) { }
+  uint32_t max_layers = kMaxSDELayers;  //!< Maximum number of layers that shall be programmed
+                                        //!< on hardware for the given layer stack.
 };
 
 class StrategyInterface {
diff --git a/sdm/libs/core/comp_manager.cpp b/sdm/libs/core/comp_manager.cpp
index 784597d..4cfc2c4 100644
--- a/sdm/libs/core/comp_manager.cpp
+++ b/sdm/libs/core/comp_manager.cpp
@@ -33,11 +33,6 @@
 
 namespace sdm {
 
-CompManager::CompManager()
-  : resource_intf_(NULL), registered_displays_(0), configured_displays_(0), safe_mode_(false),
-    extension_intf_(NULL) {
-}
-
 DisplayError CompManager::Init(const HWResourceInfo &hw_res_info,
                                ExtensionInterface *extension_intf,
                                BufferSyncHandler *buffer_sync_handler) {
diff --git a/sdm/libs/core/comp_manager.h b/sdm/libs/core/comp_manager.h
index fbfe6f4..f8175f3 100644
--- a/sdm/libs/core/comp_manager.h
+++ b/sdm/libs/core/comp_manager.h
@@ -38,7 +38,6 @@
 
 class CompManager : public DumpImpl {
  public:
-  CompManager();
   DisplayError Init(const HWResourceInfo &hw_res_info_, ExtensionInterface *extension_intf,
                   BufferSyncHandler *buffer_sync_handler);
   DisplayError Deinit();
@@ -88,15 +87,15 @@
   };
 
   Locker locker_;
-  ResourceInterface *resource_intf_;
+  ResourceInterface *resource_intf_ = NULL;
   ResourceDefault resource_default_;
-  uint64_t registered_displays_;        // Stores the bit mask of registered displays
-  uint64_t configured_displays_;        // Stores the bit mask of sucessfully configured displays
-  bool safe_mode_;                      // Flag to notify all displays to be in resource crunch
+  uint64_t registered_displays_ = 0;    // Stores the bit mask of registered displays
+  uint64_t configured_displays_ = 0;    // Stores the bit mask of sucessfully configured displays
+  bool safe_mode_ = false;              // Flag to notify all displays to be in resource crunch
                                         // mode, where strategy manager chooses the best strategy
                                         // that uses optimal number of pipes for each display
   HWResourceInfo hw_res_info_;
-  ExtensionInterface *extension_intf_;
+  ExtensionInterface *extension_intf_ = NULL;
 };
 
 }  // namespace sdm
diff --git a/sdm/libs/core/core_impl.cpp b/sdm/libs/core/core_impl.cpp
index 65abbe2..6a3ba1a 100644
--- a/sdm/libs/core/core_impl.cpp
+++ b/sdm/libs/core/core_impl.cpp
@@ -40,9 +40,7 @@
 
 CoreImpl::CoreImpl(BufferAllocator *buffer_allocator,
                    BufferSyncHandler *buffer_sync_handler)
-  : buffer_allocator_(buffer_allocator), buffer_sync_handler_(buffer_sync_handler),
-    hw_resource_(NULL), hw_info_intf_(NULL), rotator_intf_(NULL), extension_lib_(NULL),
-    extension_intf_(NULL), create_extension_intf_(NULL), destroy_extension_intf_(NULL) {
+  : buffer_allocator_(buffer_allocator), buffer_sync_handler_(buffer_sync_handler) {
 }
 
 DisplayError CoreImpl::Init() {
diff --git a/sdm/libs/core/core_impl.h b/sdm/libs/core/core_impl.h
index 21dd98e..c186754 100644
--- a/sdm/libs/core/core_impl.h
+++ b/sdm/libs/core/core_impl.h
@@ -44,7 +44,6 @@
  public:
   // This class implements display core interface revision 1.0.
   static const uint16_t kRevision = SET_REVISION(1, 0);
-
   CoreImpl(BufferAllocator *buffer_allocator, BufferSyncHandler *buffer_sync_handler);
   virtual ~CoreImpl() { }
 
@@ -63,14 +62,14 @@
   Locker locker_;
   BufferAllocator *buffer_allocator_;
   BufferSyncHandler *buffer_sync_handler_;
-  HWResourceInfo *hw_resource_;
+  HWResourceInfo *hw_resource_ = NULL;
   CompManager comp_mgr_;
-  HWInfoInterface *hw_info_intf_;
-  RotatorInterface *rotator_intf_;
-  void *extension_lib_;
-  ExtensionInterface *extension_intf_;
-  CreateExtensionInterface create_extension_intf_;
-  DestroyExtensionInterface destroy_extension_intf_;
+  HWInfoInterface *hw_info_intf_ = NULL;
+  RotatorInterface *rotator_intf_ = NULL;
+  void *extension_lib_ = NULL;
+  ExtensionInterface *extension_intf_ = NULL;
+  CreateExtensionInterface create_extension_intf_ = NULL;
+  DestroyExtensionInterface destroy_extension_intf_ = NULL;
 };
 
 }  // namespace sdm
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp
index cf5ab8c..4c373a9 100644
--- a/sdm/libs/core/display_base.cpp
+++ b/sdm/libs/core/display_base.cpp
@@ -40,10 +40,7 @@
                          HWInfoInterface *hw_info_intf)
   : display_type_(display_type), event_handler_(event_handler), hw_device_type_(hw_device_type),
     buffer_sync_handler_(buffer_sync_handler), comp_manager_(comp_manager),
-    rotator_intf_(rotator_intf), state_(kStateOff), hw_device_(0), display_comp_ctx_(0),
-    display_attributes_(NULL), num_modes_(0), active_mode_index_(0), pending_commit_(false),
-    vsync_enable_(false), underscan_supported_(false), max_mixer_stages_(0),
-    hw_info_intf_(hw_info_intf), color_mgr_(NULL), partial_update_control_(true) {
+    rotator_intf_(rotator_intf), hw_info_intf_(hw_info_intf) {
 }
 
 DisplayError DisplayBase::Init() {
diff --git a/sdm/libs/core/display_base.h b/sdm/libs/core/display_base.h
index 75c1f8c..5a588a1 100644
--- a/sdm/libs/core/display_base.h
+++ b/sdm/libs/core/display_base.h
@@ -83,28 +83,28 @@
   const char *GetName(const LayerBufferFormat &format);
 
   DisplayType display_type_;
-  DisplayEventHandler *event_handler_;
+  DisplayEventHandler *event_handler_ = NULL;
   HWDeviceType hw_device_type_;
-  HWInterface *hw_intf_;
+  HWInterface *hw_intf_ = NULL;
   HWPanelInfo hw_panel_info_;
-  BufferSyncHandler *buffer_sync_handler_;
-  CompManager *comp_manager_;
-  RotatorInterface *rotator_intf_;
-  DisplayState state_;
-  Handle hw_device_;
-  Handle display_comp_ctx_;
-  Handle display_rotator_ctx_;
-  HWDisplayAttributes *display_attributes_;
-  uint32_t num_modes_;
-  uint32_t active_mode_index_;
+  BufferSyncHandler *buffer_sync_handler_ = NULL;
+  CompManager *comp_manager_ = NULL;
+  RotatorInterface *rotator_intf_ = NULL;
+  DisplayState state_ = kStateOff;
+  Handle hw_device_ = 0;
+  Handle display_comp_ctx_ = 0;
+  Handle display_rotator_ctx_ = 0;
+  HWDisplayAttributes *display_attributes_ = NULL;
+  uint32_t num_modes_ = 0;
+  uint32_t active_mode_index_ = 0;
   HWLayers hw_layers_;
-  bool pending_commit_;
-  bool vsync_enable_;
-  bool underscan_supported_;
-  uint32_t max_mixer_stages_;
-  HWInfoInterface *hw_info_intf_;
-  ColorManagerProxy *color_mgr_;  // each display object owns its ColorManagerProxy
-  bool partial_update_control_;
+  bool pending_commit_ = false;
+  bool vsync_enable_ = false;
+  bool underscan_supported_ = false;
+  uint32_t max_mixer_stages_ = 0;
+  HWInfoInterface *hw_info_intf_ = NULL;
+  ColorManagerProxy *color_mgr_ = NULL;  // each display object owns its ColorManagerProxy
+  bool partial_update_control_ = true;
 };
 
 }  // namespace sdm
diff --git a/sdm/libs/core/resource_default.cpp b/sdm/libs/core/resource_default.cpp
index ab66ac8..5034bac 100644
--- a/sdm/libs/core/resource_default.cpp
+++ b/sdm/libs/core/resource_default.cpp
@@ -34,10 +34,6 @@
 
 namespace sdm {
 
-ResourceDefault::ResourceDefault()
-  : num_pipe_(0), vig_pipes_(NULL), rgb_pipes_(NULL), dma_pipes_(NULL) {
-}
-
 DisplayError ResourceDefault::Init(const HWResourceInfo &hw_res_info) {
   DisplayError error = kErrorNone;
   uint32_t num_pipe = 0;
diff --git a/sdm/libs/core/resource_default.h b/sdm/libs/core/resource_default.h
index 990e102..a4549b0 100644
--- a/sdm/libs/core/resource_default.h
+++ b/sdm/libs/core/resource_default.h
@@ -35,7 +35,6 @@
 
 class ResourceDefault : public ResourceInterface {
  public:
-  ResourceDefault();
   DisplayError Init(const HWResourceInfo &hw_resource_info);
   DisplayError Deinit();
   virtual DisplayError RegisterDisplay(DisplayType type, const HWDisplayAttributes &attributes,
@@ -147,10 +146,10 @@
   HWResourceInfo hw_res_info_;
   HWBlockContext hw_block_ctx_[kHWBlockMax];
   SourcePipe src_pipes_[kPipeIdMax];
-  uint32_t num_pipe_;
-  SourcePipe *vig_pipes_;
-  SourcePipe *rgb_pipes_;
-  SourcePipe *dma_pipes_;
+  uint32_t num_pipe_ = 0;
+  SourcePipe *vig_pipes_ = NULL;
+  SourcePipe *rgb_pipes_ = NULL;
+  SourcePipe *dma_pipes_ = NULL;
 };
 
 }  // namespace sdm
diff --git a/sdm/libs/core/strategy.cpp b/sdm/libs/core/strategy.cpp
index 62e1697..37e2f5d 100644
--- a/sdm/libs/core/strategy.cpp
+++ b/sdm/libs/core/strategy.cpp
@@ -33,9 +33,8 @@
 
 Strategy::Strategy(ExtensionInterface *extension_intf, DisplayType type,
                    const HWResourceInfo &hw_resource_info, const HWPanelInfo &hw_panel_info)
-  : extension_intf_(extension_intf), strategy_intf_(NULL), partial_update_intf_(NULL),
-    display_type_(type), hw_resource_info_(hw_resource_info), hw_panel_info_(hw_panel_info),
-    hw_layers_info_(NULL), fb_layer_index_(0), extn_start_success_(false), tried_default_(false) {
+  : extension_intf_(extension_intf), display_type_(type), hw_resource_info_(hw_resource_info),
+    hw_panel_info_(hw_panel_info) {
 }
 
 DisplayError Strategy::Init() {
diff --git a/sdm/libs/core/strategy.h b/sdm/libs/core/strategy.h
index 22fd82a..e59068e 100644
--- a/sdm/libs/core/strategy.h
+++ b/sdm/libs/core/strategy.h
@@ -47,15 +47,15 @@
   void GenerateROI();
 
   ExtensionInterface *extension_intf_;
-  StrategyInterface *strategy_intf_;
-  PartialUpdateInterface *partial_update_intf_;
+  StrategyInterface *strategy_intf_ = NULL;
+  PartialUpdateInterface *partial_update_intf_ = NULL;
   DisplayType display_type_;
   HWResourceInfo hw_resource_info_;
   HWPanelInfo hw_panel_info_;
-  HWLayersInfo *hw_layers_info_;
-  uint32_t fb_layer_index_;
-  bool extn_start_success_;
-  bool tried_default_;
+  HWLayersInfo *hw_layers_info_ = NULL;
+  uint32_t fb_layer_index_ = 0;
+  bool extn_start_success_ = false;
+  bool tried_default_ = false;
 };
 
 }  // namespace sdm
diff --git a/sdm/libs/hwc/cpuhint.cpp b/sdm/libs/hwc/cpuhint.cpp
index dff25ac..f328268 100644
--- a/sdm/libs/hwc/cpuhint.cpp
+++ b/sdm/libs/hwc/cpuhint.cpp
@@ -37,10 +37,6 @@
 
 namespace sdm {
 
-CPUHint::CPUHint() : enabled_(false), pre_enable_window_(0), frame_countdown_(0), lock_handle_(0),
-  lock_acquired_(false), lib_handle_(NULL), fn_lock_acquire_(NULL), fn_lock_release_(NULL) {
-}
-
 CPUHint::~CPUHint() {
   if (lib_handle_) {
     dlclose(lib_handle_);
diff --git a/sdm/libs/hwc/cpuhint.h b/sdm/libs/hwc/cpuhint.h
index 2165c99..14ecd93 100644
--- a/sdm/libs/hwc/cpuhint.h
+++ b/sdm/libs/hwc/cpuhint.h
@@ -38,7 +38,6 @@
 
 class CPUHint {
  public:
-  CPUHint();
   ~CPUHint();
   DisplayError Init(HWCDebugHandler *debug_handler);
   void Set();
@@ -46,15 +45,15 @@
 
  private:
   enum { HINT =  0x4701 /* 47-display layer hint, 01-Enable */ };
-  bool enabled_;
+  bool enabled_ = false;
   // frames to wait before setting this hint
-  int pre_enable_window_;
-  int frame_countdown_;
-  int lock_handle_;
-  bool lock_acquired_;
-  void *lib_handle_;
-  int (*fn_lock_acquire_)(int handle, int duration, int *hints, int num_args);
-  int (*fn_lock_release_)(int value);
+  int pre_enable_window_ = 0;
+  int frame_countdown_ = 0;
+  int lock_handle_ = 0;
+  bool lock_acquired_ = false;
+  void *lib_handle_ = NULL;
+  int (*fn_lock_acquire_)(int handle, int duration, int *hints, int num_args) = NULL;
+  int (*fn_lock_release_)(int value) = NULL;
 };
 
 }  // namespace sdm
diff --git a/sdm/libs/hwc/hwc_display.cpp b/sdm/libs/hwc/hwc_display.cpp
index a7b1428..09da433 100644
--- a/sdm/libs/hwc/hwc_display.cpp
+++ b/sdm/libs/hwc/hwc_display.cpp
@@ -64,13 +64,7 @@
 
 HWCDisplay::HWCDisplay(CoreInterface *core_intf, hwc_procs_t const **hwc_procs, DisplayType type,
                        int id, bool needs_blit)
-  : core_intf_(core_intf), hwc_procs_(hwc_procs), type_(type), id_(id), needs_blit_(needs_blit),
-    display_intf_(NULL), flush_(false), dump_frame_count_(0), dump_frame_index_(0),
-    dump_input_layers_(false), swap_interval_zero_(false), framebuffer_config_(NULL),
-    display_paused_(false), use_metadata_refresh_rate_(false), metadata_refresh_rate_(0),
-    boot_animation_completed_(false), shutdown_pending_(false), handle_refresh_(true),
-    use_blit_comp_(false), secure_display_active_(false), skip_prepare_(false),
-    solid_fill_enable_(false), blit_engine_(NULL) {
+  : core_intf_(core_intf), hwc_procs_(hwc_procs), type_(type), id_(id), needs_blit_(needs_blit) {
 }
 
 int HWCDisplay::Init() {
@@ -548,6 +542,11 @@
       SetBlending(HWC_BLENDING_COVERAGE, &layer.blending);
     } else {
       SetBlending(hwc_layer.blending, &layer.blending);
+      LayerTransform &layer_transform = layer.transform;
+      uint32_t &hwc_transform = hwc_layer.transform;
+      layer_transform.flip_horizontal = ((hwc_transform & HWC_TRANSFORM_FLIP_H) > 0);
+      layer_transform.flip_vertical = ((hwc_transform & HWC_TRANSFORM_FLIP_V) > 0);
+      layer_transform.rotation = ((hwc_transform & HWC_TRANSFORM_ROT_90) ? 90.0f : 0.0f);
     }
 
     // TODO(user): Remove below block.
@@ -563,12 +562,7 @@
       layer.dirty_regions.rect[0] = layer.src_rect;
     }
 
-    LayerTransform &layer_transform = layer.transform;
-    uint32_t &hwc_transform = hwc_layer.transform;
     layer.plane_alpha = hwc_layer.planeAlpha;
-    layer_transform.flip_horizontal = ((hwc_transform & HWC_TRANSFORM_FLIP_H) > 0);
-    layer_transform.flip_vertical = ((hwc_transform & HWC_TRANSFORM_FLIP_V) > 0);
-    layer_transform.rotation = ((hwc_transform & HWC_TRANSFORM_ROT_90) ? 90.0f : 0.0f);
     layer.flags.skip = ((hwc_layer.flags & HWC_SKIP_LAYER) > 0);
     layer.flags.cursor = ((hwc_layer.flags & HWC_IS_CURSOR_LAYER) > 0);
     layer.flags.updating = true;
diff --git a/sdm/libs/hwc/hwc_display.h b/sdm/libs/hwc/hwc_display.h
index 8ec3052..b3d7055 100644
--- a/sdm/libs/hwc/hwc_display.h
+++ b/sdm/libs/hwc/hwc_display.h
@@ -152,28 +152,28 @@
   DisplayType type_;
   int id_;
   bool needs_blit_;
-  DisplayInterface *display_intf_;
+  DisplayInterface *display_intf_ = NULL;
   LayerStackMemory layer_stack_memory_;
   LayerStack layer_stack_;
   LayerStackCache layer_stack_cache_;
-  bool flush_;
-  uint32_t dump_frame_count_;
-  uint32_t dump_frame_index_;
-  bool dump_input_layers_;
+  bool flush_ = false;
+  uint32_t dump_frame_count_ = 0;
+  uint32_t dump_frame_index_ = 0;
+  bool dump_input_layers_ = false;
   uint32_t last_power_mode_;
-  bool swap_interval_zero_;
-  DisplayConfigVariableInfo *framebuffer_config_;
-  bool display_paused_;
-  bool use_metadata_refresh_rate_;
-  uint32_t metadata_refresh_rate_;
-  bool boot_animation_completed_;
-  bool shutdown_pending_;
-  bool handle_refresh_;
-  bool use_blit_comp_;
-  bool secure_display_active_;
-  bool skip_prepare_;
+  bool swap_interval_zero_ = false;
+  DisplayConfigVariableInfo *framebuffer_config_ = NULL;
+  bool display_paused_ = false;
+  bool use_metadata_refresh_rate_ = false;
+  uint32_t metadata_refresh_rate_ = 0;
+  bool boot_animation_completed_ = false;
+  bool shutdown_pending_ = false;
+  bool handle_refresh_ = true;
+  bool use_blit_comp_ = false;
+  bool secure_display_active_ = false;
+  bool skip_prepare_ = false;
 
-  bool solid_fill_enable_;
+  bool solid_fill_enable_ = false;
   uint32_t solid_fill_color_;
 
  private:
@@ -182,7 +182,7 @@
   int PrepareLayerParams(hwc_layer_1_t *hwc_layer, Layer *layer, uint32_t fps);
   void CommitLayerParams(hwc_layer_1_t *hwc_layer, Layer *layer);
   void ResetLayerCacheStack();
-  BlitEngine *blit_engine_;
+  BlitEngine *blit_engine_ = NULL;
 };
 
 inline int HWCDisplay::Perform(uint32_t operation, ...) {
diff --git a/sdm/libs/hwc/hwc_session.cpp b/sdm/libs/hwc/hwc_session.cpp
index 72332e4..7a4361b 100644
--- a/sdm/libs/hwc/hwc_session.cpp
+++ b/sdm/libs/hwc/hwc_session.cpp
@@ -75,10 +75,21 @@
 Locker HWCSession::locker_;
 bool HWCSession::reset_panel_ = false;
 
-HWCSession::HWCSession(const hw_module_t *module) : core_intf_(NULL), hwc_procs_(NULL),
-            uevent_thread_exit_(false), uevent_thread_name_("HWC_UeventThread"),
-            secure_display_active_(false) {
-  memset(&hwc_display_, 0, sizeof(hwc_display_));
+static void Invalidate(const struct hwc_procs *procs) {
+}
+
+static void VSync(const struct hwc_procs* procs, int disp, int64_t timestamp) {
+}
+
+static void Hotplug(const struct hwc_procs* procs, int disp, int connected) {
+}
+
+HWCSession::HWCSession(const hw_module_t *module) {
+  // By default, drop any events. Calls will be routed to SurfaceFlinger after registerProcs.
+  hwc_procs_default_.invalidate = Invalidate;
+  hwc_procs_default_.vsync = VSync;
+  hwc_procs_default_.hotplug = Hotplug;
+
   hwc_composer_device_1_t::common.tag = HARDWARE_DEVICE_TAG;
   hwc_composer_device_1_t::common.version = HWC_DEVICE_API_VERSION_1_4;
   hwc_composer_device_1_t::common.module = const_cast<hw_module_t*>(module);
@@ -347,6 +358,7 @@
 
 int HWCSession::Query(hwc_composer_device_1 *device, int param, int *value) {
   SEQUENCE_WAIT_SCOPE_LOCK(locker_);
+
   if (!device || !value) {
     return -EINVAL;
   }
@@ -366,6 +378,8 @@
 }
 
 void HWCSession::RegisterProcs(hwc_composer_device_1 *device, hwc_procs_t const *procs) {
+  SEQUENCE_WAIT_SCOPE_LOCK(locker_);
+
   if (!device || !procs) {
     return;
   }
diff --git a/sdm/libs/hwc/hwc_session.h b/sdm/libs/hwc/hwc_session.h
index d696102..cd54b15 100644
--- a/sdm/libs/hwc/hwc_session.h
+++ b/sdm/libs/hwc/hwc_session.h
@@ -99,18 +99,19 @@
                                    android::Parcel *output_parcel);
 
   static Locker locker_;
-  CoreInterface *core_intf_;
-  hwc_procs_t const *hwc_procs_;
-  HWCDisplay *hwc_display_[HWC_NUM_DISPLAY_TYPES];
+  CoreInterface *core_intf_ = NULL;
+  hwc_procs_t hwc_procs_default_;
+  hwc_procs_t const *hwc_procs_ = &hwc_procs_default_;
+  HWCDisplay *hwc_display_[HWC_NUM_DISPLAY_TYPES] = { NULL };
   pthread_t uevent_thread_;
-  bool uevent_thread_exit_;
+  bool uevent_thread_exit_ = false;
+  const char *uevent_thread_name_ = "HWC_UeventThread";
+  HWCBufferAllocator *buffer_allocator_ = NULL;
+  HWCBufferSyncHandler *buffer_sync_handler_ = NULL;
+  HWCColorManager *color_mgr_ = NULL;
+  char brightness_[64] = { 0 };
   static bool reset_panel_;
-  const char *uevent_thread_name_;
-  HWCBufferAllocator *buffer_allocator_;
-  HWCBufferSyncHandler *buffer_sync_handler_;
-  HWCColorManager *color_mgr_;
-  char brightness_[64];
-  bool secure_display_active_;
+  bool secure_display_active_ = false;
 };
 
 }  // namespace sdm