From patchwork Fri Nov 16 16:39:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10687495 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 7C69614E2 for ; Sat, 17 Nov 2018 14:56:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D1AE2B902 for ; Sat, 17 Nov 2018 14:56:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EE052B905; Sat, 17 Nov 2018 14:56:49 +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 1DD5E2B902 for ; Sat, 17 Nov 2018 14:56:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BCDA6E96E; Sat, 17 Nov 2018 14:56:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6FE586E7CC for ; Fri, 16 Nov 2018 16:39:53 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id v28so328725pgk.10 for ; Fri, 16 Nov 2018 08:39:53 -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=xfw1G45o1zFW41lhUipKSvIxM7Mirg3j/ORexArSSOI=; b=abWJMImCxhTJ1pou9AaWrYrkDhGGDOf3KT52nTS0uwZ4Cz/IXMOg2WD56rkzpfJ14n lqbuAJ1Tno1mqoG6alLbhHDFO50JjlbJi7kiFABHj0YKfIlVHLGx7pXK6B/iUazsnItc 7jXNltYJiqXJVSPLITB/iY/SdLMokRwkLs3X77GcyO3wWQGfRI3yJf2uVaoK//XHGxvs xBgieMH/j3dcv14sLnpCpyoKHZS7My6a25yen5bFtQVXaJSpGJrDYE6lWoT2Kmv/ORaV Hu39N8E29yelgcVMi0ZRnds1qE8gW8KMk/xmiqJYVCxG4/i7hv6rHSsY9OKdQAW9H4Fq xeYQ== X-Gm-Message-State: AGRZ1gJCcKU1miPEeBzA7czXkv/VZL8Xqv/gIycDecbmNY9AE4gOmBOY idXumS3Kl8IoPHahI3gywXnGfw== X-Google-Smtp-Source: AJdET5eOeBxmHRxMRv1dqm7bRxnMebtegzdvCjb6YXE5S3cuHLbQKjZ7d6YXgTvk+/tMRQ0dVsu/Fw== X-Received: by 2002:a62:6241:: with SMTP id w62-v6mr11758075pfb.69.1542386393003; Fri, 16 Nov 2018 08:39:53 -0800 (PST) Received: from localhost.localdomain ([115.97.190.86]) by smtp.gmail.com with ESMTPSA id p5-v6sm34622213pfb.109.2018.11.16.08.39.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 08:39:52 -0800 (PST) From: Jagan Teki To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Rob Herring , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Thierry Reding , Mark Rutland , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michael Trimarchi , TL Lim , linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Subject: [PATCH v2 02/12] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Date: Fri, 16 Nov 2018 22:09:06 +0530 Message-Id: <20181116163916.29621-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181116163916.29621-1-jagan@amarulasolutions.com> References: <20181116163916.29621-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 17 Nov 2018 14:56:24 +0000 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: Jagan Teki 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 --- 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 43ab7127d428..3ac002c4d8b3 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -438,6 +438,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));