Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp480184ybi; Tue, 16 Jul 2019 23:57:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFTjb6/5e8YG2gJt2vkOv0a2JI8YpMonS95nChCuA6I19O4yPs+wKfmwgrcCenl0LzySkl X-Received: by 2002:a63:7e42:: with SMTP id o2mr38853828pgn.162.1563346638045; Tue, 16 Jul 2019 23:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563346638; cv=none; d=google.com; s=arc-20160816; b=CXjCzQLvhuFo0xMe2/0tE3yaXSTWm644QYkirB2jZeb1dxFZBCvPMmEequyCCJKzA8 6HUIAzzn9GI4TDEjWmQOuLYKfKTncl8NJGCFTHui9w250NLWql2qWyIsWPouvEO5zokK 1fqN5aYOmCaOM0JpYDHGKVZnDx0yxPvKb/l2nXHIB0JBqRXPNNsqyT8rOew56ZjxVlsw YjrCkhGly19gItZOkVKMXE3N6E0riZOwnxzUz1ALGX/3j+sl6wpW9l2YIdfWCYS9k8UN cmmDRu1Vo6Df0ay2CdPy9yCVId+NynadCiPThVsAEUbpjd87NrEEM1nY7S6dZlaBeUyJ Capw== 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=QXutbr63uzxbe95CCd6I5gJx2/ORmp4Lrlo90ptw+rw=; b=QuXVEytZtGH9iGefbpCh/EUSFJ9YQI5bxzIqBIKHwSNV/sja3J1anVrnaYuitv6+KT Ty7YUCnK5nJnyFiSoFijOK5hXrVxh6EFrfIiiGydwHXakRIYES6WcP1/zKH9KEPaFK70 cvJ/ET6A0N/RF+8XR7X5gtLEZrcQLnd/39w6HWSsM0kmeyG7Pehdu2FCZMkN81CwVHjH fqVBrpt89mvn1omi1VHQ94K3L7XPk6B5qOBmIIy37SnepSYO6/myVEReJ7PjSkfjoLAa 8AL7I24cL98NtGVmjkblcRFI2AXsLbPUCxp56S3mQV/GZWOsGc6I042Nti0HR1XR52Pr 82Cg== 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 z18si20312640pjt.94.2019.07.16.23.57.01; Tue, 16 Jul 2019 23:57:18 -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 S1727116AbfGQGzI (ORCPT + 99 others); Wed, 17 Jul 2019 02:55:08 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:59306 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727012AbfGQGzH (ORCPT ); Wed, 17 Jul 2019 02:55:07 -0400 X-UUID: 9f1c975c797c4aa99fc512c38799216e-20190717 X-UUID: 9f1c975c797c4aa99fc512c38799216e-20190717 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1132981241; Wed, 17 Jul 2019 14:55:03 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 17 Jul 2019 14:55:01 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 17 Jul 2019 14:55:01 +0800 Message-ID: <1563346501.29169.25.camel@mtksdaap41> Subject: Re: [PATCH v4, 24/33] drm/mediatek: distinguish ovl and ovl_2l by layer_nr From: CK Hu To: CC: Philipp Zabel , Rob Herring , Matthias Brugger , "David Airlie" , Daniel Vetter , Mark Rutland , , , , , Date: Wed, 17 Jul 2019 14:55:01 +0800 In-Reply-To: <1562625253-29254-25-git-send-email-yongqiang.niu@mediatek.com> References: <1562625253-29254-1-git-send-email-yongqiang.niu@mediatek.com> <1562625253-29254-25-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: 11F1DE6BD2C0561D80B2B9B084DC8B4CE48F7F7536BCB170DD002279A4AB79AD2000: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 Tue, 2019-07-09 at 06:34 +0800, yongqiang.niu@mediatek.com wrote: > From: Yongqiang Niu > > distinguish ovl and ovl_2l by layer_nr when get comp > id > Reviewed-by: CK Hu > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > index 8ca4965..7e99827 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > @@ -326,7 +326,12 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) > if (irq < 0) > return irq; > > - comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DISP_OVL); > + priv->data = of_device_get_match_data(dev); > + > + comp_id = mtk_ddp_comp_get_id(dev->of_node, > + priv->data->layer_nr == 4 ? > + MTK_DISP_OVL : > + MTK_DISP_OVL_2L); > if (comp_id < 0) { > dev_err(dev, "Failed to identify by alias: %d\n", comp_id); > return comp_id; > @@ -339,8 +344,6 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) > return ret; > } > > - priv->data = of_device_get_match_data(dev); > - > platform_set_drvdata(pdev, priv); > > ret = devm_request_irq(dev, irq, mtk_disp_ovl_irq_handler,