From patchwork Sat Nov 3 10:08:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666599 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 AD0673E9D for ; Sat, 3 Nov 2018 10:09:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 957B72AC6B for ; Sat, 3 Nov 2018 10:09:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86EAB2AC73; Sat, 3 Nov 2018 10:09:52 +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 36F512AC6B for ; Sat, 3 Nov 2018 10:09:52 +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=N8R60jvh81IZ4ZDnSCYjBfBd6W4iChgzrOZVFZbp24g=; b=aYfDkJZfdXyNpt DUU/WHo7ncipY2yNQFsSoyP6s3xGHc4zfwgVQiZ6YugrMLb6D5Qbc3qXi5vPWDgrvDagOmuBnkTAr PeCO4k9u2gJW8ih+LkoaKW51UPQBx4iVNFmBIGqenG/fuZ5wJBCzVDvO7kT/onf9Hn9YN4tjqffPe +YpHPMzqOzGHSr7D0ge+KVLp4iQxSJmS91GlzyOrfj3gDvbvW+wH2z5u4eQZhzhAcELWF9bLI/007 j7ECrNo+fAkdS93j9VZkSseYgtvZ3mMSESa+3RZmlEeIyefphLjDbG1EylQQOLs3OQayUpTVI5SW2 P7X9GCT2a1ilNzABhSyQ==; 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 1gIssD-0002nD-Lh; Sat, 03 Nov 2018 10:09:45 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIss8-0002YH-ER for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:09:43 +0000 Received: by mail-pl1-x641.google.com with SMTP id p6-v6so2130348pll.4 for ; Sat, 03 Nov 2018 03:09:30 -0700 (PDT) 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=ItiKdY/aqQ72CaiAvq/zBxi6LN6Pf1wyAwPGh/IMHHQ=; b=oP4oHcl3zRwyD7AEbNu3WwJ/L5SL4JweeBHJviTFRgDzWF2QjkMl7dsUpMId3phf1R 9QCZ1l7pWSW3UK//1MAgXzqYzZyUN6+QhJ4LPyckL5dG5QO3aSTTkUN+e2PDf1rR05AO tVgA3tYbD984GBtlvujRlQJhOiLIhMA5H3NzE= 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=ItiKdY/aqQ72CaiAvq/zBxi6LN6Pf1wyAwPGh/IMHHQ=; b=tr0VeCpzNk0VaZiy9kyuSzAxEuck58T5Wu1VecZetpgZJP0yjEyRhfX+xupyEm+prt XtooXI1fdHUoEw8oVFi25na0wHIfr52G9ZmR96rkAE+nirreYy1yQWu0loUJ6vwWCZay Ru5NSPZDhZN3Vnv58MzPNGSfijXPyHE21HLN9uvkCNQbiV0KEgKaIXQKlZyAHiK4S0Ma NHeBhbCGQz3Moq8qUvGBRs7gEJm/bjKyIv9cpsiQKBWK+1HSFfAx8s8XIVfuSrCxLhqh m5A++/5QxAlZJAEM3Chno+BuT9mM5SCmM24P+34SzaBee3zm/Rjm/lhcmD9DmAcONhZE DSkw== X-Gm-Message-State: AGRZ1gIatc1wIpxPU08/4FCnv+g6iUIy8Q7XBRO3VHd72Rc/Z4lFyxmT +boJuBsOIUizIqZSd+U14uR84A== X-Google-Smtp-Source: AJdET5dxiNozwBzE8xGf4Wfx+GgIdBkafQgF7rhrQSqStOEiVgqWI00de4qC41PL68yFC/tWW3INXA== X-Received: by 2002:a17:902:f097:: with SMTP id go23mr14566114plb.328.1541239769647; Sat, 03 Nov 2018 03:09:29 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:09:29 -0700 (PDT) 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 Subject: [PATCH 01/10] drm/sun4i: sun6i_mipi_dsi: Compute burst mode loop N1 instruction delay Date: Sat, 3 Nov 2018 15:38:51 +0530 Message-Id: <20181103100900.30313-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_030940_779367_63F1C7F5 X-CRM114-Status: GOOD ( 13.96 ) 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 Loop N1 instruction delay for burst mode lcd panel are computed as per BSP code. Reference code is available in BSP (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_dev[sel]->dsi_inst_loop_num.bits.loop_n1= (panel->lcd_ht-panel->lcd_x)*(150)/(panel->lcd_dclk_freq*8) - 50; => (((mode->htotal - mode->hdisplay) * 150) / ((mode->clock / 1000) * 8)) - 50; So use the similar computation for loop N1 delay. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 86430efd9054..da152c21ec62 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -394,7 +394,14 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { - u16 delay = 50 - 1; + struct mipi_dsi_device *device = dsi->device; + u16 delay; + + if (device->mode_flags == MIPI_DSI_MODE_VIDEO_BURST) + delay = (((mode->htotal - mode->hdisplay) * 150) / + ((mode->clock / 1000) * 8)) - 50; + else + delay = 50 - 1; regmap_write(dsi->regs, SUN6I_DSI_INST_LOOP_NUM_REG(0), SUN6I_DSI_INST_LOOP_NUM_N0(50 - 1) | From patchwork Sat Nov 3 10:08:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666603 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 742E813A4 for ; Sat, 3 Nov 2018 10:13:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ACC3290CF for ; Sat, 3 Nov 2018 10:13:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48B5A29241; Sat, 3 Nov 2018 10:13:34 +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 DBA7228DF1 for ; Sat, 3 Nov 2018 10:13:33 +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=zxT5dQXH9MQFX3fsJW9gO8wZ4L6+NLR8OWc/pOkzsXg=; b=oly1RkZEtieN3j i73xjrIuC1H+2ihUsgbpngLqMN1kUEvhLoUk/eW/bYYF8Ua3vXowwKIUtc0du4t5+BQSMDaOR0ZYi 52aKnRqwTVvnEvkPCvUFOPAfypEb3vjQ0Kir7Jr6uuMzH3wEwOzqImZS7QQrJOc5nfsiGgMbApnxA nyZ9oVhvVHBpd2grB5KizzKxQZ6KPse0pI0tcHQeASb9SNXE24Eenz+IP87l4cOZd1ypaaWnvva4D nW1czWhLclIzHyZNAxplr4GU115M2gwAm6yaNFTQnKZTdKmMWWckDiSh4SNYFzuu7TeoG9UfJP1JM 19hQDzblNvfT9y1cUb6g==; 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 1gIsvp-0005JO-B0; Sat, 03 Nov 2018 10:13:29 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssF-0002dj-DP for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:09:51 +0000 Received: by mail-pl1-x642.google.com with SMTP id o19-v6so2120445pll.12 for ; Sat, 03 Nov 2018 03:09:37 -0700 (PDT) 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=YhcdTaqekiJ1IH3Njt5SqmOCHXO4U7AWqNWukgHaAi8=; b=IuayEq9Mi2zYv8/dp6myAo9m7HW6XJn0ek+T5xJ6m0nkYrh346GYdNIWNFp2wlsoW+ nG7ilT87uzYUe003AtMPfKOhq56hL4iHBdRB8RXExUenLrWwfc6QqjmXv7t7rBgS3dw8 XD2qsilVWkCmBRDz5lTRUtcThl+Ye3jaVioGs= 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=YhcdTaqekiJ1IH3Njt5SqmOCHXO4U7AWqNWukgHaAi8=; b=CVuabI+Oc27O9ovPGChiLu1WBzQ7q0eUopglbKhh8KuzvPuAHHHIvGeLJJm6Ljxq74 eqnFsjrW1nyjCLjRwdQaBKG7+nqKFNwvjZ7Zb7rgxDWUyvLJ8EjOmi0kUvVXQMpuF2iY SRRulAIWq8nUpcfebN6jqyqjmkmimna6eA4mFzdkMUaAXYIbHKxDGVUASn83MtzzV4/W edsNIVb1J3DVKyfA5tkWISIOWvT5UQqZ0Tzma9dqv72DSddg3D4mAVeky5INJNrWKnFH 8URxeZuMBY3xXQEhBdvuTioUlkyHbmy0JXME8srM62QvRdAMJHsOwWtVoY7a3Jihicr0 j65w== X-Gm-Message-State: AGRZ1gI0biDT1Z3ALCWACYHWolP0OfxxCDzDIop/hCJOdKEZ9gMSIDTL uB85bGPCZpr/6jExyWrpesvlyA== X-Google-Smtp-Source: AJdET5fUxfrFit8SCslEnOy9JQ2bunA85HTt2862WrZQENW8wd5fo1Lk7lp2wBJKv5WizrufHateGA== X-Received: by 2002:a17:902:a9c5:: with SMTP id b5-v6mr14826077plr.340.1541239776608; Sat, 03 Nov 2018 03:09:36 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:09:36 -0700 (PDT) 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 Subject: [PATCH 02/10] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Date: Sat, 3 Nov 2018 15:38:52 +0530 Message-Id: <20181103100900.30313-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_030947_860578_B7F6A3A5 X-CRM114-Status: GOOD ( 11.91 ) 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 Instruction loop selection would require before writing loop number registers, so enable idle, LP11 bits on loop selection register. Reference code available in BSP (in 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index da152c21ec62..077b57ec964c 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -397,6 +397,10 @@ static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, struct mipi_dsi_device *device = dsi->device; u16 delay; + 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)); + if (device->mode_flags == MIPI_DSI_MODE_VIDEO_BURST) delay = (((mode->htotal - mode->hdisplay) * 150) / ((mode->clock / 1000) * 8)) - 50; From patchwork Sat Nov 3 10:08:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666607 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 16E98109C for ; Sat, 3 Nov 2018 10:13:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 007FD28E06 for ; Sat, 3 Nov 2018 10:13:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E856129180; Sat, 3 Nov 2018 10:13:35 +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 1D12928E06 for ; Sat, 3 Nov 2018 10:13:34 +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=jVIUWatlcnkvDcVon05eyldBtX7kDBZt0RfChba7irI=; b=Xo9P7D9c0U83Mk a6Rc9bH2qRPwBiEqFgTAT27N2K99WpU5CjPqvXCjVLU24cKyXvIN5yhKplM5PzS6bBpJBgMn3vGJb 3Qlu+pWohRsMdFuV4NjQLZQZIPc6aWKD4ndNQZrZP2hZ9TwYLMvv9RMhA91V4Ew7Jnt6ddjFTRBQw mnotCyUS6YE7A/YCSfI79oGKDV3V/pD8gKt4bWr5/yu6MU4/2ZRKgk+jbjBuiqHkZ5jMUtQXQxWFu T7VFKIYDOVMSp44sxQ9yZwxRsEFXxtRN1T/J7mnEzi9BqYSwvh92nhglhTg7EyxF/+exrbR16LSjv cxKy2RAgfbsuGsjfqbNg==; 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 1gIsvs-0005N2-Gd; Sat, 03 Nov 2018 10:13:32 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssN-0002n0-9H for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:09:58 +0000 Received: by mail-pl1-x641.google.com with SMTP id f12-v6so955897plo.1 for ; Sat, 03 Nov 2018 03:09:45 -0700 (PDT) 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=tQh0tuZ2hAQEjHoUC9QKXmQksrNiyamIN0Q5qO8zC0c=; b=m8OxtSqNuV73V8tWjYgHpyjiVE/7WW0euNVgtiafVS+UL/gBRFpJztSulsHUqMH6s/ +ir8x8ne92OvGOo78xkxTOgwsqTGjrcz6ueC43QKmkhly2SMHHjXn+nNzKmweQVkug1C aG36zcpFkWEsuzbkk84l0ExrwSXtzvo76wSTk= 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=tQh0tuZ2hAQEjHoUC9QKXmQksrNiyamIN0Q5qO8zC0c=; b=ih8aH1+eRH80eeGDQmTck5yEhwM3e3Uypm6DcTqByrpLPQcbIHbQpZmgAXgGAGZau3 B0dhjP3J2OPFwJkr4g4up2Ku7rT07Roaub58ek6/Zydq611664dlSOdMokdPTkgaP0l4 ssm9aMZIPhWh/wcjZxJKzaDpTZFAYJzUbEFUyaUBdumicFQ1jiKQ/6lF80q4bkOnsUVS BmkIDYvxtOXAAMIL2BRSg7ZggkErTLMsyBUrIo2yz4zmoe/wTpqGkvjfAmnDqGcPfrfS TUWjZ/hYivmLfUd3XCgMbpHqPCA7E0dIBkXgMm0S25SKkpFxhIeiLqwu71kuqBaTs0AQ aF7A== X-Gm-Message-State: AGRZ1gI9HNMaFUGYvZl6J49iLnbWlvom2ca52/y1Dz1w1zQlR3t3GPfo P4pvz6bOANfTfYqaGaIpZAABnA== X-Google-Smtp-Source: AJdET5co6HBSmkyR3+nJstdmG+aMIQ/YeXFBJ5+1R0rTOwg3wKCJwtBITHmn30omsMCoAShKnmAHzg== X-Received: by 2002:a17:902:a5cc:: with SMTP id t12-v6mr6717272plq.298.1541239784745; Sat, 03 Nov 2018 03:09:44 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:09:44 -0700 (PDT) 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 Subject: [PATCH 03/10] drm/sun4i: sun6i_mipi_dsi: Setup burst mode timings Date: Sat, 3 Nov 2018 15:38:53 +0530 Message-Id: <20181103100900.30313-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_030955_533587_77D4F1C7 X-CRM114-Status: GOOD ( 18.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 Burst mode display timings are different from convectional video mode so update the horizontal and vertical timings. Reference code taken from BSP (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) dsi_hsa = 0; dsi_hbp = 0; dsi_hact = x*dsi_pixel_bits[format]/8; dsi_hblk = dsi_hact; dsi_hfp = 0; dsi_vblk = 0; Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 108 ++++++++++++++----------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 077b57ec964c..4965b2c71e4c 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -479,59 +479,71 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, /* Do all timing calculations up front to allocate buffer space */ - /* - * A sync period is composed of a blanking packet (4 bytes + - * payload + 2 bytes) and a sync event packet (4 bytes). Its - * minimal size is therefore 10 bytes - */ + if (device->mode_flags == MIPI_DSI_MODE_VIDEO_BURST) { + hsa = 0; + hbp = 0; + hblk = mode->hdisplay * Bpp; + hfp = 0; + vblk = 0; + } else { + /* + * A sync period is composed of a blanking packet (4 bytes + + * payload + 2 bytes) and a sync event packet (4 bytes). Its + * minimal size is therefore 10 bytes + */ #define HSA_PACKET_OVERHEAD 10 - hsa = max((unsigned int)HSA_PACKET_OVERHEAD, - (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD); - - /* - * The backporch is set using a blanking packet (4 bytes + - * payload + 2 bytes). Its minimal size is therefore 6 bytes - */ + hsa = max((unsigned int)HSA_PACKET_OVERHEAD, + (mode->hsync_end - mode->hsync_start) * Bpp - + HSA_PACKET_OVERHEAD); + + /* + * The backporch is set using a blanking packet (4 bytes + + * payload + 2 bytes). Its minimal size is therefore 6 bytes + */ #define HBP_PACKET_OVERHEAD 6 - hbp = max((unsigned int)HBP_PACKET_OVERHEAD, - (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); - - /* - * hblk seems to be the line + porches length. - * The blank is set using a blanking packet (4 bytes + 4 bytes + - * payload + 2 bytes). So minimal size is 10 bytes - */ + hbp = max((unsigned int)HBP_PACKET_OVERHEAD, + (mode->htotal - mode->hsync_end) * Bpp - + HBP_PACKET_OVERHEAD); + + /* + * hblk seems to be the line + porches length. + * The blank is set using a blanking packet (4 bytes + 4 bytes + * + payload + 2 bytes). So minimal size is 10 bytes + */ #define HBLK_PACKET_OVERHEAD 10 - hblk_max = (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp; - hblk_max -= HBLK_PACKET_OVERHEAD; - hblk = max_t(unsigned int, HBLK_PACKET_OVERHEAD, hblk_max); - - /* - * The frontporch is set using a blanking packet (4 bytes + - * payload + 2 bytes). Its minimal size is therefore 6 bytes - * - * According to BSP code, extra 10 bytes(which is hblk packet overhead) - * is adding for hfp packet overhead since hfp depends on hblk. - */ + hblk_max = (mode->htotal - + (mode->hsync_end - mode->hsync_start)) * Bpp; + hblk_max -= HBLK_PACKET_OVERHEAD; + hblk = max_t(unsigned int, HBLK_PACKET_OVERHEAD, hblk_max); + + /* + * The frontporch is set using a blanking packet (4 bytes + + * payload + 2 bytes). Its minimal size is therefore 6 bytes + * + * According to BSP code, extra 10 bytes(which is hblk packet + * overhead) is adding for hfp packet overhead since hfp + * depends on hblk. + */ #define HFP_PACKET_OVERHEAD 6 - hfp_pkt_overhead = (HFP_PACKET_OVERHEAD + HBLK_PACKET_OVERHEAD); - hfp = max((unsigned int)hfp_pkt_overhead, - (mode->hsync_start - mode->hdisplay) * Bpp - - hfp_pkt_overhead); - - /* - * The vertical blank is set using a blanking packet (4 bytes + - * payload + 2 bytes). Its minimal size is therefore 6 bytes - */ + hfp_pkt_overhead = (HFP_PACKET_OVERHEAD + HBLK_PACKET_OVERHEAD); + hfp = max((unsigned int)hfp_pkt_overhead, + (mode->hsync_start - mode->hdisplay) * Bpp - + hfp_pkt_overhead); + + /* + * The vertical blank is set using a blanking packet (4 bytes + + * payload + 2 bytes). Its minimal size is therefore 6 bytes + */ #define VBLK_PACKET_OVERHEAD 6 - if (device->lanes == 4) { - int tmp; - - tmp = (mode->htotal * Bpp) * mode->vtotal - - (hblk + VBLK_PACKET_OVERHEAD); - vblk = (device->lanes - tmp % device->lanes); - } else { - vblk = 0; + if (device->lanes == 4) { + int tmp; + + tmp = (mode->htotal * Bpp) * mode->vtotal - + (hblk + VBLK_PACKET_OVERHEAD); + vblk = (device->lanes - tmp % device->lanes); + } else { + vblk = 0; + } } /* How many bytes do we need to send all payloads? */ From patchwork Sat Nov 3 10:08:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666605 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 E376F109C for ; Sat, 3 Nov 2018 10:13:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDC1028DF1 for ; Sat, 3 Nov 2018 10:13:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C16F72931E; Sat, 3 Nov 2018 10:13:34 +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 4F79628DF1 for ; Sat, 3 Nov 2018 10:13:34 +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=Q7yCAhLTUlz/lMtoU/itFe14WElHkDoUVjMILlUlGNk=; b=NAu5fCiPvN8ETX vwUiXO8fkGe+iVeUxmTK+SWTU5c/ZEQWAVTjbvpgMFrAEfosxSmkFrEq4TO9LzqYZq/TcXWsipB9Z ZR/DZugDyAV9hQs33NZtfietePDO3CTUCxhz4GCNJvGc9M549L6cfwXyaf9pp0jvdUiB6ZuF4laJg efY7zCJdgqpGlLhzq3I24R954QOL83klZyf55XlZxAJlm1Q2cOZ+JxZQ1qX1ZT1dBL3zixxnOCHOL FyFqm1j8iDhfO7y0s2OGbPCOT5prDWdr6ps6y4xnRxOrkrpGDXTJrYlwco5z92Y8IBy+laYh5Idy0 LW+slKFwWG7O5As8MJYA==; 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 1gIsvt-0005Nx-8x; Sat, 03 Nov 2018 10:13:33 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssN-0002xr-8w for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:00 +0000 Received: by mail-pl1-x641.google.com with SMTP id p6-v6so2130620pll.4 for ; Sat, 03 Nov 2018 03:09:52 -0700 (PDT) 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=RoHXhQs3sGHJc3VqucM8YHfwrLVjYZhUwHaLNgzq7Hk=; b=PDS9oZXI08XHodXR7M+0+fMtcP+VlY9g+hL69LXq+DNFteFFc+lUCpCpwI7wLoHCbG i1r9Nbg5hKlV3gpKaTq29eKsfIcOM2gv2hoYNro/woLd7+XOwl1AuDQrqvfhPQ1oDEHW JAzTxzknORGbhh4L0SgffAHR07HzUdEktD9rQ= 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=RoHXhQs3sGHJc3VqucM8YHfwrLVjYZhUwHaLNgzq7Hk=; b=dzeq/uOFEUJUdoIHv6k59doevUwV0LFBbbDiKQYU2StTXT/Sa4Nk77vMj9CE55fVAV JhgH+OyZOxPgnSn1EWIoWNYjqNu/bRGWf1UK3GAgj5ri69q7jSoi/lLm9cKYld1ecChJ KEycGUpNZLul92tnJUxWOM9mBfNwL2gSDoBp/bhtwNoI0Al7b1ITjIU9KN2enoHX9qmp FuwRd/h40Oj8zIvxAOsE4O14JOjD/NP4W7D29rFm2MCiLt3EU+AqtiEm6ftAoYKijmqo DBArAYa3a8c8HYTj1G0Yb+4lHMAYeg2kM2LAT3NcgbpLx5JixxjdWpZROOqPq2FGK/Ui Q/Bg== X-Gm-Message-State: AGRZ1gI/h7KHDV4gr3qOrY1ZGcA9gfxrGE+WGfkY6X7KCxA6aIkA7II4 fwX+KnUuVxODaRBJVSy8Z2itTA== X-Google-Smtp-Source: AJdET5cZWnpRoke0soGNzGMb4cUkutwXdz4Xu2YGKFvhfMeGnaV3L3bKJ4djXsCJup2lz7coshRSDA== X-Received: by 2002:a17:902:bf0c:: with SMTP id bi12-v6mr15243833plb.330.1541239791555; Sat, 03 Nov 2018 03:09:51 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:09:50 -0700 (PDT) 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 Subject: [PATCH 04/10] drm/sun4i: sun6i_mipi_dsi: Setup burst mode Date: Sat, 3 Nov 2018 15:38:54 +0530 Message-Id: <20181103100900.30313-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_030955_564191_2E5781D5 X-CRM114-Status: GOOD ( 17.85 ) 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 Setting up burst mode display would require to compute - Horizontal timing edge values to fill burst drq register - Line, sync values to fill burst line register Since there is no direct documentation for these computations the edge and line formulas are taken from BSP code (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) line_num = panel->lcd_ht*dsi_pixel_bits[panel->lcd_dsi_format]/ (8*panel->lcd_dsi_lane); edge1 = sync_point+(panel->lcd_x+panel->lcd_hbp+20)* dsi_pixel_bits[panel->lcd_dsi_format] /(8*panel->lcd_dsi_lane); edge1 = (edge1>line_num)?line_num:edge1; edge0 = edge1+(panel->lcd_x+40)*tcon_div/8; edge0 = (edge0>line_num)?(edge0-line_num):1; Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 48 +++++++++++++++++++++----- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 4965b2c71e4c..b6c01891df36 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -375,20 +375,52 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { struct mipi_dsi_device *device = dsi->device; + unsigned int Bpp = mipi_dsi_pixel_format_to_bpp(device->format); + u32 line_num, edge0, edge1, hact_sync_bp; + u32 sync_point, tcon_div; u32 val = 0; - if ((mode->hsync_start - mode->hdisplay) > 20) { - /* Maaaaaagic */ - u16 drq = (mode->hsync_start - mode->hdisplay) - 20; + if (device->mode_flags != MIPI_DSI_MODE_VIDEO_BURST) { + if ((mode->hsync_start - mode->hdisplay) > 20) { + /* Maaaaaagic */ + u16 drq = (mode->hsync_start - mode->hdisplay) - 20; - drq *= mipi_dsi_pixel_format_to_bpp(device->format); - drq /= 32; + drq *= Bpp; + drq /= 32; - val = (SUN6I_DSI_TCON_DRQ_ENABLE_MODE | - SUN6I_DSI_TCON_DRQ_SET(drq)); + val = (SUN6I_DSI_TCON_DRQ_ENABLE_MODE | + SUN6I_DSI_TCON_DRQ_SET(drq)); + } + + regmap_write(dsi->regs, SUN6I_DSI_TCON_DRQ_REG, val); + + return; } - regmap_write(dsi->regs, SUN6I_DSI_TCON_DRQ_REG, val); + sync_point = 40; + tcon_div = 8; /* FIXME need to retrive the divider from TCON */ + + line_num = mode->htotal * Bpp / (8 * device->lanes); + /* Horizental timings duration excluding front porch */ + hact_sync_bp = (mode->hdisplay + mode->htotal - mode->hsync_start); + edge1 = sync_point + ((hact_sync_bp + 20) * Bpp / (8 * device->lanes)); + if (edge1 > line_num) + edge1 = line_num; + + edge0 = edge1 + (mode->hdisplay + 40) * tcon_div / 8; + if (edge0 > line_num) + edge0 -= line_num; + else + edge0 = 1; + + regmap_write(dsi->regs, SUN6I_DSI_BURST_DRQ_REG, + SUN6I_DSI_BURST_DRQ_EDGE1(edge1) | + SUN6I_DSI_BURST_DRQ_EDGE0(edge0)); + regmap_write(dsi->regs, SUN6I_DSI_TCON_DRQ_REG, + SUN6I_DSI_TCON_DRQ_ENABLE_MODE); + regmap_write(dsi->regs, SUN6I_DSI_BURST_LINE_REG, + SUN6I_DSI_BURST_LINE_NUM(line_num) | + SUN6I_DSI_BURST_LINE_SYNC_POINT(sync_point)); } static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, From patchwork Sat Nov 3 10:08:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666611 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 4BC1113BF for ; Sat, 3 Nov 2018 10:33:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A68A2AE8F for ; Sat, 3 Nov 2018 10:33:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D6F62AE91; Sat, 3 Nov 2018 10:33:03 +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 D5C9E2AE8F for ; Sat, 3 Nov 2018 10:33:02 +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=v1BzzUfz7xEL3OhO0vusOv2tR60mrscWbKTteHT5lC0=; b=hrEWXFSdS1k9wL +mOXRGW3ct78NhRRxW15Y4nShQHJzAFGlATG7jNv+QqWcTV74TT44/Wlv7FiWDOTVKrx1jUAczUl3 ab36YSvwPPwWIVLIUSVuCJl1Ybywm8TgxE691PKG82v4+B9iqBJD7O8katIpTLaGz9GgHiHZ4DJWi WUPJe83wfq0gMEC5rpS+EOCxv7GaFC0U5hYW7oadrpzhuOpM0okCEkGNIogrZ/q9tkMSP8mLMudgn Y0a9I2aSlHgeMxUOMgOJ7cuLIOwds25udPgODJvopoy9TYZN7yYGi9GO9J8AHfKqDo7iIMN1fiI2+ AGVpBUyv+A9i3pjMstOQ==; 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 1gItEj-0004D9-RA; Sat, 03 Nov 2018 10:33:01 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gItEd-00040r-J3 for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:32:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=RBoHpvI+yjf+sOpHt/smPITCJdlWMb7A2BR5EeBkj9A=; b=MsrTMELKZUWoqGBBR93ccfQwDj d52FUXpWDMKyvXskXQsF8F81nC/MCHdTsRljzI6iK7a0Ueir/4gSMQaag/1fw1Q6w7rysNr1XpSb/ x2+AOuiRDHmr/kL4vTqcFV1kkSTp0vOh0snL04kYZhYKvp8RHdfOY+nycsTG5qC3LAqh5MO8yzUwE mNGZxnpou+a4E1fFTiD2ZpPlYstZLTMUfH4Tfb3ag9xOp0Zy7aDPn9F5/ZY6CCn5gI7+MOsBz8UeL TjDaLpD27Z828LiNZDZDpPUOYSf3fBQcCgh/6Al6xedS/SPXtiP7luVe6Wfq0CtNjWkdlOIAnxsHu e3rXFRrQ==; Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssa-0003o7-LN for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:11 +0000 Received: by mail-pg1-x543.google.com with SMTP id q5-v6so2068895pgv.0 for ; Sat, 03 Nov 2018 03:10:00 -0700 (PDT) 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=RBoHpvI+yjf+sOpHt/smPITCJdlWMb7A2BR5EeBkj9A=; b=iMvvWPRh/PdJ5rtKtCdSpfgbDPVzDn/8c4ZPlOrvAWDzuKwIpoAR2hxmnUl4yB6mYy tM9DByFgKieSQWbZo4ian3Uc9mwNM8hHNbJyIKBg9WB2hz7wBK0HyMFrM/s/+MCVei0O rYXMZROP/2yYMI0VBrABhOSgPHlynieKKnFOQ= 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=RBoHpvI+yjf+sOpHt/smPITCJdlWMb7A2BR5EeBkj9A=; b=hSXzdHYUDFDvbIRkfLmNeJRyzeYkt1sagJC3Xbz59VgSR4b0aU3bBF3U77iSkaDhHV UuwSC0HERwUsVGnYcEhnf1oYyptk7tUPNkgwqLhDw4k2C8O9tiDxJraIP7W7IhBoXFr3 Xfl5uim2T8IkHKMXpKqXA0+eA+3tA0du0JeegqLx7wi3laSrzam6DXJCjNBGysisd+hK IzPKakby+7WVdwlPnChGhCJeIsQbq2rLfw139B3NIs4yU2DZMB1pGI0VIhJ4d2auZKgW 5U7GWQfaOCuA8atQGZsHzZDGW3hWl8AY3PN5ZevZzftHZlPy1GD12udLYxOlDe2YrbNm AfxQ== X-Gm-Message-State: AGRZ1gJPHkPy+Bldlb4qiZ7lRPg7DWgr7vyiTkR+kWJhcO94YufngsBq u58ox5HaWVEuIk0ULZO7KAEt7Q== X-Google-Smtp-Source: AJdET5fvkLH/Lzgeh3GeP6t+bSHKP1D/+JGthSpCBYjf7HluzjfCeocHOInlOwAvJHC2dzASgahvVg== X-Received: by 2002:a63:460a:: with SMTP id t10-v6mr13818801pga.197.1541239799315; Sat, 03 Nov 2018 03:09:59 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:09:58 -0700 (PDT) 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 Subject: [PATCH 05/10] drm/sun4i: sun6i_mipi_dsi: Enable burst mode Date: Sat, 3 Nov 2018 15:38:55 +0530 Message-Id: <20181103100900.30313-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_101008_695332_ED30BEF2 X-CRM114-Status: GOOD ( 13.47 ) 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 Enable video_mode_burst bit from dsi base control register for burst mode display panels. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index b6c01891df36..b18a01361f11 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -421,6 +421,10 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, regmap_write(dsi->regs, SUN6I_DSI_BURST_LINE_REG, SUN6I_DSI_BURST_LINE_NUM(line_num) | SUN6I_DSI_BURST_LINE_SYNC_POINT(sync_point)); + + regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); + val |= SUN6I_DSI_BASIC_CTL_VIDEO_BURST; + regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); } static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, From patchwork Sat Nov 3 10:08:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666615 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 F082814BD for ; Sat, 3 Nov 2018 10:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D27712979A for ; Sat, 3 Nov 2018 10:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFBCF2ABF8; Sat, 3 Nov 2018 10:48:32 +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 3FF312979A for ; Sat, 3 Nov 2018 10:48:32 +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=NxAbAGLMi8mhCoo8uMiyLYuNNEUFrU4gDyl/BhX4OCM=; b=HYGmIfgUDumtxB AQsdMPAwDV9RbI+HvPrPMf7gaWHm0YD17nOskjeguwzjGCr8CSv2zH2FlAb3E4ONWXkP5URLRnbFC AGyhm2DRs8ThJaIEI8uiCzuhpRRJag8BkldIjZeQlcWCTrMwJl1Ikou2wNbimLoBeSQmEqoM9KzeB /1vcZnZ+xKxVS/ca78uCd77a6Xjx9M1wb9yv8M1Jf9LDBcb5PEvqFupyTLPSI7F9XwRyuNNDa7wyi c7/QIl3G5dOtt+PfJEFReDIKVnN8pVokq2NaeQYeApzxfXk7LCto8vulqAu99Ls+I5T3upr79JGXp zvhbf4MUoOfI1ya5aYBQ==; 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 1gItTh-0001Zc-A3; Sat, 03 Nov 2018 10:48:29 +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 1gItTf-0001ZW-Cj for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:48:27 +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=XQSE4iVIjSLPAOzYcXE68LFT+STvGBf+GZnuz/7y4Xw=; b=0G+0+VB18XxKxnKoRdhHGUzrWF y0CvHJLZZjZ+pgt7EXBBiMUg8ex/IvweN61QtWxr+iAaRPCWnh0YBVocurBGJLTYir2LCXi1Dj1Ko l75Bgc69jtDM1msXUS5hBMbZMEMREoA9I9W1mfFZ0AnsowxEmNNl65Z8qaAjXLp50kHpT73JHiPfj F7Y6iVIima0MRE6h4iBJN1qRXNOXYfL3zZ9YCU0htSRUbw2Dl036cllT83TmTyZZcfLeMC7ngq7sM wa1IbNGgKzWXqSEwc8Gpzjw+53BMk1SUIH61cCe5oQYJmb1xj5ry7CtD0pIfHQyHAzlG9wvyqO9Cs coZa4vig==; Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssm-0008Q4-IN for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:22 +0000 Received: by mail-pf1-x442.google.com with SMTP id f78-v6so2168298pfe.1 for ; Sat, 03 Nov 2018 03:10:08 -0700 (PDT) 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=XQSE4iVIjSLPAOzYcXE68LFT+STvGBf+GZnuz/7y4Xw=; b=TOiwM0JMmbK7vtIijOmnwYjzx5D0EO0nsNkW20gDvVyOOCaIW5ZhYSXiZZYkjMvrYI Agu7/3Kc95wzAAnUQpz9Y0v9crxF/nSY4hBE2wxuYkgYCvxSHuasR8Zc2KEq6hgZFTBo 5J9ETI5UpaiEK0hDKxKP0ZAJlAQdk413N5A/M= 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=XQSE4iVIjSLPAOzYcXE68LFT+STvGBf+GZnuz/7y4Xw=; b=CJSmJ739zdLRDj7ujMTgTiTw1Cd90Hxj3x4BOLJAjkahD0yzSyOnhFeNFwCPQJTyzq heSC7k1t34swJtV53Y9pPnmkAqsV4FfZBVItKiX4NIOmHS/n6/HcA4vt5/zJqBnAmZaz ZZfmDWAXwvIJDL00SK9zOMnqdfF6t51EgxcGgiclWwb9Di1uxbdCFDnU3ovRE9p9A6BW aDPpj1KBl72sI/rxLtvRH9BoJYVB1VQW1mUTU03N+rfIWbe8Pgy0CxcSVL93ujnX83rI OrtX7PK4K4Nr8/+20KF6jX06L8bHjCUE/LYlS2soLf5cxbXpJt8M5e0L2cmAZ/5XyUbn C+ow== X-Gm-Message-State: AGRZ1gLsjZT0h08F/Py4AJXSihHBcuoBKxmIG9zkantxeuklSjggRjcI IGwaJJdEWHl8ALlaRISR6paSdQ== X-Google-Smtp-Source: AJdET5cNgvDVUuusDs+G7JmDnvpBakvSWoLJPbtp4UZaeGzbvI4QqSOFKMxQqLsfpjQbsY3XHlx7Ug== X-Received: by 2002:a62:5d89:: with SMTP id n9-v6mr15519867pfj.54.1541239806197; Sat, 03 Nov 2018 03:10:06 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:10:05 -0700 (PDT) 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 Subject: [PATCH 06/10] drm/sun4i: sun6i_mipi_dsi: Enable 2byte trail for 4-lane burst mode Date: Sat, 3 Nov 2018 15:38:56 +0530 Message-Id: <20181103100900.30313-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_061020_650265_E0151A7A X-CRM114-Status: GOOD ( 12.51 ) 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 For 4-lane, burst mode panels would need to enable 2byte trail_fill along with filling trail_env in dsi base control register. Similar reference code avialable in BSP (in drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) if (panel->lcd_dsi_lane == 4) { dsi_dev[sel]->dsi_basic_ctl.bits.trail_inv = 0xc; dsi_dev[sel]->dsi_basic_ctl.bits.trail_fill = 1; } Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index b18a01361f11..2d34e5f48d29 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -33,6 +33,8 @@ #define SUN6I_DSI_CTL_EN BIT(0) #define SUN6I_DSI_BASIC_CTL_REG 0x00c +#define SUN6I_DSI_BASIC_CTL_TRAIL_INV(n) (((n) & 0xf) << 4) +#define SUN6I_DSI_BASIC_CTL_TRAIL_FILL BIT(3) #define SUN6I_DSI_BASIC_CTL_HBP_DIS BIT(2) #define SUN6I_DSI_BASIC_CTL_HSA_HSE_DIS BIT(1) #define SUN6I_DSI_BASIC_CTL_VIDEO_BURST BIT(0) @@ -424,6 +426,10 @@ static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); val |= SUN6I_DSI_BASIC_CTL_VIDEO_BURST; + if (device->lanes == 4) { + val |= SUN6I_DSI_BASIC_CTL_TRAIL_INV(0xc); + val |= SUN6I_DSI_BASIC_CTL_TRAIL_FILL; + } regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); } From patchwork Sat Nov 3 10:08:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666609 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 B0B3B13A4 for ; Sat, 3 Nov 2018 10:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9271E2AE8F for ; Sat, 3 Nov 2018 10:32:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 817DC2AE91; Sat, 3 Nov 2018 10:32:58 +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 EF6432AE8F for ; Sat, 3 Nov 2018 10:32:57 +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=OsysGKsAWxi6ScLiTLQFFmUfztFlxyyqyXinPeZjH1s=; b=L0dP53TP80gkPP +Lfpa8J47X6Ae6NHYUIUf9a0HFNLit97Cql8kpmj7Pqmo0EjnFbmJ9Z2WVZU3wm5qFgP4ZjbholRS lJg+wqViyEfuulxnTC4G97LUsBKz2T6v63GajQnKqX5AgLJFDPXn7v9sAJgwsPRRM2mcXJbTPoXrY YNNClG4Ya9aoTYjGLM+8AgEVsG3ZJ0ZIbl5+aiLdIGv2NT4HYPdyrrXujZN9X0ng3Pxytuk49Lduh vkJOfsCMRyqxFM8b1cHyKSo1EoQKNUM8688yk4PJ6hlXuOF8WoVTrzWJfg4jxEu7o0oslb/bw/k2Z EckASjPBcYahpRMk5RnQ==; 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 1gItEc-00043Y-M6; Sat, 03 Nov 2018 10:32:54 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gItEa-00040r-Fh for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:32:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=Ce7dCP7DfFpA1e50RettNtIdS5/8ZiyxnOTveZEOqbc=; b=YFT6hcXSnhSE0BzzR5eRNJDwKI 3oWQdHhX/9jHBebBY+rGHFSow0t9kW8Ah4pWDHCUfXOrGSxpJougtCIBlEC9WmgwpYwAdfFTlS2LA 7D//QAr6KA0QnPF3sCYseH+AqAPbxLheWi5DXX5rVioLM0g0WyLEDrKFpQ9Qo12FJ2KMX2vUqlZPn sAYXYBQl2fC03xjGK7WqvubQkkDNs8ksIsMbZ9286Dv4dHYOfMcuaPtrAKI66hP4yoH8nRIJ0Nofg UGaeBLiRbKwOIk05biWlqgoO+xCl4LUdaH0RwfWZa1wXFfiNKpAmwps/vptyBODZx8qcaeR5MLEfI dp/lmO/Q==; Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIssq-0003pw-BJ for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:25 +0000 Received: by mail-pg1-x541.google.com with SMTP id w3-v6so2043120pgs.11 for ; Sat, 03 Nov 2018 03:10:14 -0700 (PDT) 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=Ce7dCP7DfFpA1e50RettNtIdS5/8ZiyxnOTveZEOqbc=; b=kynS843WNKVgkuX88acq89wg8byWQ/X6sYeDsUTzFb8dIlI9nH/aSoo9oDSpB7O2Ag MTZgpW12Z6sr0svz+RnwqbW1Sgpq7Ph+JkgVuGL7UcUpbv+KDwl4atFt01kBd+GhFFoe OsmVUrr+cGV4XTS1tQuYJtjj+ESCGB11OAcuw= 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=Ce7dCP7DfFpA1e50RettNtIdS5/8ZiyxnOTveZEOqbc=; b=bAxjUJ4uxrll/rzpaR4cQ3pDn2u+XrI19YXx6d4c94+PYaeHpxcDzeKtwUYgciYJMz sKfJOTLuYBv9TGpgHaBMf3sYMzlm8G2dKTwmQk5BG8XFcJ2IBDZpbyAusbD93QnUH6xV /KHMsJLA+NRWYt9OrCIMtqA2gMwZLxvniCkcw4CqJDv2grDKPSzZQqqnfm5kvSTusT8l 4Ujnu3VFEhJGPPwKpVIhpWgTF80xs5zLrmWGJxs778ETC2gYcSBSbRvoaeMQiH8FUyvz c6gLRkmEwZGpC1A+mRcGHPAD5GruAc7/g7FzPaDnNxzSJGIvHNIjVhLcD34YvdvwVL1R Z9RA== X-Gm-Message-State: AGRZ1gJT8yZu6+HpcekyUzk3nc2mjB24MhiaFO9XrOxzw8gE37uPoGKD A/PVPVMmqFRDyq8iNTIcYbSWBw== X-Google-Smtp-Source: AJdET5e+pQzSqMcJNJABb28K3oUehx7FlxwUeNS9B+nUNPjuQyX+XcrQxRdm5S+2gEoaL/VSsMJfMw== X-Received: by 2002:a63:4384:: with SMTP id q126mr13740690pga.160.1541239812653; Sat, 03 Nov 2018 03:10:12 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.10.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:10:12 -0700 (PDT) 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 Subject: [PATCH 07/10] drm/sun4i: sun6i_mipi_dsi: Enable burst mode HBP, HSA_HSE Date: Sat, 3 Nov 2018 15:38:57 +0530 Message-Id: <20181103100900.30313-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_101024_375461_8791B1A6 X-CRM114-Status: GOOD ( 15.69 ) 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 Horizontal back porch, sync active and sync end bits are needed to enable for burst mode panel operations. So, enable them via dsi base control register. Signed-off-by: Jagan Teki --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 2d34e5f48d29..feb8c54c5146 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -518,6 +518,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, u16 hbp, hfp_pkt_overhead, hfp, hsa, hblk, vblk; size_t bytes; u8 *buffer; + u32 val = 0; /* Do all timing calculations up front to allocate buffer space */ @@ -527,6 +528,10 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, hblk = mode->hdisplay * Bpp; hfp = 0; vblk = 0; + + regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); + val |= SUN6I_DSI_BASIC_CTL_HBP_DIS; + val |= SUN6I_DSI_BASIC_CTL_HSA_HSE_DIS; } else { /* * A sync period is composed of a blanking packet (4 bytes + @@ -594,7 +599,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, if (WARN_ON(!buffer)) return; - regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, 0); + regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); regmap_write(dsi->regs, SUN6I_DSI_SYNC_HSS_REG, sun6i_dsi_build_sync_pkt(MIPI_DSI_H_SYNC_START, From patchwork Sat Nov 3 10:08:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666619 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 B3A3014BD for ; Sat, 3 Nov 2018 10:48:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A48FF2979A for ; Sat, 3 Nov 2018 10:48:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98A742ABF8; Sat, 3 Nov 2018 10:48: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=-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 198732979A for ; Sat, 3 Nov 2018 10:48:49 +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=6iwbPcDZeAZ2pv9jjeGdtrE4J+MasLAig9bXiE5dp4Q=; b=ZCkLHz8WLGnnMZ u9XZLqL9wrEGI0ffJPKRu2O8PRsA7h6h28MARiuoPOrKp+0qO7qBGni4uy8koQlGUnaEZW6dL8hxW xp4wP0kQllz+07U3ceBoeMXIpuz57biSfFZbZ3cskbHRg1M8YzNsKsJPc4PShqfTuckpLgr77AUiC OZPUL78FoRLiEdtlslMOQUl3dbLPEtYlLjxa+zBTodhBpn0eNY5cbckk6hv67pv0HRFF6lRMEZDJh J6gSQ4aikvt1fraclu7DdR+UUjTjXL0TQqMNeerg1pKWQ3YEWzflFvlKrYQZCnuzrCDnrbF4aQYH5 YIZNjP/60jru7Y+duKoA==; 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 1gItTz-0001yE-6K; Sat, 03 Nov 2018 10:48:47 +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 1gItTi-0001ZW-Vd for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:48:30 +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=2imflbytRpO7gkCpHkk9JbdaFJzsvanHLH6vmOR2Ts4=; b=famQz2Yc7+sZAMUNP9SDCiXjA8 8ixbBTWuuiNpB1mtRv+T97HvFLTa7b/r5t6CQxBCir4SnOqLrLNMV2TKzqdZ/oV5tn6B6Ye2QZTF9 ZVKQYoEYF5ov/w+/G9LkosaneSIo5FfGhxXhs5MAz2X8M1O59+Vi9BIOENv0oyqbrREGWw4mH3rAB K9MxMTo/hMar8u3/3Jju8wOaWHogu8/VO8g8Z2Gu00/VFpMX44SAdH9Jn3ydTSjC/wW3qS9D0rqBn yN42USUGcqmpGfEqHdhWU8BQ+Fl6yShvg6gZRKVcI1M1m+LXSH+F8RV1cipr8W3BBneBLlaGp7uek B1rSPxWg==; 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 1gIssz-0008Rj-5B for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:33 +0000 Received: by mail-pg1-x543.google.com with SMTP id w3-v6so2043220pgs.11 for ; Sat, 03 Nov 2018 03:10:22 -0700 (PDT) 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=2imflbytRpO7gkCpHkk9JbdaFJzsvanHLH6vmOR2Ts4=; b=WQedQFYB27qKIicxCsIp9R3QcdKeIIQ1l15TSlgLBG/fsemXobP2hah2s5T3ciQayb 9VuNr+e2INxrXa3Q4pX17EmIb6NLAXVY7rOfjVJhzaXo1fSdAXrA8pmxjH3Ti52w54Pb 9T+ZzALxyaGGYruwk/COn6FFs7Ij9+CNh9pt4= 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=2imflbytRpO7gkCpHkk9JbdaFJzsvanHLH6vmOR2Ts4=; b=dotujIsAeJqTS7D+aWbXMHmaNU4CraNtH1A+0G4fACm+mfJhv8LvmPi03idJ+P2yRC EB6+dintop1M5aEvmxQWfhCWTLlD2RdBkSR63XV7/GHDr28KMQwFA7+MiXhS/YW779o0 Af5oIX6HxdClfZnxOJlZag3rxWnfb5kDsK+qT7xg8/dKERMsWFUMOBNlYU75lZxhEIkc NwCgzAVFYeaVC0HRZJPFaE3tpG/vKws25IAtCZ0ZcCVujjafs7lateHcgS9vrQ7g08ul MLMBw9yry0fmH360APSO3m67IHr65rffVCisDw2F3WoQ6JwtxFeHgFD47/ALxDsD6vuw SNDw== X-Gm-Message-State: AGRZ1gKs8vNV+RrTVL+hgtlU0yb8dhGbPGdsjiXtpImQlGzHmTBfx5kv 58D///4oy4f3etP52C6SbX7pag== X-Google-Smtp-Source: AJdET5ek/Nqi5OmdvH2lsDvbsku7f14QzmNTZhDKdMv2z3th5wKk0YllL1+0IJOX+JtZISwP/xjJqQ== X-Received: by 2002:a63:aa48:: with SMTP id x8-v6mr13525222pgo.87.1541239820523; Sat, 03 Nov 2018 03:10:20 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:10:20 -0700 (PDT) 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 Subject: [PATCH 08/10] dt-bindings: panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel Date: Sat, 3 Nov 2018 15:38:58 +0530 Message-Id: <20181103100900.30313-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_061033_231718_61057035 X-CRM114-Status: GOOD ( 14.69 ) 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 Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel. Add dt-bingings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- .../display/panel/feiyang,fy07024di26a30d.txt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt diff --git a/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt b/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt new file mode 100644 index 000000000000..82caa7b65ae8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.txt @@ -0,0 +1,20 @@ +Feiyang FY07024DI26A30-D 7" MIPI-DSI LCD Panel + +Required properties: +- compatible: must be "feiyang,fy07024di26a30d" +- reg: DSI virtual channel used by that screen +- avdd-supply: analog regulator dc1 switch +- dvdd-supply: 3v3 digital regulator +- reset-gpios: a GPIO phandle for the reset pin + +Optional properties: +- backlight: phandle for the backlight control. + +panel@0 { + compatible = "feiyang,fy07024di26a30d"; + reg = <0>; + avdd-supply = <®_dc1sw>; + dvdd-supply = <®_dldo2>; + reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD24 */ + backlight = <&backlight>; +}; From patchwork Sat Nov 3 10:08:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10666617 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 B7F9F14BD for ; Sat, 3 Nov 2018 10:48:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A74B62979A for ; Sat, 3 Nov 2018 10:48:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 976872ABF8; Sat, 3 Nov 2018 10:48:44 +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 D60762979A for ; Sat, 3 Nov 2018 10:48:43 +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=N2EyB6PxX7BW326DWEm0n2lqyXyRnEz/NukmumU8J0o=; b=S3QeJ73i1R0/VZ gZ3duyqdrgdTXSHtcgtVyFesv94xHZT5ghQGIpgevByc6MsJiVhjmIFYeuAYPEqxfHJKJc1JxnhF/ mS6HhEUVP7Sa6IIOpuUb7VBBy7CgsTGa61tYsnkuOb8seWkxHa77lRhXtvKvaoEiOiOYib9BEV6wX QHpWsTvRk6GI7M6w9rcCEUlIgowSXdOc+Mbr+ua8aQW9CgmAo6U9QudTr7pn1GCLCW4oSsxXfBtdh Xn+JEt/PaSZYYH1uJQOIhbWW+4OeNoXCTKV1yDhD9cPxBvGFslTA+FRa3j4DNZlKcmYaVOY2updLw NZ7R+rqEimbkF+SBE0vQ==; 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 1gItTo-0001i1-IG; Sat, 03 Nov 2018 10:48:36 +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 1gItTh-0001ZW-Am for linux-arm-kernel@bombadil.infradead.org; Sat, 03 Nov 2018 10:48:29 +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=4ids294jU6qsAEweKZRB3L5rLwgsSdz3bXnoU3xy4P0=; b=u3DF7k1iw6tiyoN+vgkf4GI/Rk 50OZ4aYrNjtB4nNDHuuIEvWyGdqA2VOKxrmkHZruyNKp2sOc2IKJv4nzUlbFD/8P4lIDNbUpsdGU8 Z2gURarJub7pBLPQpxeIaWLcHEArMjzxLgf3IxCpqFzCQnzqhYxl+GpKyLQfjBbT0zVoB1KCy96Fk SwWtHb56Otj1+LPsz05vOC0fFDbE6B+KtE1jie+jb+0NyZVR/SmuTiWIcw9Mw2wgMqHZN/Jgy0kNT NJA9UG+s+olq99w6b8vQBLTFgSxDoi5q/6FqGybaQIz2ow1h83KC9F8RBggFbWJVMwFW79nd6oKGp 1aC/Z1wA==; 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 1gIssz-0008SF-56 for linux-arm-kernel@lists.infradead.org; Sat, 03 Nov 2018 10:10:34 +0000 Received: by mail-pg1-x543.google.com with SMTP id f8-v6so2058678pgq.5 for ; Sat, 03 Nov 2018 03:10:30 -0700 (PDT) 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=4ids294jU6qsAEweKZRB3L5rLwgsSdz3bXnoU3xy4P0=; b=BcEXUJIcJsZeymbde0E/t1Y/eLV/cY8s5ACKk/HUiz278ioOxy7N8sIoB80BFhFAyG 5ilFJXTUHTcuuacvPGCc4e4QZvKv0iwTzRG9gaK4gmVFhv65fhcY/ConvifrVvW0C70+ G0KWb6bLVf9B/t0W5DWPk1hHNXsrn+SRmXGHk= 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=4ids294jU6qsAEweKZRB3L5rLwgsSdz3bXnoU3xy4P0=; b=bY33IgoyHSvC28aHUDS8CyEuLrpCOrDyBaDBprlj393SelK04k0HGcM0iU0n29DyQW imVFgY1f4ZbrFcTXgpo1MSV0xd3vx7XcmMhpOKfnXh6C5vf77ucXNQXZNSmiEzvjjUN/ Ui6fClETza0zIgQ9dgMWP0QkHSaNSUdyKdVm+O5Ye0qbDkGKbKYfwxxrE3HNQRsEZCzX s/6FoAvJUc5dh9A95pQ4cDHeagkZio2XR5nm/EPOV9+6S/KHizENMwiIBgTrbAW/fBK/ FaltTl8wqFyqPKTVGu9xzrSQIIBYaF+gKQf6PtoVof6A2gZsqlDZ69cLrm4hCXK7wi7x gn1A== X-Gm-Message-State: AGRZ1gJtWIgE9Lt92o30+KF7N8xTJrJHo+CK/XZ6n2+3vQ+/hBbCsUAq zowRRBxoFywsi8nOvyPAb9KPlg== X-Google-Smtp-Source: AJdET5cT674/atl1lcF71ZtQzrNLCFGRNxOglAvYal+O+NTCCOsM9qoYXd9MgHoR8f+HP5gBkpjd8A== X-Received: by 2002:a63:da14:: with SMTP id c20mr13334033pgh.233.1541239828091; Sat, 03 Nov 2018 03:10:28 -0700 (PDT) Received: from localhost.localdomain ([2405:204:6094:3f7a:ed0a:fb74:1220:defe]) by smtp.gmail.com with ESMTPSA id z79-v6sm28466823pfl.33.2018.11.03.03.10.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 03:10:27 -0700 (PDT) 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 Subject: [PATCH 09/10] drm/panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel Date: Sat, 3 Nov 2018 15:38:59 +0530 Message-Id: <20181103100900.30313-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181103100900.30313-1-jagan@amarulasolutions.com> References: <20181103100900.30313-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181103_061033_233029_5C52019C X-CRM114-Status: GOOD ( 24.69 ) 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 Feiyang FY07024DI26A30-D is 1024x600, 4-lane MIPI-DSI LCD panel. Add panel driver for it. Signed-off-by: Jagan Teki --- Note: init sequence is referenced from https://github.com/longsleep/linux-pine64/blob/pine64-hacks-1.2/drivers/video/sunxi/disp2/disp/lcd/mb709_mipi.c drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-feiyang-fy07024di26a30d.c | 305 ++++++++++++++++++ 3 files changed, 315 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d0d4e60f5153..bc70896fe43c 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -47,6 +47,15 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_FEIYANG_FY07024DI26A30D + tristate "Feiyang FY07024DI26A30-D MIPI-DSI LCD panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Feiyang FY07024DI26A30-D MIPI-DSI interface. + config DRM_PANEL_ILITEK_IL9322 tristate "Ilitek ILI9322 320x240 QVGA panels" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 88011f06edb8..e23c017639c7 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o obj-$(CONFIG_DRM_PANEL_BANANAPI_S070WV20_ICN6211) += panel-bananapi-s070wv20-icn6211.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c new file mode 100644 index 000000000000..718631a72d8b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c @@ -0,0 +1,305 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +/* + * Copyright (C) 2018 Amarula Solutions + * Author: Jagan Teki + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include