From patchwork Tue Nov 13 11:16:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10680313 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 5A44C14E2 for ; Tue, 13 Nov 2018 11:19:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46D3329A6E for ; Tue, 13 Nov 2018 11:19:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39B322A3BA; Tue, 13 Nov 2018 11:19:56 +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 CFA0529A6E for ; Tue, 13 Nov 2018 11:19:55 +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=kjP989IFfrN2OXD7m4ICAtyKNai0qn0iQ+H7dgIZUk4=; b=Rq61PjJ3n+On1d VzmUAjQDQvFR1rh6vY3yT3SM29hRkt+oFumXtPGRvvXAVvKXwi+bVD89PYoOPPqeNlJHheQPSazIC xqxHmMiX9JF/8pkeRnUo5lB+jjnQibyKbIrdRe86L4gPBynnLsoAxaL+zVEx1nYrOR7Un0Kfwplrr QkOUvHlB4Vd8xREQ6sN/Psgy2g/XW6Ub4PygbB6//B5ui7a0AZhMtYOjqXkEDAHeF65yw2+tYtXSI o4LovvUUf4O3wiPSZSxDEs0MEdFoNmLlPzyEkYKlQKBp7iw6cVDWott334AVt/8vYyB4Y/QcYb5WU qSj4kTHtHynhG+M1sMNg==; 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 1gMWjQ-0001HT-6D; Tue, 13 Nov 2018 11:19:44 +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 1gMWho-0008H6-GU for linux-arm-kernel@bombadil.infradead.org; Tue, 13 Nov 2018 11:18:04 +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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=tWSVi/fIHUSF3xqHwGkNNGB45B ssrcGIK/cIswAQJlz2GvSoNob/0E9DtlYGy3qCdjvvEetwSvH04uTjPUEpoQ74INvagH6yASE8PlN QkaaXzFjnnZlh55FF1Pu8QyR1741iDH98eCe4uCz4v07h8TKwZv8RlKFQPgeN1HotYzqn8KaiYe3x AFEgiLE8PTu8SqPN/0pBqMN8PGO4OoPlktgEUnnLE6tLuzudqiPnUlvtSBmc2aOAp09b7N24rFgwR LtsCRuRTlsnfkLN4g77TpqrNTrsPaltBlNYpnYLR2TymI3HbhupQNClxhelzEhjm+557BLe5U1mXH j0WLEAWQ==; Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMWhl-0003eg-5q for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 11:18:02 +0000 Received: by mail-pg1-x543.google.com with SMTP id y4so5528718pgc.12 for ; Tue, 13 Nov 2018 03:17:48 -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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=NdohmiLlSkoZU7Pzu7EoT+xyfs525WMqHYtleWbiEdZFZ1GATwXlfcGC90RJWZ5kwb w2EXCRbbCqznsVVXsab5wiw0n8Z9t711nNCvvRfyahH41P24/DgeZduvUTAlxXU85tw2 5qBx8/DLB//dgneadmMZXbi9sEZHGbC/yr8Vk= 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=P7xZtqhtyLeCo2JvRyz6iw0Lru8qOAi+ZigmyrveCcU=; b=HZmQA6HN2bdJvmd5yk7fcNYTuOL1IyBGGP/+LjSYi6yalij0WnE6CO70eeDnEavkg+ t7gNIswSvAiymAQbZItIUQU4SF0g6+h23yOg6ZGQM43KUL0ZJsp2wrJQ5F4zLhQ5jQrN WdcoNRhUnWLS7Db/5/pI/Me26w/z/Nzz4ywZjJU2Oi2RZuALhCUetOmJVkJnKrJptjwy xFXiM5+xbiJrHX5+UGOHsD0P6pD2kucvglREsuU9cs460vdtSr+lVQT1vnPJE0NPr//i 8lKop0x6XDvYVQeb9Hw8+pnbLnWnRmIsl4Mku2ALqziat+RwwQ5mqkTwelyu7Hi6Dj1R h8qg== X-Gm-Message-State: AGRZ1gJDl31ynaJOEM1xQkIDxflxzvLezn0cuBTFopveRUUDhqyry3v+ aL3OSNaeoAeWoKFqVEUO5xJkaA== X-Google-Smtp-Source: AJdET5d7bo5xPOLc4beVgRh49IcW0C5gyV1OcsOSQF9PK3wCiSAKHP0magBN9Xl7LmfHgj2oXkUFRA== X-Received: by 2002:a62:9f42:: with SMTP id g63-v6mr4692347pfe.144.1542107866653; Tue, 13 Nov 2018 03:17:46 -0800 (PST) Received: from localhost.localdomain ([2401:4900:3670:3f11:bc71:2ef7:4a39:e260]) by smtp.gmail.com with ESMTPSA id 27-v6sm28531377pfm.36.2018.11.13.03.17.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 03:17:46 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Subject: [PATCH v4 09/26] drm/sun4i: sun6i_mipi_dsi: Fix TCON DRQ set bits Date: Tue, 13 Nov 2018 16:46:16 +0530 Message-Id: <20181113111633.20189-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181113111633.20189-1-jagan@amarulasolutions.com> References: <20181113111633.20189-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_061801_267213_8CD55902 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP TCON DRQ set bits for non-burst DSI mode can computed via horizontal front porch instead of front porch + sync timings. BSP code form BPI-M64-bsp is computing TCON DRQ set bits for non-burts as (from linux-sunxi/ drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) => panel->lcd_ht - panel->lcd_x - panel->lcd_hbp => (timmings->hor_front_porch + panel->lcd_hbp + panel->lcd_x) - panel->lcd_x - panel->hbp => timmings->hor_front_porch => mode->hsync_start - mode->hdisplay So, update the DRQ set bits accordingly. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index eeea977604ac..fc4252d96c38 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -367,9 +367,9 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, struct mipi_dsi_device *device = dsi->device; u32 val = 0; - if ((mode->hsync_end - mode->hdisplay) > 20) { + if ((mode->hsync_start - mode->hdisplay) > 20) { /* Maaaaaagic */ - u16 drq = (mode->hsync_end - mode->hdisplay) - 20; + u16 drq = (mode->hsync_start - mode->hdisplay) - 20; drq *= mipi_dsi_pixel_format_to_bpp(device->format); drq /= 32;