Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2393512imu; Thu, 24 Jan 2019 12:01:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Zt3mykQpfrhHrl2f3DtoQrDMChb1yRBLjTwJmGr8ronbZreda70mOnStd6teReg5YLyOZ X-Received: by 2002:a65:584e:: with SMTP id s14mr7247353pgr.142.1548360066343; Thu, 24 Jan 2019 12:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548360066; cv=none; d=google.com; s=arc-20160816; b=FYeMkVu+8lln8vMc+/kWjnZdxZMHsGQKXqvCsKo+bZLHEBw6YD8G0kxUJWaQXwQn0Q UFg3TGrakgtuSGVqvKfQtvc9l/efwC2eZtGFb81/FTAGtFVMYaWWTYzq5AhkXwd2xyIZ nk3tNVYwJyKjhY08QyrdL2K5vsLY2bDI/fF9NFngcPRtIP9N37y4N+/pHvk+ssnxONNJ vrOP8lP8TjrNvMvfnpuxTTXFKKKK8eRVe8arl0SaJUHqc4RXdAnjMFYWVnAJY3qDh7t1 /YWRCY1uuPPhvPT7lWirOOXFkk903UmU9vJBbvvDxJJNpe9N6sXeTkInhCDvdyg496ia /MmA== 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=5Ak/RzbTyrrXIVZkdGtey2LIaf9k4mP2yZqsX+ON3ZQ=; b=vY91NoxXNzKI1TsvryiYi7XQ5e8RpoGHf93zGQcUBwaMEZWlJVG+Hj6D8jWW9pGCiL RWdTFlaRanO5t1OCmi/nkjRA+gzsrLckFrmNINBcKQli5Tu+e5ZuhTF5OxGLYCnjvJ4g qnQMhp40iITNMPr0klwskAahq7LRTPqWEn75zYM5W8JbqNxodxtr87UT2QPhZ294yG0m L/WeGA80MuMdooxF6ZEPLlxNC7paGVhNaWrBr4i6XSWGb31O3+NKTV1Pax9M+/mv29o+ arFO9qDWCMiBt2tW1h3x7oUtpdm0c7dFB7yZ40j6DPerdT/THC7fsxbCOv6+i0dMHsgY 1gkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=C2Q0VDKt; 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 62si1548671plc.87.2019.01.24.12.00.50; Thu, 24 Jan 2019 12:01:06 -0800 (PST) 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=@amarulasolutions.com header.s=google header.b=C2Q0VDKt; 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 S1731694AbfAXT7c (ORCPT + 99 others); Thu, 24 Jan 2019 14:59:32 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38791 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729731AbfAXT72 (ORCPT ); Thu, 24 Jan 2019 14:59:28 -0500 Received: by mail-pf1-f194.google.com with SMTP id q1so3528292pfi.5 for ; Thu, 24 Jan 2019 11:59:28 -0800 (PST) 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=5Ak/RzbTyrrXIVZkdGtey2LIaf9k4mP2yZqsX+ON3ZQ=; b=C2Q0VDKtacLIgo4Mjh++5QTJFI5flCR8BhPzFH1OJGMSW92ZiSnDvX6ObOTGi3Vh+5 7GdaDav2EZc4+yTV3gCBsh3xebpBRzpcSM0E8wH+xdfQ8F/juUgrG29Ve/3dL2UTWiXv bammi2n2cGE1VQH6vo0jsMBdrZlBe0lWufylk= 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=5Ak/RzbTyrrXIVZkdGtey2LIaf9k4mP2yZqsX+ON3ZQ=; b=b3kut2vEkSbuNVmnPo/zeq/SLhEDLMPHo7M52v4RsGFo/GDT5k1YctmAyIVbq86JXa MLjhy/+y0lTYhL+pR+e7iL3s7n8MjPf8VYa6HsUQHdJMcfbD5eg2eg2c6S2+PAejS1sG OgQmWZs9yOWOpwbdW5C3Y9XYSPTrNJFoUH561Q2SusHFK/8AlHyCV6+4zoyhSFF0Y34O KLUT2mdLbmFavGWg6u29gkZpFtlPGqeYYoQIs9XD49ZWF0TDfoCITkevQ1iqPtWhFylP x/WG/f5U896ftxNbtNcaiazEotap+EY/KYGNedPD3G5yrTqkpq0N2NSmyUn9uyqsbSMU 6N/w== X-Gm-Message-State: AJcUukegHIMQ48D7nTrxfmcrJSdeNXO3WoypgoKv07RVsGgdfPS9OY8y ikZSVKFY11OlQbC+eQV6/YK4tw== X-Received: by 2002:a63:1d1d:: with SMTP id d29mr7244592pgd.49.1548359967683; Thu, 24 Jan 2019 11:59:27 -0800 (PST) Received: from localhost.localdomain ([115.97.179.75]) by smtp.gmail.com with ESMTPSA id x11sm61637003pfe.72.2019.01.24.11.59.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 11:59:27 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v6 02/22] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Date: Fri, 25 Jan 2019 01:28:40 +0530 Message-Id: <20190124195900.22620-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190124195900.22620-1-jagan@amarulasolutions.com> References: <20190124195900.22620-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 a5fcee750bee..813d5523f1c7 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -403,6 +403,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)); -- 2.18.0.321.gffc6fa0e3