display: Add support orientation control on ext display
- The required orientation on External can be set using the
properyt sys.ext_orientation.
- Values can be HAL_TRANSFORM_ROT_90, HAL_TRANSFORM_ROT_270
- According to the value set, the FB_TARGET for External will
be rotated and positioned as per aspect ratio on Ext
- For YUV(video layer) it just calculates the position, as the
rotation should be the source orientation
- This feature is supported only for low resolution panel.
Change-Id: I3d532ee0cb8dca3c37869537b55cd8044fd9047e
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 0e603ce..ab645bc 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -133,6 +133,10 @@
void getActionSafePosition(hwc_context_t *ctx, int dpy, uint32_t& x,
uint32_t& y, uint32_t& w, uint32_t& h);
+
+void getAspectRatioPosition(hwc_context_t *ctx, int dpy, int orientation,
+ uint32_t& x, uint32_t& y, uint32_t& w, uint32_t& h);
+
//Close acquireFenceFds of all layers of incoming list
void closeAcquireFds(hwc_display_contents_1_t* list);
@@ -149,6 +153,20 @@
ovutils::eMdpFlags &mdpFlags,
int rotDownscale = 0);
+int configRotator(overlay::Rotator *rot, const ovutils::Whf& whf,
+ const hwc_rect_t& crop, const ovutils::eMdpFlags& mdpFlags,
+ const ovutils::eTransform& orient, const int& downscale);
+
+int configMdp(overlay::Overlay *ov, const ovutils::PipeArgs& parg,
+ const ovutils::eTransform& orient, const hwc_rect_t& crop,
+ const hwc_rect_t& pos, const MetaData_t *metadata,
+ const ovutils::eDest& dest);
+
+void updateSource(ovutils::eTransform& orient, ovutils::Whf& whf,
+ hwc_rect_t& crop);
+
+
+
//Routine to configure low resolution panels (<= 2048 width)
int configureLowRes(hwc_context_t *ctx, hwc_layer_1_t *layer, const int& dpy,
ovutils::eMdpFlags& mdpFlags, const ovutils::eZorder& z,
@@ -276,6 +294,8 @@
struct vsync_state vstate;
//Drawing round when we use GPU
bool isPaddingRound;
+ // External Orientation
+ int mExtOrientation;
};
namespace qhwc {