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