diff --git a/compositor/drmdisplaycomposition.cpp b/compositor/drmdisplaycomposition.cpp
index b710fe1..82d7194 100644
--- a/compositor/drmdisplaycomposition.cpp
+++ b/compositor/drmdisplaycomposition.cpp
@@ -17,20 +17,18 @@
 #define LOG_TAG "hwc-drm-display-composition"
 
 #include "drmdisplaycomposition.h"
-#include "drmcrtc.h"
-#include "drmdevice.h"
-#include "drmdisplaycompositor.h"
-#include "drmplane.h"
-#include "platform.h"
 
+#include <log/log.h>
 #include <stdlib.h>
+#include <sync/sync.h>
+#include <xf86drmMode.h>
 
 #include <algorithm>
 #include <unordered_set>
 
-#include <log/log.h>
-#include <sync/sync.h>
-#include <xf86drmMode.h>
+#include "drm/drmdevice.h"
+#include "drmdisplaycompositor.h"
+#include "platform/platform.h"
 
 namespace android {
 
diff --git a/compositor/drmdisplaycomposition.h b/compositor/drmdisplaycomposition.h
new file mode 100644
index 0000000..d8a668c
--- /dev/null
+++ b/compositor/drmdisplaycomposition.h
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_DRM_DISPLAY_COMPOSITION_H_
+#define ANDROID_DRM_DISPLAY_COMPOSITION_H_
+
+#include <hardware/hardware.h>
+#include <hardware/hwcomposer.h>
+
+#include <sstream>
+#include <vector>
+
+#include "drm/drmcrtc.h"
+#include "drm/drmplane.h"
+#include "drmhwcomposer.h"
+
+namespace android {
+
+class Importer;
+class Planner;
+class SquashState;
+
+enum DrmCompositionType {
+  DRM_COMPOSITION_TYPE_EMPTY,
+  DRM_COMPOSITION_TYPE_FRAME,
+  DRM_COMPOSITION_TYPE_DPMS,
+  DRM_COMPOSITION_TYPE_MODESET,
+};
+
+struct DrmCompositionDisplayLayersMap {
+  int display;
+  bool geometry_changed = true;
+  std::vector<DrmHwcLayer> layers;
+
+  DrmCompositionDisplayLayersMap() = default;
+  DrmCompositionDisplayLayersMap(DrmCompositionDisplayLayersMap &&rhs) =
+      default;
+};
+
+struct DrmCompositionRegion {
+  std::vector<size_t> source_layers;
+};
+
+class DrmCompositionPlane {
+ public:
+  enum class Type : int32_t {
+    kDisable,
+    kLayer,
+  };
+
+  DrmCompositionPlane() = default;
+  DrmCompositionPlane(DrmCompositionPlane &&rhs) = default;
+  DrmCompositionPlane &operator=(DrmCompositionPlane &&other) = default;
+  DrmCompositionPlane(Type type, DrmPlane *plane, DrmCrtc *crtc)
+      : type_(type), plane_(plane), crtc_(crtc) {
+  }
+  DrmCompositionPlane(Type type, DrmPlane *plane, DrmCrtc *crtc,
+                      size_t source_layer)
+      : type_(type),
+        plane_(plane),
+        crtc_(crtc),
+        source_layers_(1, source_layer) {
+  }
+
+  Type type() const {
+    return type_;
+  }
+
+  DrmPlane *plane() const {
+    return plane_;
+  }
+  void set_plane(DrmPlane *plane) {
+    plane_ = plane;
+  }
+
+  DrmCrtc *crtc() const {
+    return crtc_;
+  }
+
+  std::vector<size_t> &source_layers() {
+    return source_layers_;
+  }
+
+  const std::vector<size_t> &source_layers() const {
+    return source_layers_;
+  }
+
+ private:
+  Type type_ = Type::kDisable;
+  DrmPlane *plane_ = NULL;
+  DrmCrtc *crtc_ = NULL;
+  std::vector<size_t> source_layers_;
+};
+
+class DrmDisplayComposition {
+ public:
+  DrmDisplayComposition() = default;
+  DrmDisplayComposition(const DrmDisplayComposition &) = delete;
+  ~DrmDisplayComposition();
+
+  int Init(DrmDevice *drm, DrmCrtc *crtc, Importer *importer, Planner *planner,
+           uint64_t frame_no);
+
+  int SetLayers(DrmHwcLayer *layers, size_t num_layers, bool geometry_changed);
+  int AddPlaneComposition(DrmCompositionPlane plane);
+  int AddPlaneDisable(DrmPlane *plane);
+  int SetDpmsMode(uint32_t dpms_mode);
+  int SetDisplayMode(const DrmMode &display_mode);
+
+  int Plan(std::vector<DrmPlane *> *primary_planes,
+           std::vector<DrmPlane *> *overlay_planes);
+
+  std::vector<DrmHwcLayer> &layers() {
+    return layers_;
+  }
+
+  std::vector<DrmCompositionPlane> &composition_planes() {
+    return composition_planes_;
+  }
+
+  bool geometry_changed() const {
+    return geometry_changed_;
+  }
+
+  uint64_t frame_no() const {
+    return frame_no_;
+  }
+
+  DrmCompositionType type() const {
+    return type_;
+  }
+
+  uint32_t dpms_mode() const {
+    return dpms_mode_;
+  }
+
+  const DrmMode &display_mode() const {
+    return display_mode_;
+  }
+
+  DrmCrtc *crtc() const {
+    return crtc_;
+  }
+
+  Importer *importer() const {
+    return importer_;
+  }
+
+  Planner *planner() const {
+    return planner_;
+  }
+
+  int take_out_fence() {
+    return out_fence_.Release();
+  }
+
+  void set_out_fence(int out_fence) {
+    out_fence_.Set(out_fence);
+  }
+
+  void Dump(std::ostringstream *out) const;
+
+ private:
+  bool validate_composition_type(DrmCompositionType desired);
+
+  DrmDevice *drm_ = NULL;
+  DrmCrtc *crtc_ = NULL;
+  Importer *importer_ = NULL;
+  Planner *planner_ = NULL;
+
+  DrmCompositionType type_ = DRM_COMPOSITION_TYPE_EMPTY;
+  uint32_t dpms_mode_ = DRM_MODE_DPMS_ON;
+  DrmMode display_mode_;
+
+  UniqueFd out_fence_ = -1;
+
+  bool geometry_changed_;
+  std::vector<DrmHwcLayer> layers_;
+  std::vector<DrmCompositionPlane> composition_planes_;
+
+  uint64_t frame_no_ = 0;
+};
+}  // namespace android
+
+#endif  // ANDROID_DRM_DISPLAY_COMPOSITION_H_
diff --git a/compositor/drmdisplaycompositor.cpp b/compositor/drmdisplaycompositor.cpp
index 1519736..aed090a 100644
--- a/compositor/drmdisplaycompositor.cpp
+++ b/compositor/drmdisplaycompositor.cpp
@@ -19,23 +19,23 @@
 
 #include "drmdisplaycompositor.h"
 
+#include <drm/drm_mode.h>
+#include <log/log.h>
 #include <pthread.h>
 #include <sched.h>
 #include <stdlib.h>
+#include <sync/sync.h>
 #include <time.h>
+#include <utils/Trace.h>
+
 #include <array>
 #include <sstream>
 #include <vector>
 
-#include <drm/drm_mode.h>
-#include <log/log.h>
-#include <sync/sync.h>
-#include <utils/Trace.h>
-
-#include "autolock.h"
-#include "drmcrtc.h"
-#include "drmdevice.h"
-#include "drmplane.h"
+#include "drm/drmcrtc.h"
+#include "drm/drmdevice.h"
+#include "drm/drmplane.h"
+#include "utils/autolock.h"
 
 static const uint32_t kWaitWritebackFence = 100;  // ms
 
diff --git a/compositor/drmdisplaycompositor.h b/compositor/drmdisplaycompositor.h
new file mode 100644
index 0000000..62dd04e
--- /dev/null
+++ b/compositor/drmdisplaycompositor.h
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_DRM_DISPLAY_COMPOSITOR_H_
+#define ANDROID_DRM_DISPLAY_COMPOSITOR_H_
+
+#include <hardware/hardware.h>
+#include <hardware/hwcomposer.h>
+#include <pthread.h>
+
+#include <memory>
+#include <sstream>
+#include <tuple>
+
+#include "drm/resourcemanager.h"
+#include "drm/vsyncworker.h"
+#include "drmdisplaycomposition.h"
+#include "drmframebuffer.h"
+#include "drmhwcomposer.h"
+
+// One for the front, one for the back, and one for cases where we need to
+// squash a frame that the hw can't display with hw overlays.
+#define DRM_DISPLAY_BUFFERS 3
+
+// If a scene is still for this number of vblanks flatten it to reduce power
+// consumption.
+#define FLATTEN_COUNTDOWN_INIT 60
+
+namespace android {
+
+enum class FlatteningState {
+  kNone,
+  kNotNeeded,
+  kClientRequested,
+  kClientDone,
+  kSerial,
+  kConcurrent
+};
+
+std::ostream &operator<<(std::ostream &str, FlatteningState state);
+
+class DrmDisplayCompositor {
+ public:
+  DrmDisplayCompositor();
+  ~DrmDisplayCompositor();
+
+  int Init(ResourceManager *resource_manager, int display);
+
+  template <typename Fn>
+  void SetRefreshCallback(Fn &&refresh_cb) {
+    refresh_display_cb_ = std::forward<Fn>(refresh_cb);
+  }
+
+  std::unique_ptr<DrmDisplayComposition> CreateComposition() const;
+  std::unique_ptr<DrmDisplayComposition> CreateInitializedComposition() const;
+  int ApplyComposition(std::unique_ptr<DrmDisplayComposition> composition);
+  int TestComposition(DrmDisplayComposition *composition);
+  int Composite();
+  void Dump(std::ostringstream *out) const;
+  void Vsync(int display, int64_t timestamp);
+  void ClearDisplay();
+  int TakeOutFence() {
+    if (!active_composition_)
+      return -1;
+    return active_composition_->take_out_fence();
+  }
+
+  FlatteningState GetFlatteningState() const;
+  uint32_t GetFlattenedFramesCount() const;
+  bool ShouldFlattenOnClient() const;
+
+  std::tuple<uint32_t, uint32_t, int> GetActiveModeResolution();
+
+ private:
+  struct ModeState {
+    bool needs_modeset = false;
+    DrmMode mode;
+    uint32_t blob_id = 0;
+    uint32_t old_blob_id = 0;
+  };
+
+  DrmDisplayCompositor(const DrmDisplayCompositor &) = delete;
+
+  // We'll wait for acquire fences to fire for kAcquireWaitTimeoutMs,
+  // kAcquireWaitTries times, logging a warning in between.
+  static const int kAcquireWaitTries = 5;
+  static const int kAcquireWaitTimeoutMs = 100;
+
+  int CommitFrame(DrmDisplayComposition *display_comp, bool test_only,
+                  DrmConnector *writeback_conn = NULL,
+                  DrmHwcBuffer *writeback_buffer = NULL);
+  int SetupWritebackCommit(drmModeAtomicReqPtr pset, uint32_t crtc_id,
+                           DrmConnector *writeback_conn,
+                           DrmHwcBuffer *writeback_buffer);
+  int ApplyDpms(DrmDisplayComposition *display_comp);
+  int DisablePlanes(DrmDisplayComposition *display_comp);
+
+  void ApplyFrame(std::unique_ptr<DrmDisplayComposition> composition,
+                  int status, bool writeback = false);
+
+  void SetFlattening(FlatteningState new_state);
+  bool IsFlatteningNeeded() const;
+  int FlattenActiveComposition();
+  int FlattenOnClient();
+  int FlattenSerial(DrmConnector *writeback_conn);
+  int FlattenConcurrent(DrmConnector *writeback_conn);
+  int FlattenOnDisplay(std::unique_ptr<DrmDisplayComposition> &src,
+                       DrmConnector *writeback_conn, DrmMode &src_mode,
+                       DrmHwcLayer *writeback_layer);
+
+  bool CountdownExpired() const;
+
+  std::tuple<int, uint32_t> CreateModeBlob(const DrmMode &mode);
+
+  ResourceManager *resource_manager_;
+  int display_;
+
+  std::unique_ptr<DrmDisplayComposition> active_composition_;
+
+  bool initialized_;
+  bool active_;
+  bool use_hw_overlays_;
+
+  ModeState mode_;
+
+  int framebuffer_index_;
+  DrmFramebuffer framebuffers_[DRM_DISPLAY_BUFFERS];
+
+  // mutable since we need to acquire in Dump()
+  mutable pthread_mutex_t lock_;
+
+  // State tracking progress since our last Dump(). These are mutable since
+  // we need to reset them on every Dump() call.
+  mutable uint64_t dump_frames_composited_;
+  mutable uint64_t dump_last_timestamp_ns_;
+  VSyncWorker vsync_worker_;
+  int64_t flatten_countdown_;
+  std::unique_ptr<Planner> planner_;
+  int writeback_fence_;
+
+  FlatteningState flattening_state_;
+  uint32_t frames_flattened_;
+
+  std::function<void(int)> refresh_display_cb_;
+};
+}  // namespace android
+
+#endif  // ANDROID_DRM_DISPLAY_COMPOSITOR_H_
