Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5697786yba; Thu, 11 Apr 2019 03:58:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJBCouF4bFFZ+JvRTFqiEAsN6q+AJtjcb5ODUW7MN+/6jOMbUuAoS7G89ZsA7uXpiI1CaK X-Received: by 2002:a62:174c:: with SMTP id 73mr49271557pfx.33.1554980325996; Thu, 11 Apr 2019 03:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554980325; cv=none; d=google.com; s=arc-20160816; b=jPrMRcsWiYdRL6Zb/Pu99KVmj+Vw7WMOCRllIl0pFPCGtd6HUBvAoVICYsvmcWlfD3 p73YTk6a0qM6VJw4aCftccSLPOq6SKPlpkmhgYnAQnXgCLnQpzLvsvSAavO/nljVPY2z lFXa96TIOzb57/XcAPpr6MDJLJxV609C5H48Dbn5QvvCmG98pO7vBH3xyY2Q8UZ0pV1c C1PEVfO5TGk0Mm/Zh+b1AWv3njApKEFLFM2KjUgUWkDMFjl+6/lXawLMVaG5FE/9SMwo g+4hGKhUgUWjy4NDEAee5CicqWgxnVSBocWgBkTKuANVI5lqdNd8mQCf3Z/HyCKae7Nf VTDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=sq6CTOAXPSFSyHDYWGsLl2PySEBX8xoXBi7CNqRPTPw=; b=y2e5LcmO5WUmLd4whoGPzC+/f4KuV97kSjiQa+yCCOIkG1DpQYYsqb3r8v/q7DnYju rge1qUh+ASUVDf5C9XoeG554YjPnlCdWADedVgS8YPN0zZVRoD9jpK08iBfY+L6NvBZB E49EEy8Xrz588+1d1u1gBY6qdEvV2hvaSYDrmzsgCCHN9jMaNsFyq92I17e9rAH+8wMx 3IO4kqgaGbagEHxIha8dEz2hzUBFik7uJ3zYvOGL3sLbzmLWoNWPEhnOiY0kip6d+2OF 9fc8lrmQTXqktqyfdWm5I1rCGkSEpv9n+h4Zyhvp8chhP8Y++VYcykvy8EIUllQAR+v8 z8Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si27275104pls.285.2019.04.11.03.58.30; Thu, 11 Apr 2019 03:58:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726812AbfDKK5T (ORCPT + 99 others); Thu, 11 Apr 2019 06:57:19 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:56463 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726215AbfDKK5T (ORCPT ); Thu, 11 Apr 2019 06:57:19 -0400 X-UUID: 474c8febed2d445b897e13ac48bd3950-20190411 X-UUID: 474c8febed2d445b897e13ac48bd3950-20190411 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1554356599; Thu, 11 Apr 2019 18:57:11 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 11 Apr 2019 18:57:09 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 11 Apr 2019 18:57:09 +0800 Message-ID: <1554980229.27008.4.camel@mtksdaap41> Subject: Re: [PATCH v2 14/25] drm/medaitek: add layer_nr for ovl private data From: CK Hu To: CC: , , , , , , , , , , , Date: Thu, 11 Apr 2019 18:57:09 +0800 In-Reply-To: <1553667561-25447-15-git-send-email-yongqiang.niu@mediatek.com> References: <1553667561-25447-1-git-send-email-yongqiang.niu@mediatek.com> <1553667561-25447-15-git-send-email-yongqiang.niu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: 4A29E8A5A2798424AD776A0006797D6F7DEB842A90BCB0FA8FF5EA40D0713D4C2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yongqiang: On Wed, 2019-03-27 at 14:19 +0800, yongqiang.niu@mediatek.com wrote: > From: Yongqiang Niu > > This patch add layer_nr for ovl private data > ovl_2l almost same with with ovl hardware, except the > layer number for ovl_2l is 2 and ovl is 4. > this patch is a preparation for ovl-2l and > ovl share the same driver. Reviewed-by: CK Hu > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > index afb313c..a0ab760 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > @@ -60,6 +60,7 @@ > struct mtk_disp_ovl_data { > unsigned int addr; > unsigned int gmc_bits; > + unsigned int layer_nr; > bool fmt_rgb565_is_0; > }; > > @@ -137,7 +138,9 @@ static void mtk_ovl_config(struct mtk_ddp_comp *comp, unsigned int w, > > static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp) > { > - return 4; > + struct mtk_disp_ovl *ovl = comp_to_ovl(comp); > + > + return ovl->data->layer_nr; > } > > static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx) > @@ -342,12 +345,14 @@ static int mtk_disp_ovl_remove(struct platform_device *pdev) > static const struct mtk_disp_ovl_data mt2701_ovl_driver_data = { > .addr = DISP_REG_OVL_ADDR_MT2701, > .gmc_bits = 8, > + .layer_nr = 4, > .fmt_rgb565_is_0 = false, > }; > > static const struct mtk_disp_ovl_data mt8173_ovl_driver_data = { > .addr = DISP_REG_OVL_ADDR_MT8173, > .gmc_bits = 8, > + .layer_nr = 4, > .fmt_rgb565_is_0 = true, > }; >