Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp261537ybh; Wed, 11 Mar 2020 00:20:36 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvKT9pyolzzWj6mLs3fA/cHNNgN42HWOnucWmX+cwkNHUrWz4DZMz0gMDJyE7z++W/WMKXK X-Received: by 2002:aca:3386:: with SMTP id z128mr600543oiz.40.1583911236424; Wed, 11 Mar 2020 00:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583911236; cv=none; d=google.com; s=arc-20160816; b=pQbhq438yFzcj7EyS5QuQ0xTIyK7mpnc96zgcvLSDHUXKrbzulKexpnAwVyxzxyo2N SfL8yynK186386sqp0Ve7Q/lQp0DsgzB4DJ9vpN0NmZfb0e42Hzyj4wk1Famv/jDnVdT IhzxJdq8YiuuyCHwml5aAyBwE+pC0uDJQ/sa7OZMyK6X8XvFucfYbE0Rww1p0vhUGmQy 5a1EmmgzNnxhcWRxQfBnl+q3L+Ct+KCU6Ht/U4itmSgyg/xNav4HE60hl699WaC0ehpM tYVOe0blIQSt/NMjnaT2Yc/Dnu0S/kCtLRZX5ImoYC7/Z9+oJ83nMVOvDXPUfV35/P9J lrww== 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=9JBTj+vrzKP+Q6L5ukHhTC+DxupJsI7Gf1gGQQIuWJk=; b=NUX5TN12V+/9CagJJcCa45bzlcKLsCrc1VLST5fDrahRsZqsorysu+MusIRWzGsy8e LY6QeGZ4Yi5N91JHMqTSVII/upsUiaf1PAnQx8dKYK2JoK+wxDkBdaBpQm2RusaanDuV kvSiEh8E8RHN+0Q9sFHMzoLeuNVFVa0BEel5UOqGuGGsj2sHwOAhZBMYJ/o0uvasE3Mf CEdhhyMqIT/nUTtg/or9TyePdnc00N+IeEujdua+LL9fBjHVcrt+s2ag3nWqpRZef4nD Bt/Fa28Gj2jFC5A/xRmZJ+NJSnVK7G3eDeUM3KGhFj3C2BRM4gCxwA4+wakY0qx/riV0 HEYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LECGlAek; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 127si515904oig.130.2020.03.11.00.20.24; Wed, 11 Mar 2020 00:20:36 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=LECGlAek; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728352AbgCKHTv (ORCPT + 99 others); Wed, 11 Mar 2020 03:19:51 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:44497 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726160AbgCKHTu (ORCPT ); Wed, 11 Mar 2020 03:19:50 -0400 X-UUID: c3ad8a71dd6e4b81af3c19b06804cdc5-20200311 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=9JBTj+vrzKP+Q6L5ukHhTC+DxupJsI7Gf1gGQQIuWJk=; b=LECGlAekGrmj9vK4FqEiDn3xXGc3ZpcBqIZoY3RX2B21vgXCJw0vYbqmPRXHP1y3N9ANYaS/GYWD3Rnx44dBZKmy2RQhCGrWOwhJqgeJBZdwD9KWW/+gsplXtjNUYrc5howKWSjk4PZniYwxVSRPJe0d+71xHsSV1kLEuXJ9n+M=; X-UUID: c3ad8a71dd6e4b81af3c19b06804cdc5-20200311 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1331942434; Wed, 11 Mar 2020 15:18:46 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 11 Mar 2020 15:14:30 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (10.16.6.18) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 11 Mar 2020 15:18:11 +0800 From: Jitao Shi To: Rob Herring , Mark Rutland , Matthias Brugger , Daniel Vetter , David Airlie , , CC: , , , , , , , , , , , Jitao Shi Subject: [PATCH v13 5/6] drm/mediatek: dpi sample mode support Date: Wed, 11 Mar 2020 15:18:22 +0800 Message-ID: <20200311071823.117899-6-jitao.shi@mediatek.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200311071823.117899-1-jitao.shi@mediatek.com> References: <20200311071823.117899-1-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: CEF2DB693517EEF1C396A846C8B59F9FFC734174A6225D38E0F4AC176537DA292000:8 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 RFBJIGNhbiBzYW1wbGUgb24gZmFsbGluZywgcmlzaW5nIG9yIGJvdGggZWRnZS4NCldoZW4gRFBJ IHNhbXBsZSB0aGUgZGF0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