Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5000404img; Tue, 26 Mar 2019 23:22:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqykOetCuOv79BNnL9ezu620sE+zZzDsie8M+ZRSRLPS6/chBMfPRMafp8N3Kaa9nlwYbe3f X-Received: by 2002:a65:538b:: with SMTP id x11mr32061154pgq.35.1553667741229; Tue, 26 Mar 2019 23:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553667741; cv=none; d=google.com; s=arc-20160816; b=pxY4z8n0muQqDi2P+V4anZrLKujcZliTUGlxU7Z4a3MUQ25J3sBXkh+qqNgI9sX9CP PMeDbjjttGYN6G5+IBNQVFa03ANoE8Pzzat/hSCZ05g44VuvPJEDBwzdNwnCliTuG7EY 9u3Opu5LHIqxFtN2cvQ/feeGZgkZQTWmekBHhKBPqsDr5Osr9cb57If3QhO10On/WCXR L04oFEdYac2FGgjw/goJJuGLSyp8d/25fTRk7CL7/cPsFYrJvu5MqxYstmAEzQAlQ52V c8ArqKcUg9Hr5WARiUQURMHDi8Y1yrqxV1M0olyZPle3BOLDdy56hElEbIwtc0BP8vb5 C+8g== 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=31BtKl2vgocs2pYdKwBlgYWOBd3dd+ZyG/hzO20HHkM=; b=DZJVBFTgozmqifdAn4zj2ZaTRcGQ8tIqvdj4gnFy6GruyZNrfKlcMNfRFSq8J9k7Xr wbyjCbJ8a+2upBVk1Ib0GnM0yqVVJCMXp1qGCjOx+5y/B6A3XXBsfYJOuKwXVA8o1KQF aQ6cTw01EeVNTrHkN3r/36NizXjF5cnUn/4ZE5F0SyLMRF4ET6BnBiaEkbWv5T/2VHA7 3iNYpBL0j/wp1h4a/7jyXeKK8+0lSmek/EdkTV808t+aUg6cw2BeiDxy7PBtBw/KcmQn Lm6g3eM02V7/ExQ5McSKmgGHTMJgKdMUIY1/qCEnQ1vnQqxzOIZepPASD/KNLr5jv0vw 70Ww== 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 l1si808244pff.206.2019.03.26.23.22.06; Tue, 26 Mar 2019 23:22:21 -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 S1733187AbfC0GVE (ORCPT + 99 others); Wed, 27 Mar 2019 02:21:04 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:6333 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387420AbfC0GT4 (ORCPT ); Wed, 27 Mar 2019 02:19:56 -0400 X-UUID: 0761d9e8d75e448992596da635175176-20190327 X-UUID: 0761d9e8d75e448992596da635175176-20190327 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1868873649; Wed, 27 Mar 2019 14:19:45 +0800 Received: from MTKMBS01DR.mediatek.inc (172.21.101.111) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 27 Mar 2019 14:19:43 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01dr.mediatek.inc (172.21.101.111) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 27 Mar 2019 14:19:43 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 27 Mar 2019 14:19:42 +0800 From: To: , , , CC: , , , , , , , , , Yongqiang Niu Subject: [PATCH v2 15/25] drm/mediatek: add function to background color input select for ovl/ovl_2l direct link Date: Wed, 27 Mar 2019 14:19:11 +0800 Message-ID: <1553667561-25447-16-git-send-email-yongqiang.niu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1553667561-25447-1-git-send-email-yongqiang.niu@mediatek.com> References: <1553667561-25447-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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h index b76b663..20e8061 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h @@ -92,6 +92,9 @@ 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, + enum mtk_ddp_comp_id prev); + void (*bgclr_in_off)(struct mtk_ddp_comp *comp); }; struct mtk_ddp_comp { @@ -173,6 +176,19 @@ 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, + enum mtk_ddp_comp_id prev) +{ + if (comp->funcs && comp->funcs->bgclr_in_on) + comp->funcs->bgclr_in_on(comp, prev); +} + +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