From patchwork Thu Feb 14 19:32:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10813627 Return-Path: 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 400C813A4 for ; Thu, 14 Feb 2019 19:33:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 278572EF29 for ; Thu, 14 Feb 2019 19:33:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1985C2EF33; Thu, 14 Feb 2019 19:33:01 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C33702EF2C for ; Thu, 14 Feb 2019 19:33:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9378A6EAAA; Thu, 14 Feb 2019 19:32:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6CC856EAB3 for ; Thu, 14 Feb 2019 19:32:58 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id 101so3663625pld.6 for ; Thu, 14 Feb 2019 11:32:58 -0800 (PST) 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=9m6ReoBLBZFOeMQ09Fo4ZfosvrNH9XVGYhAEmEbH5dY=; b=k27L/a6dLIUL1hwZHdHYClQ1qlTmIS3D/ZLXkL22F7eXQyDpPvHwn+MXiJRVPfoaPd Ocks76jJy4hUfFJu7BUCGQ+UyISF2p2h6K2yK/qGeu+CXCx5KTOpRl2E9jSoZH4UMhMW l4gm1AwVlm+mfVceKQomArl0pgLCpcDbcBjEQGmFtpygv9F5wSfalx4dVoLfjcpDBQ0/ caodzqHOd8tcKphB2gUaYPnT5z0ePq6UbEbY2Uj6eTgLfD6apzKeFwWal5yMsRJPxtKi 4AEmDBL0iMYVWOzl43XRhgI4JpHRREOcdwYEbbpwwBghs5b8gQklJinbroUtZpZtKQbp XG4Q== X-Gm-Message-State: AHQUAubqOWa99yma5Obq3d5wTXfeeuhNjU4VFs1g3weX7QBefj5VSBQ7 O8hhbwzNp5xjA5SieHF/E/FFag== X-Google-Smtp-Source: AHgI3IapVc576RPyNQeLXBiOhwHc8LrJB3pQYJLbmAl68gLhk5RNwUKAtczEDY1JZy+5na4RFvDE4w== X-Received: by 2002:a17:902:2ba8:: with SMTP id l37mr5888652plb.243.1550172778007; Thu, 14 Feb 2019 11:32:58 -0800 (PST) Received: from localhost.localdomain ([115.97.184.151]) by smtp.gmail.com with ESMTPSA id o23sm10808832pfa.140.2019.02.14.11.32.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 11:32:57 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai Subject: [PATCH v8 02/10] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Date: Fri, 15 Feb 2019 01:02:29 +0530 Message-Id: <20190214193236.7504-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190214193236.7504-1-jagan@amarulasolutions.com> References: <20190214193236.7504-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-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=9m6ReoBLBZFOeMQ09Fo4ZfosvrNH9XVGYhAEmEbH5dY=; b=OeoCqo+1i6jzEn5S5XDmRKxrzslqlqYs/BvduK85Glf5ZV1W2o23Sx7cdG38olCj7e hdkC78PBImdtCLjMwJS+HAmt0f9+vy/Xu9y6Hx44az+uv6BqY4ycKa2Y6P2KOMJPlB+0 /TwNNnv5NyIJsMfZCaKrAJGzu0pZ2Bx3MEdiU= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jagan Teki , Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Instruction loop selection would require before writing loop number registers, so enable idle, LP11 bits on loop selection register. Reference code available in BSP (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) (dsi_dev[sel]->dsi_inst_loop_sel.dwval = 2<<(4*DSI_INST_ID_LP11) | 3<<(4*DSI_INST_ID_DLY); Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 8184fbcfd9fd..1a0707468121 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -421,6 +421,9 @@ static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, { u16 delay = sun6i_dsi_setup_inst_delay(dsi, mode); + regmap_write(dsi->regs, SUN6I_DSI_INST_LOOP_SEL_REG, + DSI_INST_ID_HSC << (4 * DSI_INST_ID_LP11) | + DSI_INST_ID_HSD << (4 * DSI_INST_ID_DLY)); regmap_write(dsi->regs, SUN6I_DSI_INST_LOOP_NUM_REG(0), SUN6I_DSI_INST_LOOP_NUM_N0(50 - 1) | SUN6I_DSI_INST_LOOP_NUM_N1(delay));