hwc: allow DMA pipe in BLOCK mode for virtual dpy
For portrait videos case on WFD, driver supports multiplexing of DMA pipe in LINE and BLOCK mode. Loosen the requirements to allow DMA pipe in block mode for portrait case of virtual display. Change-Id: I5821501f89b17bb2d29c425aee0a6c16b2a4783b
This commit is contained in:
@@ -1685,9 +1685,9 @@ bool canUseRotator(hwc_context_t *ctx, int dpy) {
|
||||
if(qdutils::MDPVersion::getInstance().is8x26() &&
|
||||
ctx->mVirtualDisplay->isConnected() &&
|
||||
!ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].isPause) {
|
||||
// Allow if YUV needs rotation and DMA is configured to BLOCK mode for
|
||||
// primary. For portrait videos usecase on WFD, Driver supports
|
||||
// multiplexing of DMA pipe in LINE and BLOCK mode.
|
||||
/* 8x26 mdss driver supports multiplexing of DMA pipe
|
||||
* in LINE and BLOCK modes for writeback panels.
|
||||
*/
|
||||
if(dpy == HWC_DISPLAY_PRIMARY)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ Overlay::Overlay() {
|
||||
|
||||
mDumpStr[0] = '\0';
|
||||
initScalar();
|
||||
setDMAMultiplexingSupported();
|
||||
}
|
||||
|
||||
Overlay::~Overlay() {
|
||||
@@ -117,8 +118,10 @@ eDest Overlay::nextPipe(eMdpPipeType type, int dpy, int mixer) {
|
||||
(mPipeBook[i].mMixer == MIXER_UNUSED || //Free or same mixer
|
||||
mPipeBook[i].mMixer == mixer) &&
|
||||
PipeBook::isNotAllocated(i) && //Free pipe
|
||||
( (sDMAMultiplexingSupported && dpy) ||
|
||||
!(sDMAMode == DMA_BLOCK_MODE && //DMA pipe in Line mode
|
||||
PipeBook::getPipeType((eDest)i) == OV_MDP_PIPE_DMA)) {
|
||||
PipeBook::getPipeType((eDest)i) == OV_MDP_PIPE_DMA)) ){
|
||||
//DMA-Multiplexing is only supported for WB on 8x26
|
||||
dest = (eDest)i;
|
||||
PipeBook::setAllocation(i);
|
||||
break;
|
||||
@@ -458,6 +461,7 @@ void Overlay::PipeBook::destroy() {
|
||||
Overlay* Overlay::sInstance = 0;
|
||||
int Overlay::sDpyFbMap[DPY_MAX] = {0, -1, -1};
|
||||
int Overlay::sDMAMode = DMA_LINE_MODE;
|
||||
bool Overlay::sDMAMultiplexingSupported = false;
|
||||
int Overlay::sForceSetBitmap = 0;
|
||||
int Overlay::PipeBook::NUM_PIPES = 0;
|
||||
int Overlay::PipeBook::sPipeUsageBitmap = 0;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#define OVERLAY_H
|
||||
|
||||
#include "overlayUtils.h"
|
||||
#include "mdp_version.h"
|
||||
#include "utils/threads.h"
|
||||
|
||||
struct MetaData_t;
|
||||
@@ -122,6 +123,7 @@ private:
|
||||
explicit Overlay();
|
||||
/*Validate index range, abort if invalid */
|
||||
void validate(int index);
|
||||
static void setDMAMultiplexingSupported();
|
||||
void dump() const;
|
||||
/* Creates a scalar object using libscale.so */
|
||||
static void initScalar();
|
||||
@@ -185,6 +187,7 @@ private:
|
||||
static Overlay *sInstance;
|
||||
static int sDpyFbMap[DPY_MAX];
|
||||
static int sDMAMode;
|
||||
static bool sDMAMultiplexingSupported;
|
||||
static int sForceSetBitmap;
|
||||
static void *sLibScaleHandle;
|
||||
static scale::Scale *sScale;
|
||||
@@ -247,6 +250,12 @@ inline void Overlay::setDMAMode(const int& mode) {
|
||||
sDMAMode = mode;
|
||||
}
|
||||
|
||||
inline void Overlay::setDMAMultiplexingSupported() {
|
||||
sDMAMultiplexingSupported = false;
|
||||
if(qdutils::MDPVersion::getInstance().is8x26())
|
||||
sDMAMultiplexingSupported = true;
|
||||
}
|
||||
|
||||
inline int Overlay::getDMAMode() {
|
||||
return sDMAMode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user