Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5000892img; Tue, 26 Mar 2019 23:23:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRKviTcMVsoU65y3bO+3K+Yx6GBa0HiPlTqu5bv0jcGfFh+kRQolmsH4WVTxfeGbHc+uxI X-Received: by 2002:a65:4bce:: with SMTP id p14mr33297662pgr.68.1553667787669; Tue, 26 Mar 2019 23:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553667787; cv=none; d=google.com; s=arc-20160816; b=KijiTFPDf/JeZP7j59tW5L5Kntncf04zmqbvK+VggFFuNZ40sYlw+a3HRAYl/GuSFY WURrT/3JCNcVMTC1+1E6NS3xjA4IKuldPBH9M7bHPupmJFOkP9CEY8ZTTquoxpvFrZgx L8ZYNPvU4oQbttRhR3IKloTMBuA0HF1vhQewXq/l5VqA8o0poawzPAUU3YdjSI650d8V Uovz76309bbvPGYi7HnkedQSY5PcApkC28Zl0IflDrxoy2ly6lEkiMXzBoydUqxGLnUU 2bSLE4xLz13is1pN3qeh3C0caT+DIi7M7blY55fAUllpLbNq57sTVQLgwvr2y3MG77k9 h9IQ== 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=5/aZ+nBPWqHyW1CSCqTQP4kSGHzZPYTqHDosS+4JpV8=; b=ImT1PFj7kHfGfVf4vuzFMQMBz9EYLjmk+hZDlGNY6DYnZao9/R8L6G6HBY29ih1kaH FiPaxfRN9zeLx2C93cj7cutyjJQA4Cm1Uz/AaBtsEjdE8VrEdNUsgzRkx8Kdlt3jOuZq IQ8j1hvyGhj1B1eJbx2bpg9OTgOi4Dm37H7o54yHrmgro0iqbpVMkrttKt+rEITV/YJ1 oRjQV2s8tyT1jPffuDA3IqUGOpzryCoAQ4WdDlwsPI/M6FHWV2tLlmfyRwngHcIk7nvj QPheAWdh3bJOuiCWwUU8D52pk99WtiVdZJBu29udxrxLUXBhnFBpsCKWv9t0dCHFyCT+ XyOQ== 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 m2si6636799pgp.463.2019.03.26.23.22.52; Tue, 26 Mar 2019 23:23:07 -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 S2387638AbfC0GUh (ORCPT + 99 others); Wed, 27 Mar 2019 02:20:37 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:27443 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387502AbfC0GUC (ORCPT ); Wed, 27 Mar 2019 02:20:02 -0400 X-UUID: 01f4001dc321445d9d54049e5c79c3e6-20190327 X-UUID: 01f4001dc321445d9d54049e5c79c3e6-20190327 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1555085926; Wed, 27 Mar 2019 14:19:55 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 27 Mar 2019 14:19:53 +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:52 +0800 From: To: , , , CC: , , , , , , , , , Yongqiang Niu Subject: [PATCH v2 19/25] drm/mediatek: add function mtk_ddp_comp_get_type Date: Wed, 27 Mar 2019 14:19:15 +0800 Message-ID: <1553667561-25447-20-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-TM-SNTS-SMTP: 9D958F785A31F336DBD18C01EA560D5FF6BE742892CD9009E35CBD23027FE8102000:8 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 mtk_ddp_comp_get_type Signed-off-by: Yongqiang Niu --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 8 ++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c index 72288b4..193cdb7a 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c @@ -338,6 +338,14 @@ int mtk_ddp_comp_get_id(struct device_node *node, return -EINVAL; } +enum mtk_ddp_comp_type mtk_ddp_comp_get_type(enum mtk_ddp_comp_id comp_id) +{ + if (comp_id < DDP_COMPONENT_ID_MAX) + return mtk_ddp_matches[comp_id].type; + + return MTK_DDP_COMP_TYPE_MAX; +} + int mtk_ddp_comp_init(struct device *dev, struct device_node *node, struct mtk_ddp_comp *comp, enum mtk_ddp_comp_id comp_id, const struct mtk_ddp_comp_funcs *funcs) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h index ed715ff..6bf46d1 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h @@ -202,5 +202,6 @@ void mtk_ddp_write_mask(unsigned int value, struct mtk_ddp_comp *comp, unsigned int offset, unsigned int mask); +enum mtk_ddp_comp_type mtk_ddp_comp_get_type(enum mtk_ddp_comp_id comp_id); #endif /* MTK_DRM_DDP_COMP_H */ -- 1.8.1.1.dirty