Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1190173ybm; Sat, 30 May 2020 01:16:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysyqr0TsohtE0BNlOpoyKaXs6GKiZESK+/awxSyWjfq+zd93G3JqHo8NGOSgsj43CygahX X-Received: by 2002:a17:906:8556:: with SMTP id h22mr11688880ejy.535.1590826607857; Sat, 30 May 2020 01:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590826607; cv=none; d=google.com; s=arc-20160816; b=aKN9fWPlBt/UvbdvVmo1eqdTQpyQqBcXJ0dk8BUUgI1D4FhuaTy5SzfWPntb4+zuTP w9SVcxobpZPzrhJk7Sop/iZzEVuhgcJoRkbJubzYdcegc0cAUU9QDl1O0Y20RWKJnE4L A4fYQJS5lGZhNqE53/KJcPH3GHQzS6k4UPH7w9AztXz2jZrS8EAq0ePeRwoBpWDNBzDR MysxJo9f75tK+oC/a1V9RKMHvfw77xBEMmn9VIE+wOT1jgJnwQrK/XnJ/W2bFWNXgxi7 DYgiegeSgOlGko1bGySWDk3Xy9RLc9Z45Pt7FAj3uYMsTy8J/rKinwcw0BuXFk2RxwG9 CXaQ== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=bmH7fMDhBXTZkXnZCBeHpG/EY1LSFoVwd2Y4WvtFHEE=; b=ObgXqFtNaUsAReNalvnDsmwG9oJRkHsNDeoSeoo/q7hLnRvLAvqylYWnjtcS98gqF3 APZnLx75ghQllAV4F1nj2G2dXgAkp5wa7SIhdqs4dWLTROgtUmIzZ9fSSjH5iO4xP9Nv N3RpIUeKlu452Jpq6jChbCfO0TXXWzydfbJgwFSjxZP4rPKDSQeMZaiuXmdfc89E9ScM Z4bzUfIluso+Q+uRhGiliUAivIipzvJroXncPYkIgQfumRzAITN7e4t8L+57hoKGQa4e TN/ECgRGPtAMpTR0qqt8dADgCjXvXw3sd5x8KI/EBSOILRb8HBKB2EYoPY0+2n5LfVB8 T4gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FLdCfQzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i61si7377424edc.105.2020.05.30.01.16.25; Sat, 30 May 2020 01:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FLdCfQzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729004AbgE3IN7 (ORCPT + 99 others); Sat, 30 May 2020 04:13:59 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:44427 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725813AbgE3IN6 (ORCPT ); Sat, 30 May 2020 04:13:58 -0400 X-UUID: 2508e1b9253f4443a4af264eb39a7d90-20200530 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=bmH7fMDhBXTZkXnZCBeHpG/EY1LSFoVwd2Y4WvtFHEE=; b=FLdCfQzVXtrw2Y6J0TZ/aZsLRc9fBFVZhAV8lngS80f2J9AIvg4HhaABJEAhDSJ8GHtazDqP0h9EVDKWih4PoDYLxloMSYuwTADCnHVE07sqxUAP6X4B1R/FA3YRXK05La7LyKF3P6UqKYOz/YPiyqLfAkB5Too1XXXdNSzMb/w=; X-UUID: 2508e1b9253f4443a4af264eb39a7d90-20200530 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2058549102; Sat, 30 May 2020 16:13:53 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 30 May 2020 16:13:49 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 30 May 2020 16:13:49 +0800 From: Yong Wu To: Matthias Brugger , Joerg Roedel , Rob Herring CC: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , , Nicolas Boichat , Matthias Kaehlcke , , , , , , , Yongqiang Niu , CK Hu Subject: [PATCH v4 10/17] drm/mediatek: Add pm runtime support for ovl and rdma Date: Sat, 30 May 2020 16:10:11 +0800 Message-ID: <1590826218-23653-11-git-send-email-yong.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> References: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogWW9uZ3FpYW5nIE5pdSA8eW9uZ3FpYW5nLm5pdUBtZWRpYXRlay5jb20+DQoNCkRpc3Bs YXkgdXNlIHRoZSBkaXNwc3lzIGRldmljZSB0byBjYWxsIHBtX3J1bX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