Message ID | 20181210161729.29720-9-jagan@amarulasolutions.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBNVDXLQAKGQE544OVFY@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id C9F502E54A3 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 10 Dec 2018 17:17:58 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id j30sf3638854wre.16 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 10 Dec 2018 08:17:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544458678; cv=pass; d=google.com; s=arc-20160816; b=ZuviMpbgMs7BdLkc5HtzHwS7e/oCkSsG90nkCwG1J4bW82uXA9FvUQ31X3dhBQZH/7 Tj1vXudSJTrInnnGjupQ2Rg8O9XtMCnrREsKii7lFbbRDjvBfjcP3+A/1y6oixxp8gc6 B0wMK8iR1Ew8oPqvCoaSKc69wLfpUFAJW0of0iVoX8ZntxnwFY6tlYoOOj009euhFIxg JkXSPSPCTyIRMlwelpA/a1ef9H4HU9UaAAOB1K9YQtgXRheVataXBrqvdvky8oo8+lRn crJwkeZk4gUfgkjUlVVYFoPu9sLE2zshejXsPvDqqX/LRR8n+SglySooCYRfqlEwyU66 NCkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=j+2xZVCTFe/dHW53phOmbr14tpPOyezi5axcHU0RsR8fC5q13ljRP/Ke5laxR2Fs/R Acbjlx8vZ7ocKg2skwDdejaRIA6JBx3yeD0Nn8rezW/nb5czX9uSchkydF70CT+muJC0 APT/nmkT8iZ5NzGAc1E4XfJhC3TbpnvBqaKggz/ijjM/CjxYRj7/hpJSkQPC94Kt2+0P v4aW4ClySxyzBot9tIiJ0PWB8uQ5mkJiPJX4Yo0o5lkrSzDycvvfU4/4e+PW3fmgf/BS Uy4/ixMaYxIeVdhAhrVqT32PfAqh6972aotEAI49blHzpfbrFeAdsE8D3HpNCt1dgf4k xHUw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZED3XNr2; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=gKDZu5UCSdlHFsBvDfJlmyd4TFl+3NVnlQTuwODw689YSlzLE4tFBVc8E6PP/4ajvV no7dAJQZPw/D96Q81EIXFimaXDRtaHbECecJ6AeaFp4kDc2hkRhqT2d/MhRA8I4r88Dm ve2hgsHX9fl6v209i+gQEbmsqTDigzaINieEE= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=f4Piq/nm7UQzHE1bZgQ6ETjn0shwwEigeb1CbITPfDHTf7CDxEwztgnZQUV4AlnJP5 vlHmP5OAeyW9kEtykv7pEc+CNHFq/0aB7jjXZS5gL60rzcW6k6kBJkkx7pXVpn7M7ZoK 9bcbY07vZyrUtbUBKz3djYencfjI8okx0h0pmE0QmKMmoWZ46NlQrGSKu3Mj3z/6GaiR k59xlO3M3ZYx/cKqShVosAyoMqkogZYgjF9vyeQQJLusxADpsFIz4iIm5SgWc1IFAn+p OAqjEc9DKwm6+Bqb5LdlrEWX0LJQCMmEzdOJb+I7Vznu0BqyrBp2rz2hWo56tA+dALY6 uOfQ== X-Gm-Message-State: AA+aEWYmuggou5ZSISXvA6biiQiKO9VRdqt5kh7nZvJBSR7n+ba2nX+b 30V7t6xBlY6vAX5IRq5/50/nC7+c X-Google-Smtp-Source: AFSGD/XcWvaxHtb+R3lRnEMfAg9hYzx2WkHP2jPcwBUoKc8aVHDWhJq4ug1B+EMKcp6ymz9rg5kR4w== X-Received: by 2002:adf:d14e:: with SMTP id b14mr937538wri.16.1544458678563; Mon, 10 Dec 2018 08:17:58 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:9d28:: with SMTP id k40ls2255328wre.12.gmail; Mon, 10 Dec 2018 08:17:58 -0800 (PST) X-Received: by 2002:adf:9323:: with SMTP id 32mr10282427wro.213.1544458678146; Mon, 10 Dec 2018 08:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544458678; cv=none; d=google.com; s=arc-20160816; b=QC61V86JkZbMw4BPyW5pgkk+lI5PJtp4bbwW+AM/17b3lNvtesHSshRYsznv218Es2 Z/vdvKyn26C8dDuQHr54dCVesEGk4K3RQomYuBKs8APmAr0j7wch6/4vKhq5KDoCxkZH cH4qCu0Do8wRy4rj5SINqAUVU+7OIMxDpmSpnuZQUevA7Vh6uX/oj3PG8AkMD+vKEz4m u9EWJoPryI2U8qMBb0fOILntowJy2TCfKfdpugbTzdX2ROCp7NyHll3z0j0Muouh5akE 1YIldM5GWJemtYen3cKRiB/MXlxtZ9fd91v+6p/3jeNew09XhXBVqMFyvyWZK8gqxdk+ uoGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=htHh1EHvwq+E445n98FFCiPzlmj0F1X/K1ZswWL2Ewo=; b=Y52IvLB3FR+MW/+js9IBP7ZE4SGjSS2JzoQ9uDPEhPEzsruql20wBUvIBtfVLmXdq5 BmjJakR+5YntWU3MGU5NIqeHayRopSx8K0Zi1Yp46tJypGB1u0GCXCqriSmG1bI4qPTK KgJR4CBBEq2nuT+Com6xhHefk3gIjk723lk8Ng2vijbtiLqOB4XAx4NejTmFnJ4bma4h mcYGRRudUXMyLHxW1XnIBquKDgbsH7TRFdDaIBJl/U0bi2/PRC8SaNZKjLviB250EbAs BKA+W8+f33MUN5p8Oj7oCeBMS+Ia9tO1bPEEKALY5xQZYby5ai6MvEOfGwtLxUN8nnfL GQaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZED3XNr2; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v18sor7513672wrn.45.2018.12.10.08.17.58 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 10 Dec 2018 08:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a05:6000:110f:: with SMTP id z15mr10003279wrw.136.1544458677841; Mon, 10 Dec 2018 08:17:57 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b13sm8397503wrn.28.2018.12.10.08.17.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:17:57 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Michael Trimarchi <michael@amarulasolutions.com>, linux-sunxi <linux-sunxi@googlegroups.com>, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v5 08/17] drm/sun4i: sun6i_mipi_dsi: Fix DSI hbp timing value Date: Mon, 10 Dec 2018 21:47:20 +0530 Message-Id: <20181210161729.29720-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210161729.29720-1-jagan@amarulasolutions.com> References: <20181210161729.29720-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZED3XNr2; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
Series |
|
Related |
show
|
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index cb41fea4f3ee..81151d7633f9 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -482,7 +482,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, */ #define HBP_PACKET_OVERHEAD 6 hbp = max((unsigned int)HBP_PACKET_OVERHEAD, - (mode->hsync_start - mode->hdisplay) * Bpp - HBP_PACKET_OVERHEAD); + (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); /* * The frontporch is set using a blanking packet (4 bytes +
Current driver is calculating hbp maximum value by subtracting hsync_start with hdisplay which is front porch value, but the hbp refers to back porch. Back porch value is calculating by subtracting htotal with hsync_end as per drm_mode timings, and BSP code from BPI-M64-bsp is eventually following the same. BPI-M64-bsp is computing hbp as (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hbp = (hbp-hspw)*dsi_pixel_bits[format]/8 - (4+2); => (panel->lcd_hbp - timmings->hor_sync_time) => (timmings->hor_back_porch + timmings->hor_sync_time - timmings->hor_sync_time) => timmings->hor_back_porch => mode->htotal - mode->hsync_end So, update the MIPI-DSI hbp value accordingly. Tested on 2-lane, 4-lane DSI LCD panels. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)