Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7192356ybi; Mon, 8 Jul 2019 16:35:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjaBuXEzNktsvrZKC3WopsqHg/bjYHACy6Qw5Y3vStjkhL1CApzOm6xls/Hpv480Mtc7JU X-Received: by 2002:a63:e356:: with SMTP id o22mr26919654pgj.150.1562628922495; Mon, 08 Jul 2019 16:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562628922; cv=none; d=google.com; s=arc-20160816; b=VlFHOma86+OjYmbTPgtckvFxSetwf53p1p6JGtL/s0ZL5l5YKmj/NLD49+yLwDlatM 6xfPsgh6vlJxZKLVYCvyd6IN9zjQ1caHNcrmnsjYWyQSBiRYrU/qxPfih0EtgfVFm/DZ /93XDD1heVOAPJdtkNnlhMw6kbc/MP+OX1fSU+k1DGr359+TNV28LN0g0ADkUAD5ccVa PWLeOFN6yq9NjmBAbx0O1eyLjnIOEfg7g9+/WyCTsU5RmRclC+pyJn/yGThIj6x3z+zh qFeQ9Krhs80ksNmwjKTmSFi+UHi6O3H5sTunC8a2pRvpMvhahiuQirzE1xEohSusFYpf kP9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=YjAgk/N4szgGVl5Rko0WhU2BVS7zL5fkoS1hJ95uxB8=; b=UpYiDtljpkWe8O5sWSPbGMGIkw9fQAiFVqHKzaI7bduXjqBvrjyOlgACHjJ/2KeONi AphdfHjl0FijJWboPpIwmtw9UzsckINIEuNVXvBDv3IQl8PhKm+nvDdBMzVrOFAjV8qG fjQx8uC8b6uTK9HqUxJDNqa7x7ql9BoTqfIjzLgCxO59fvCAlsEoAANXHOmONzVVyQ5H xqNCujz5EKirRAGCrvBYBsQpLotwX3MvzXmZ80FJD/VXWR3QKyjgx13vMGLfUDOJUKiW OP00Yp+nA0pzwCYAf1PCygQNilPnZ/VD1Ix8Fzm4VrinGNt6HRH+Y+LJYTUX2aHQWSoW LrsQ== 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 d139si18044612pfd.91.2019.07.08.16.35.07; Mon, 08 Jul 2019 16:35:22 -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 S1727731AbfGHWev (ORCPT + 99 others); Mon, 8 Jul 2019 18:34:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:34729 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727492AbfGHWeq (ORCPT ); Mon, 8 Jul 2019 18:34:46 -0400 X-UUID: e2f386e0c8fe413390c501b7a60e6df6-20190709 X-UUID: e2f386e0c8fe413390c501b7a60e6df6-20190709 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1873091533; Tue, 09 Jul 2019 06:34:40 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 9 Jul 2019 06:34:38 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 9 Jul 2019 06:34:38 +0800 From: To: CK Hu , Philipp Zabel , Rob Herring , Matthias Brugger CC: David Airlie , Daniel Vetter , Mark Rutland , , , , , , Yongqiang Niu Subject: [PATCH v4, 21/33] drm/mediatek: add function to background color input select for ovl/ovl_2l direct link Date: Tue, 9 Jul 2019 06:34:01 +0800 Message-ID: <1562625253-29254-22-git-send-email-yongqiang.niu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1562625253-29254-1-git-send-email-yongqiang.niu@mediatek.com> References: <1562625253-29254-1-git-send-email-yongqiang.niu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yongqiang Niu This patch add function to background color input select for ovl/ovl_2l direct link for ovl/ovl_2l direct link usecase, we need set background color input select for these hardware. this is preparation patch for ovl/ovl_2l usecase Signed-off-by: Yongqiang Niu --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h index a0ea8c9..ec6f329a 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h @@ -92,6 +92,8 @@ struct mtk_ddp_comp_funcs { struct mtk_plane_state *state); void (*gamma_set)(struct mtk_ddp_comp *comp, struct drm_crtc_state *state); + void (*bgclr_in_on)(struct mtk_ddp_comp *comp); + void (*bgclr_in_off)(struct mtk_ddp_comp *comp); }; struct mtk_ddp_comp { @@ -172,6 +174,18 @@ static inline void mtk_ddp_gamma_set(struct mtk_ddp_comp *comp, comp->funcs->gamma_set(comp, state); } +static inline void mtk_ddp_comp_bgclr_in_on(struct mtk_ddp_comp *comp) +{ + if (comp->funcs && comp->funcs->bgclr_in_on) + comp->funcs->bgclr_in_on(comp); +} + +static inline void mtk_ddp_comp_bgclr_in_off(struct mtk_ddp_comp *comp) +{ + if (comp->funcs && comp->funcs->bgclr_in_off) + comp->funcs->bgclr_in_off(comp); +} + int mtk_ddp_comp_get_id(struct device_node *node, enum mtk_ddp_comp_type comp_type); int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node, -- 1.8.1.1.dirty