summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLiu Ying <victor.liu@nxp.com>2017-07-24 10:48:29 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit5bb48b117da87c4b8bbc82c8db30753350ad1a59 (patch)
tree8640a90b13d9322b125731ba0d69bf9ea627944c /drivers/gpu
parent55704b314c4383ce8c5fea792a1d8b55e7c7b77d (diff)
MLK-16075-19 gpu: imx: dpu: common: Add fetchecos support in dpu plane group
This patch adds fetchecos support in dpu plane group. We currently supports fetcheco0 and fetcheco1. Signed-off-by: Liu Ying <victor.liu@nxp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/imx/dpu/dpu-common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/imx/dpu/dpu-common.c b/drivers/gpu/imx/dpu/dpu-common.c
index 5ab02e2cc393..15f14ef137df 100644
--- a/drivers/gpu/imx/dpu/dpu-common.c
+++ b/drivers/gpu/imx/dpu/dpu-common.c
@@ -866,6 +866,12 @@ static int dpu_get_plane_resource(struct dpu_soc *dpu,
if (IS_ERR(res->fd[i]))
return PTR_ERR(res->fd[i]);
}
+ for (i = 0; i < ARRAY_SIZE(res->fe); i++) {
+ res->fe[i] = dpu_fe_get(dpu, i);
+ if (IS_ERR(res->fe[i]))
+ return PTR_ERR(res->fe[i]);
+ grp->hw_plane_fetcheco_num = ARRAY_SIZE(res->fe);
+ }
/* HScaler could be shared with capture. */
if (display_plane_video_proc) {
for (i = 0; i < ARRAY_SIZE(res->hs); i++) {
@@ -912,6 +918,10 @@ static void dpu_put_plane_resource(struct dpu_plane_res *res)
if (!IS_ERR_OR_NULL(res->fd[i]))
dpu_fd_put(res->fd[i]);
}
+ for (i = 0; i < ARRAY_SIZE(res->fe); i++) {
+ if (!IS_ERR_OR_NULL(res->fe[i]))
+ dpu_fe_put(res->fe[i]);
+ }
for (i = 0; i < ARRAY_SIZE(res->hs); i++) {
if (!IS_ERR_OR_NULL(res->hs[i]))
dpu_hs_put(res->hs[i]);