Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp327588imm; Thu, 2 Aug 2018 20:13:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdBp8uBj9U1jFMPLg9uZHhRoAgZRxebyRXYTo0OOw49nyUp1XIj9vlZUsS64UXJQbvX2zoH X-Received: by 2002:a63:ec43:: with SMTP id r3-v6mr1862623pgj.295.1533266026915; Thu, 02 Aug 2018 20:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533266026; cv=none; d=google.com; s=arc-20160816; b=ki3FPgQHiHqXGRwvPyQkHGWC9GZIKpAyEmBaGlJJkjFk3o0Bbi/PwYh0aOopPifPBQ 6BEH6HGtrW9eDndKXFRcjb7RNKdVxtGNAecDNqv8pEFHJP8xGoaSwtYp6gaoVPoxDLj2 WRUSxcfb4kwXk9XVjW0WbUl5AuImMV/hOYkmzYoc2dCl2nXbQ1NtWUELBD26xL5fNO3u GoW9yTdZ425CGfmlPeg+688QQAt32p/1ZU225NcnHARKJiblB1yj1MuEpHuba0wzbWFi zJneIYGAgKSxTtk0PdTZNVQmJHFuLuysFzsE8cLLxh/odxLBKPzaaiMMX1ZlP//2WZsi Uo5Q== 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:arc-authentication-results; bh=NuQFspZ3Mut3nRp/Qk/3h562EfnrK6q3xzZWXSCbpzw=; b=O2qdXi/PXfy1Ub0/J0k5AeDfR/W0T9g9X4OwxeJ01kVkh+0X7vNed7pdSYOHCleSgv e8GfQeyDcPnS+1/FLZ9M6is7vVFaV8nmnEOVD7p8h6fsK4GEHs1t3wUCsiCZe5am1O2F 9FTR5YmkXGWEnQ+EysdpLARaHG5Qx4SFHGrIMr8PhwNY8MiBpEVcrysxZdLdZqNVxCZL F6t1Skg65yAXoteeIk97PzOZNISjcrGpAe5h16EUAWWzvTgG2pLVD2U6dDmymLhR508X dx04Aas2RIYLaYF+k21gcctupdYvYH/ivpTV/ocapYNmG7FCcnKaPUFEqq4hQHazOPAz IBvQ== 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 c18-v6si3726517pgd.448.2018.08.02.20.13.32; Thu, 02 Aug 2018 20:13:46 -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 S1727616AbeHCFFh (ORCPT + 99 others); Fri, 3 Aug 2018 01:05:37 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:13583 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727182AbeHCFFg (ORCPT ); Fri, 3 Aug 2018 01:05:36 -0400 X-UUID: 06669314419a45fb854741bfd7f93bc9-20180803 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1511857809; Fri, 03 Aug 2018 11:11:14 +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.1210.3; Fri, 3 Aug 2018 11:11:13 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 3 Aug 2018 11:11:13 +0800 From: Stu Hsieh To: CK Hu , Philipp Zabel CC: David Airlie , Matthias Brugger , , , , , , Stu Hsieh Subject: [PATCH v2 10/15] drm/mediatek: add function to get layer number for component Date: Fri, 3 Aug 2018 11:11:03 +0800 Message-ID: <1533265868-28110-11-git-send-email-stu.hsieh@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1533265868-28110-1-git-send-email-stu.hsieh@mediatek.com> References: <1533265868-28110-1-git-send-email-stu.hsieh@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 This patch add function to get layer number for component Signed-off-by: Stu Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h index a1988ce15141..8377e4f9ce3d 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h @@ -78,6 +78,7 @@ struct mtk_ddp_comp_funcs { void (*stop)(struct mtk_ddp_comp *comp); void (*enable_vblank)(struct mtk_ddp_comp *comp, struct drm_crtc *crtc); void (*disable_vblank)(struct mtk_ddp_comp *comp); + unsigned int (*layer_nr)(struct mtk_ddp_comp *comp); void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx); void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx); void (*layer_config)(struct mtk_ddp_comp *comp, unsigned int idx, @@ -129,6 +130,12 @@ static inline void mtk_ddp_comp_disable_vblank(struct mtk_ddp_comp *comp) comp->funcs->disable_vblank(comp); } +static inline unsigned int mtk_ddp_comp_layer_nr(struct mtk_ddp_comp *comp) +{ + if (comp->funcs && comp->funcs->layer_nr) + return comp->funcs->layer_nr(comp); +} + static inline void mtk_ddp_comp_layer_on(struct mtk_ddp_comp *comp, unsigned int idx) { -- 2.12.5.2.gbdf23ab