Message ID | 20181103100900.30313-7-jagan@amarulasolutions.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F082814BD for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 3 Nov 2018 10:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D27712979A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 3 Nov 2018 10:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFBCF2ABF8; Sat, 3 Nov 2018 10:48:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FF312979A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 3 Nov 2018 10:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NxAbAGLMi8mhCoo8uMiyLYuNNEUFrU4gDyl/BhX4OCM=; b=HYGmIfgUDumtxB AQsdMPAwDV9RbI+HvPrPMf7gaWHm0YD17nOskjeguwzjGCr8CSv2zH2FlAb3E4ONWXkP5URLRnbFC AGyhm2DRs8ThJaIEI8uiCzuhpRRJag8BkldIjZeQlcWCTrMwJl1Ikou2wNbimLoBeSQmEqoM9KzeB /1vcZnZ+xKxVS/ca78uCd77a6Xjx9M1wb9yv8M1Jf9LDBcb5PEvqFupyTLPSI7F9XwRyuNNDa7wyi c7/QIl3G5dOtt+PfJEFReDIKVnN8pVokq2NaeQYeApzxfXk7LCto8vulqAu99Ls+I5T3upr79JGXp zvhbf4MUoOfI1ya5aYBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gItTh-0001Zc-A3; Sat, 03 Nov 2018 10:48:29 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gItTf-0001ZW-Cj for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:48:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XQSE4iVIjSLPAOzYcXE68LFT+STvGBf+GZnuz/7y4Xw=; b=0G+0+VB18XxKxnKoRdhHGUzrWF y0CvHJLZZjZ+pgt7EXBBiMUg8ex/IvweN61QtWxr+iAaRPCWnh0YBVocurBGJLTYir2LCXi1Dj1Ko l75Bgc69jtDM1msXUS5hBMbZMEMREoA9I9W1mfFZ0AnsowxEmNNl65Z8qaAjXLp50kHpT73JHiPfj F7Y6iVIima0MRE6h4iBJN1qRXNOXYfL3zZ9YCU0htSRUbw2Dl036cllT83TmTyZZcfLeMC7ngq7sM wa1IbNGgKzWXqSEwc8Gpzjw+53BMk1SUIH61cCe5oQYJmb1xj5ry7CtD0pIfHQyHAzlG9wvyqO9Cs coZa4vig==; Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssm-0008Q4-IN for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:22 +0000 Received: by mail-pf1-x442.google.com with SMTP id f78-v6so2168298pfe.1 for <linux-arm-kernel@lists.infradead.org>; Sat, 03 Nov 2018 03:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XQSE4iVIjSLPAOzYcXE68LFT+STvGBf+GZnuz/7y4Xw=; b=TOiwM0JMmbK7vtIijOmnwYjzx5D0EO0nsNkW20gDvVyOOCaIW5ZhYSXiZZYkjMvrYI Agu7/3Kc95wzAAnUQpz9Y0v9crxF/nSY4hBE2wxuYkgYCvxSHuasR8Zc2KEq6hgZFTBo 5J9ETI5UpaiEK0hDKxKP0ZAJlAQdk413N5A/M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XQSE4iVIjSLPAOzYcXE68LFT+STvGBf+GZnuz/7y4Xw=; b=CJSmJ739zdLRDj7ujMTgTiTw1Cd90Hxj3x4BOLJAjkahD0yzSyOnhFeNFwCPQJTyzq heSC7k1t34swJtV53Y9pPnmkAqsV4FfZBVItKiX4NIOmHS/n6/HcA4vt5/zJqBnAmZaz ZZfmDWAXwvIJDL00SK9zOMnqdfF6t51EgxcGgiclWwb9Di1uxbdCFDnU3ovRE9p9A6BW aDPpj1KBl72sI/rxLtvRH9BoJYVB1VQW1mUTU03N+rfIWbe8Pgy0CxcSVL93ujnX83rI OrtX7PK4K4Nr8/+20KF6jX06L8bHjCUE/LYlS2soLf5cxbXpJt8M5e0L2cmAZ/5XyUbn C+ow== X-Gm-Message-State: AGRZ1gLsjZT0h08F/Py4AJXSihHBcuoBKxmIG9zkantxeuklSjggRjcI IGwaJJdEWHl8ALlaRISR6paSdQ== X-Google-Smtp-Source: AJdET5cNgvDVUuusDs+G7JmDnvpBakvSWoLJPbtp4UZaeGzbvI4QqSOFKMxQqLsfpjQbsY3XHlx7Ug== X-Received: by 2002:a62:5d89:: with SMTP id n9-v6mr15519867pfj.54.1541239806197; Sat, 03 Nov 2018 03:10:06 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:10:05 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <maxime.ripard@bootlin.com>, Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>, Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>, Icenowy Zheng <icenowy@aosc.io>, Jernej Skrabec <jernej.skrabec@siol.net>, Vasily Khoruzhick <anarsoul@gmail.com>, Thierry Reding <thierry.reding@gmail.com>, Mark Rutland <mark.rutland@arm.com>, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michael Trimarchi <michael@amarulasolutions.com>, TL Lim <tllim@pine64.org>, linux-sunxi@googlegroups.com Subject: [PATCH 06/10] drm/sun4i: sun6i_mipi_dsi: Enable 2byte trail for 4-lane burst mode Date: Sat, 3 Nov 2018 15:38:56 +0530 Message-Id: <20181103100900.30313-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_061020_650265_E0151A7A X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Jagan Teki <jagan@amarulasolutions.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
drm/sun4i: Allwinner MIPI-DSI Burst mode support
|
expand
|
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index b18a01361f11..2d34e5f48d29 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -33,6 +33,8 @@ #define SUN6I_DSI_CTL_EN BIT(0) #define SUN6I_DSI_BASIC_CTL_REG 0x00c +#define SUN6I_DSI_BASIC_CTL_TRAIL_INV(n) (((n) & 0xf) << 4) +#define SUN6I_DSI_BASIC_CTL_TRAIL_FILL BIT(3) #define SUN6I_DSI_BASIC_CTL_HBP_DIS BIT(2) #define SUN6I_DSI_BASIC_CTL_HSA_HSE_DIS BIT(1) #define SUN6I_DSI_BASIC_CTL_VIDEO_BURST BIT(0) @@ -424,6 +426,10 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); val |= SUN6I_DSI_BASIC_CTL_VIDEO_BURST; + if (device->lanes == 4) { + val |= SUN6I_DSI_BASIC_CTL_TRAIL_INV(0xc); + val |= SUN6I_DSI_BASIC_CTL_TRAIL_FILL; + } regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); }
For 4-lane, burst mode panels would need to enable 2byte trail_fill along with filling trail_env in dsi base control register. Similar reference code avialable in BSP (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) if (panel->lcd_dsi_lane == 4) { dsi_dev[sel]->dsi_basic_ctl.bits.trail_inv = 0xc; dsi_dev[sel]->dsi_basic_ctl.bits.trail_fill = 1; } Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 6 ++++++ 1 file changed, 6 insertions(+)