diff options
author | Rob Clark <robdclark@gmail.com> | 2014-09-03 12:14:01 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-09-03 12:34:30 -0400 |
commit | 9ef2e6e013191495315a6f7db1c04485cae31327 (patch) | |
tree | 1afaddd3acaa56496ac024666d7c9dfd63fea2de | |
parent | fe79420531a2f1e41c0b53e35c4b77fa1ab18754 (diff) |
server-fd fixes
Skip SetMaster/DropMaster for server-fd case, and add some hunks which
got missed the first time around.
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r-- | src/msm-driver.c | 20 | ||||
-rw-r--r-- | src/msm.h | 1 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/msm-driver.c b/src/msm-driver.c index 7778840..824eb17 100644 --- a/src/msm-driver.c +++ b/src/msm-driver.c @@ -225,6 +225,8 @@ MSMPreInit(ScrnInfoPtr pScrn, int flags) INFO_MSG("MSM/Qualcomm processor"); + pMsm->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); + if (!MSMInitDRM(pScrn)) { ERROR_MSG("Unable to open DRM"); return FALSE; @@ -531,7 +533,14 @@ MSMEnterVT(VT_FUNC_ARGS_DECL) DEBUG_MSG("enter-vt"); if (!pMsm->NoKMS) { - int ret = drmSetMaster(pMsm->drmFD); + int ret; +#ifdef XF86_PDEV_SERVER_FD + if (!(pMsm->pEnt->location.type == BUS_PLATFORM && + (pMsm->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))) + ret = 0; + else +#endif + ret = drmSetMaster(pMsm->drmFD); if (ret) ERROR_MSG("Unable to get master: %s", strerror(errno)); } @@ -556,7 +565,14 @@ MSMLeaveVT(VT_FUNC_ARGS_DECL) DEBUG_MSG("leave-vt"); if (!pMsm->NoKMS) { - int ret = drmDropMaster(pMsm->drmFD); + int ret; +#ifdef XF86_PDEV_SERVER_FD + if (!(pMsm->pEnt->location.type == BUS_PLATFORM && + (pMsm->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))) + ret = 0; + else +#endif + ret = drmDropMaster(pMsm->drmFD); if (ret) ERROR_MSG("Unable to drop master: %s", strerror(errno)); } @@ -111,6 +111,7 @@ typedef struct _MSMRec struct fd_bo *scanout; OptionInfoPtr options; + EntityInfoPtr pEnt; } MSMRec, *MSMPtr; struct msm_pixmap_priv { |