From patchwork Fri Feb 1 15:42:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10792973 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 71A3E159A for ; Fri, 1 Feb 2019 15:42:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 608873220B for ; Fri, 1 Feb 2019 15:42:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 542653237C; Fri, 1 Feb 2019 15:42:51 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA39B3220B for ; Fri, 1 Feb 2019 15:42:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbfBAPms (ORCPT ); Fri, 1 Feb 2019 10:42:48 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34557 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfBAPms (ORCPT ); Fri, 1 Feb 2019 10:42:48 -0500 Received: by mail-lj1-f195.google.com with SMTP id u89-v6so6228517lje.1 for ; Fri, 01 Feb 2019 07:42:46 -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=cX9BCqEMHQCHAsrFYobLewx1bc2r/y4XH0JrehpkNwQ=; b=FwxziL6YDddDrG61jfPHgvFaJd87cBPOW3CRbYGHFBfDrM1oRDhq4vhEY1PJJ/UYyJ bkPn8082W9QCvBDVGV5vOfvJ5Er9NngoWGLfoyUd2Lp5VPWw2fWm8X0SORDRauRjEpsp YUDKEyrN0SHFzni0QlMzJilLjLpgN2FCd/v4s= 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=cX9BCqEMHQCHAsrFYobLewx1bc2r/y4XH0JrehpkNwQ=; b=q50xXsx3XiMdCdoDpOS1LUmXOLKjeQQY84tLX75tEISDF04q7qM27oSRr/qxsQhM58 BIXHhwLB34Cy+TfF6rYPSdyDFEJsQJiH6YUwCMmYcLN9JxMK7BJMVkiWWvfoJkBgGpS5 4rb4M9hGzV7H7n1xsapH7KI6kHjBNlW8YcVu7KwI46aiHVEXRhT3AIrZL9pefe72B8XV G7Y3jenvyq74eMP6sr0fdeTnq+zctyvguorMEmjSUjkcoQlPNaQ3v7Cum6j2xhZhZ5Cw irjRatn7hunbWnvYIXYYCVJBpfrRAApyt44LIPaSijYjm4YiURN7V46jk7TD79x9ZUE9 znLA== X-Gm-Message-State: AJcUuke6yoKwSNVMpkolhfOfgCwt9XxalpyyJOESjLxSxsnONwLH0jr0 ZdP/eb5cJ43AW35eUXUFDrKW0g== X-Google-Smtp-Source: ALg8bN6kVB2Bdfh3cgksQB9MNbY1YwvZ83JikXHWf0FItNqeYebHwStbdzp+0p0qdcqDmysVQ2dxag== X-Received: by 2002:a2e:4c0a:: with SMTP id z10-v6mr31858340lja.85.1549035765991; Fri, 01 Feb 2019 07:42:45 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:42:45 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 01/23] drm/sun4i: sun6i_mipi_dsi: Compute burst mode loop N1 instruction delay Date: Fri, 1 Feb 2019 21:12:10 +0530 Message-Id: <20190201154232.10505-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Loop N1 instruction delay varies between burst and non-burst video modes. 1) for burst mode panels it is computed based on the panel pixel clock along with horizontal sync and porch timings. 2) for non-burst mode panels, it is same as existing (50 - 1) Reference code is available in BSP (from linux-sunxi 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; This patch add loop N1 computation for burst mode by simplifying existing code to support all possible modes. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index e3b34a345546..a5fcee750bee 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -354,6 +354,24 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi, SUN6I_DSI_INST_JUMP_CFG_NUM(1)); }; +static u16 sun6i_dsi_setup_inst_delay(struct sun6i_dsi *dsi, + struct drm_display_mode *mode) +{ + struct mipi_dsi_device *device = dsi->device; + u32 hsync_porch, dclk; + u16 delay; + + hsync_porch = (mode->htotal - mode->hdisplay); + dclk = (mode->clock / 1000); + + if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) + delay = ((hsync_porch * 150) / (dclk * 8)) - 50; + else + delay = 50 - 1; + + return delay; +} + static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { @@ -383,7 +401,7 @@ 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; + u16 delay = sun6i_dsi_setup_inst_delay(dsi, mode); regmap_write(dsi->regs, SUN6I_DSI_INST_LOOP_NUM_REG(0), SUN6I_DSI_INST_LOOP_NUM_N0(50 - 1) | From patchwork Fri Feb 1 15:42:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10792979 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 BA745159A for ; Fri, 1 Feb 2019 15:42:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABB403220E for ; Fri, 1 Feb 2019 15:42:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F91C322CE; Fri, 1 Feb 2019 15:42:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7EED32332 for ; Fri, 1 Feb 2019 15:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727742AbfBAPmx (ORCPT ); Fri, 1 Feb 2019 10:42:53 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34220 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727685AbfBAPmv (ORCPT ); Fri, 1 Feb 2019 10:42:51 -0500 Received: by mail-lf1-f66.google.com with SMTP id p6so5415626lfc.1 for ; Fri, 01 Feb 2019 07:42:50 -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=KSKVSjXuDqX8qVP7wbNkntCeAwoHR9UN0XE4gqIgPW0=; b=a6XRj6mcKzdddh9NgF8xjIWhC6Pxg3NCcHQ0ThD3sb6SPtVIm6gWJxvP3O998vZPbV uWHr31dWA4d384palxO0CBW1rzlT+uCPKakDnEjb5mQlbLhaAhcH3ZBEcA9OYgoczKGf cdp2PtfXGzhu9DkpSQ4GGc8Ng8RTWxxHN6QDc= 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=KSKVSjXuDqX8qVP7wbNkntCeAwoHR9UN0XE4gqIgPW0=; b=DQ6niM9gYzS8hakWore01QVN3C9IDtoD8FVOGMfCCb6a3NrsOFD1GKgbIl7KdZdDlF 7Jwt4Rv5+JPYT1aC6W2YZHKj8CIN1VhlqQIKFziEbloMl96OJnkX0oLv5l+GIjzuR0Wk DXkwq1xICcy/V6nNqOpAQkFjmwWG0G2QCJT7TKJj7SnIKnh+aBqxupxFLOW1c1DDbOeu 2MfFRO6DqoZFc03BBoN7K2AGOhs2evQ4DWgGCpMrLFEd6YBXciv8vN4ZoLeu7Yoj2doq P8JZGGU3pOT9Q3d9Ed10SopGRSc4GQcviymT2WCOaqAJKqVJOQo/fECdEXI15a4QdQRr BiTQ== X-Gm-Message-State: AJcUukdMyDq67TCURSdI0zlRs2nPrcOOuPuJBYAZga/vdh/kTnEWHT9Y gznxaadZrYp49ghSQxKxQsVoYw== X-Google-Smtp-Source: ALg8bN69BbOfJ2VajX52TeZC1kbyZ8eT25C4noLsYruftgcvouYiue/ElAIGOlEuYE0hTGFw+X3WtA== X-Received: by 2002:a19:59c2:: with SMTP id n185mr30250576lfb.118.1549035768170; Fri, 01 Feb 2019 07:42:48 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:42:47 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 02/23] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Date: Fri, 1 Feb 2019 21:12:11 +0530 Message-Id: <20190201154232.10505-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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 (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 Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index a5fcee750bee..813d5523f1c7 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -403,6 +403,9 @@ static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, { u16 delay = sun6i_dsi_setup_inst_delay(dsi, mode); + regmap_write(dsi->regs, SUN6I_DSI_INST_LOOP_SEL_REG, + DSI_INST_ID_HSC << (4 * DSI_INST_ID_LP11) | + DSI_INST_ID_HSD << (4 * DSI_INST_ID_DLY)); regmap_write(dsi->regs, SUN6I_DSI_INST_LOOP_NUM_REG(0), SUN6I_DSI_INST_LOOP_NUM_N0(50 - 1) | SUN6I_DSI_INST_LOOP_NUM_N1(delay)); From patchwork Fri Feb 1 15:42:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10792983 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 27422186E for ; Fri, 1 Feb 2019 15:42:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 187DD3220B for ; Fri, 1 Feb 2019 15:42:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C4B5322CE; Fri, 1 Feb 2019 15:42: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 861D3322E3 for ; Fri, 1 Feb 2019 15:42:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727871AbfBAPmx (ORCPT ); Fri, 1 Feb 2019 10:42:53 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:40847 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727728AbfBAPmw (ORCPT ); Fri, 1 Feb 2019 10:42:52 -0500 Received: by mail-lj1-f194.google.com with SMTP id n18-v6so6167625lji.7 for ; Fri, 01 Feb 2019 07:42:50 -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=9CvRh+lhKmHHKkuw4aE/avnLB9iVsPqvkmbgt9/tcc0=; b=Cl9237ZmhAZM+nDRRTR+SVUVYqvlUfgRSp9sa5t8N1qJ5ZA805AQ4tH+TD7ztwLWST 8x6nY5+r5Pg0cMmfgZQVhcedaM/NkT/5dX7jnxyrWO+XZyldYrdoqzcVr1Q4rZigE6uF af11TT8DYsZHj3gAuQ8EW1bPaTFA1jP5IDPWM= 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=9CvRh+lhKmHHKkuw4aE/avnLB9iVsPqvkmbgt9/tcc0=; b=X4rIxUuzi+VJoaSS0S/pwwureIdNOSkb34rTOFK0npQ4lbbkmFet30G/5J1WaGtxnX zegdaSU0UcIqYW6Kan6RdUHSRgqVskEIMqEBu3b75Ss8yfvm7Uu6UEMi+aNu1oX2R4a/ HYTvG833NAvExHht9rPhIhNpuzJcfbPDQVKR6tsjavNt7BF10N7aYJdfj0GnlK5z0NLf Fk1qigFdUSq74aGaQh1W4ox4yND4N83efZDCjhTMZ+rZW8dTD5ooybqoBWQ/kETWcae1 HLRBMrLdegcDOWMRQmidFcAlKRb3cgLaYP4z4fBG5dakBGb9gaE5I63S+quLACFFeQoX 3oeQ== X-Gm-Message-State: AHQUAuZfjipaoFl2CIs/Gc/ta8c2Vb9ZvFV1N8EAiWTXujE373Q/+xUU UEmvYYztaypygdwpoaDGxYfUhQ== X-Google-Smtp-Source: AHgI3IZSyZEjd/uuBNj8z5Gb1VKqc7/TdJVgFfWgCLRelTrh4xlWzq2odByzPCLT+9+tpu16YiiYYA== X-Received: by 2002:a2e:9ad0:: with SMTP id p16-v6mr6897329ljj.102.1549035769983; Fri, 01 Feb 2019 07:42:49 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:42:49 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 03/23] drm/sun4i: sun6i_mipi_dsi: Setup burst mode timings Date: Fri, 1 Feb 2019 21:12:12 +0530 Message-Id: <20190201154232.10505-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Burst mode display timings are different from conventional video mode. For burst mode most of the timings hsa, hbp, hfp, vblk are 0 and hblk is computed as (mode->hdisplay * Bpp) This patch simply add burst mode timings without touching existing mode timings. Reference code taken from BSP (from linux-sunxi/ 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 Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 813d5523f1c7..0f02bcc997a5 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -477,6 +477,12 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, /* Do all timing calculations up front to allocate buffer space */ + if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) { + hbp = hfp = hsa = vblk = 0; + hblk = (mode->hdisplay * Bpp); + goto alloc_buf; + } + /* * A sync period is composed of a blanking packet (4 bytes + * payload + 2 bytes) and a sync event packet (4 bytes). Its @@ -515,6 +521,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, */ vblk = 0; +alloc_buf: /* How many bytes do we need to send all payloads? */ bytes = max_t(size_t, max(max(hfp, hblk), max(hsa, hbp)), vblk); buffer = kmalloc(bytes, GFP_KERNEL); From patchwork Fri Feb 1 15:42:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10793113 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 0C32913B4 for ; Fri, 1 Feb 2019 15:47:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7B0A3220B for ; Fri, 1 Feb 2019 15:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAF83322C2; Fri, 1 Feb 2019 15:47:31 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FC4E3220B for ; Fri, 1 Feb 2019 15:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729564AbfBAPrY (ORCPT ); Fri, 1 Feb 2019 10:47:24 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:38940 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727743AbfBAPmy (ORCPT ); Fri, 1 Feb 2019 10:42:54 -0500 Received: by mail-lf1-f68.google.com with SMTP id n18so5375729lfh.6 for ; Fri, 01 Feb 2019 07:42:52 -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=TFKtwWbXDyUWT8qfJQdNKmTE4M3/0ezirQXsds5l2UY=; b=TFDss/RbpOFlaY0pWWUTNxWwScvM6xjusFKv0iPtef7zFK/kvLYAlgDybWbhac398K fSO9j4Q92zuJCwOI0Bf2W4fgV2Ru6//VyG8oEMG+cr3hml2NaPvTD4x/Sbd2YhDxcSQt YYqXzbcdn3lxNnXm0Ezdev5F1ZXUBfEZWAQw0= 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=TFKtwWbXDyUWT8qfJQdNKmTE4M3/0ezirQXsds5l2UY=; b=AVeK2Qcql/CImLJwb6tBfNx1aGH+ReoOUaqUsNrjV4trZ/nhFMYwyHBOcEtmoCrG/+ bOhWZKQl6p89NixYBL170hFWAcXaZMzClMTXnu3qw0aAtRIwDT7dJPHqkFTjNdkJ+/P+ K0m9n6bdyetkFeID0FoOj9nf6tCEPW328Pk73+ajhcJ52ACfPd7nQK9UXekpQSzdb9X+ qXNBlkkuHQmnOcbJpMlb5p6RDn0hPQlxWBX9waXBTIyBavGvHRnw+k3Er80umvnRo6Tn j3PPsHBeZswFVS8I4pReJXPugAS5FOLgi9FtelB5/wDmjoUFUQpP5zykhUxA6lUKXC1m oMIw== X-Gm-Message-State: AHQUAuaeB0j1GM5NQ7m+GBv6g0nTrNGvvuloFeeg/8TlI8yyg72YJFzP uvkqr3JBx+cq+LwweO8rapqXVg== X-Google-Smtp-Source: AHgI3IZ0Z2Ru8GyS56Z09JmdGKrORyR6EsHkGG9PJJ1Tsacbdb7LlqphoL23RjCgnvd1ilES3r1KVA== X-Received: by 2002:ac2:4254:: with SMTP id m20mr354627lfl.131.1549035772005; Fri, 01 Feb 2019 07:42:52 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:42:51 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 04/23] drm/sun4i: sun6i_mipi_dsi: Simplify drq to support all modes Date: Fri, 1 Feb 2019 21:12:13 +0530 Message-Id: <20190201154232.10505-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allwinner MIPI DSI drq has enable mode bit and set bits. 1) drq for non-burst, with front porch less than 20 would need to set both enable mode bit and set bits. 2) drq for non-burst, with front porch greater or equal to 20 would not require to do any drq bit setup. 3) drq for burst mode, would only need to set enable mode bit. This patch simplifies existing drq code by grouping into sun6i_dsi_get_drq and support all video modes. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 39 ++++++++++++++++---------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 0f02bcc997a5..16a86d35dc5a 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -354,6 +354,28 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi *dsi, SUN6I_DSI_INST_JUMP_CFG_NUM(1)); }; +static int sun6i_dsi_get_drq(struct sun6i_dsi *dsi, + struct drm_display_mode *mode) +{ + struct mipi_dsi_device *device = dsi->device; + + if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) + return SUN6I_DSI_TCON_DRQ_ENABLE_MODE; + + 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; + + return (SUN6I_DSI_TCON_DRQ_ENABLE_MODE | + SUN6I_DSI_TCON_DRQ_SET(drq)); + } + + return 0; +} + static u16 sun6i_dsi_setup_inst_delay(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { @@ -381,21 +403,8 @@ static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, static void sun6i_dsi_setup_burst(struct sun6i_dsi *dsi, struct drm_display_mode *mode) { - struct mipi_dsi_device *device = dsi->device; - u32 val = 0; - - if ((mode->hsync_end - mode->hdisplay) > 20) { - /* Maaaaaagic */ - u16 drq = (mode->hsync_end - mode->hdisplay) - 20; - - drq *= mipi_dsi_pixel_format_to_bpp(device->format); - drq /= 32; - - val = (SUN6I_DSI_TCON_DRQ_ENABLE_MODE | - SUN6I_DSI_TCON_DRQ_SET(drq)); - } - - regmap_write(dsi->regs, SUN6I_DSI_TCON_DRQ_REG, val); + regmap_write(dsi->regs, SUN6I_DSI_TCON_DRQ_REG, + sun6i_dsi_get_drq(dsi, mode)); } static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi, From patchwork Fri Feb 1 15:42:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10793109 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 E4EB2159A for ; Fri, 1 Feb 2019 15:47:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D618F3220E for ; Fri, 1 Feb 2019 15:47:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA60A322C2; Fri, 1 Feb 2019 15:47:22 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 444873220E for ; Fri, 1 Feb 2019 15:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729210AbfBAPrV (ORCPT ); Fri, 1 Feb 2019 10:47:21 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42203 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728291AbfBAPmz (ORCPT ); Fri, 1 Feb 2019 10:42:55 -0500 Received: by mail-lj1-f194.google.com with SMTP id l15-v6so6158790lja.9 for ; Fri, 01 Feb 2019 07:42:54 -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=TH0lXAyrlRomYAB02Yycn9wsztLPFIbpq6Vqme/PXxg=; b=h8baJeh8eqxrIVootpLq2OYoRrmsbDASLzW6ZqrWxBZSKlWAQh7NWC0OVPOuqCu8mB MWEfYfZw1kebF0iHaX90L4thZQPmL58v592JE2OJ7qGXB/uAShdRezQsfWtRVRBqPp4j zACYt6d2b3yNL8oHExk3pfBTTduVNG8/CaW7I= 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=TH0lXAyrlRomYAB02Yycn9wsztLPFIbpq6Vqme/PXxg=; b=W01OlVy038n6uBeF3STwcVW2PgMF4HPEDW32K7bTJpXXUhSNqvihmn1Cg0+ZtmO4Sf mL0A6dh3UxZcu3Mq7YNRb+IyJRrQCEzVCkKQjdpNSWCEPNF4HyOrmg+ZJfos/9KS+on8 4Fqq91d+1MjMC2Z1KgZfjWgq6NltYolI8NPZCsD0CR1cEOFdpXN/jV4Bf8FLoFtZZse9 MGbfLD/fifPLKOFiKtIBM6R1gSStZr+1w+GK4UW+dxx+IciG8F3pHpG32XFBBFd7NgWm TFYZSGzsFD/GJoJPZ4Ncu/JFC9l8B64WQUKBmaHjONHWavdtjox7frh6vdz0KMTiD/uJ GTng== X-Gm-Message-State: AJcUukeCdLZ8v3Ns8BPPBDmwI5a4uUJL6P//XbKlL8DoCSpQWt8qFxnl 78EnwjGKB8waPtzCGXCi4HlxBA== X-Google-Smtp-Source: ALg8bN5UdmzEooJr/VOlZo7l7VOObC/P0rkzz7HNwWOblM5sif7MlFRwx/aytTeQBHAxsLn/zfJv6g== X-Received: by 2002:a2e:3803:: with SMTP id f3-v6mr32242287lja.169.1549035773896; Fri, 01 Feb 2019 07:42:53 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:42:53 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 05/23] drm/sun4i: tcon: Export get tcon0 routine Date: Fri, 1 Feb 2019 21:12:14 +0530 Message-Id: <20190201154232.10505-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sometimes tcon attributes like tcon divider, clock rate etc are needed in interface drivers like DSI. So for such cases interface driver must probe the respective tcon and get the attributes. Since tcon0 probe is already available, via sun4i_get_tcon0 function, export the same instead of probing tcon explicitly. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 0420f5c978b9..3da75a0c5c5d 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -221,7 +221,7 @@ EXPORT_SYMBOL(sun4i_tcon_enable_vblank); * are located in TCON0. This helper returns a pointer to TCON0's * sun4i_tcon structure, or NULL if not found. */ -static struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm) +struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm) { struct sun4i_drv *drv = drm->dev_private; struct sun4i_tcon *tcon; @@ -235,6 +235,7 @@ static struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm) return NULL; } +EXPORT_SYMBOL(sun4i_get_tcon0); void sun4i_tcon_set_mux(struct sun4i_tcon *tcon, int channel, const struct drm_encoder *encoder) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h index b5214d71610f..a52696db14a5 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -274,6 +274,7 @@ struct sun4i_tcon { struct drm_bridge *sun4i_tcon_find_bridge(struct device_node *node); struct drm_panel *sun4i_tcon_find_panel(struct device_node *node); +struct sun4i_tcon *sun4i_get_tcon0(struct drm_device *drm); void sun4i_tcon_enable_vblank(struct sun4i_tcon *tcon, bool enable); void sun4i_tcon_mode_set(struct sun4i_tcon *tcon, const struct drm_encoder *encoder, From patchwork Fri Feb 1 15:42:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10793107 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 038FF13B4 for ; Fri, 1 Feb 2019 15:47:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6FDD322BE for ; Fri, 1 Feb 2019 15:47:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB0E0322C4; Fri, 1 Feb 2019 15:47:18 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D0D8322C2 for ; Fri, 1 Feb 2019 15:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729425AbfBAPm7 (ORCPT ); Fri, 1 Feb 2019 10:42:59 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34568 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728755AbfBAPm5 (ORCPT ); Fri, 1 Feb 2019 10:42:57 -0500 Received: by mail-lj1-f195.google.com with SMTP id u89-v6so6228987lje.1 for ; Fri, 01 Feb 2019 07:42:56 -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=Yb+noxi69zQOu7k+JslI3G7pP5MYsH91QeSM30jJfwQ=; b=APv9oV/PqBKX0Lnwopd7p67DYrueF3honf/B8EziKXHh/Pt43sjd8oCsTgEzAwfgvk jDp527SdJ5xe54oX7Mjh0paH9byvjdEto5uUyGATHDr+VYO7Md1dQM78a/FDZCYeLBTw geL1BHYUl1a/vm1clYe/NzkUnlcfXQzNR09Jw= 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=Yb+noxi69zQOu7k+JslI3G7pP5MYsH91QeSM30jJfwQ=; b=nonm0t8ltf2btsrMHz8JUM64iSaipEDWNzaWQXju9Mfq4g7okD3zrM2+SphwkENtJo 5JpOHU4T1Ng/KuQXEdcyAnnl9YUAV0BjHP+9ya+ZjPK8cE2ywC+EhgccgB/xYsA6epqR FniEJYClfSKCyEIzti2u0EB+W7/TIpgf07ktb/E2Zo1NZyEfjgYOG7RQdoVO/WmVnhVy 4vS3Vx3qUr9empgM/Mei1AMKAJAZ8MWmnE45EbSKrKNJ1TQoj3B9WSUw82DCUElWBvMN FS495rjn2YPnniMWZfvNRNPNTYgdyt0syFZwVCh48Lr3YYYKdJK4Yly2EGj4OgXLvckz lG6Q== X-Gm-Message-State: AJcUukfd5K608LJ/qgR3x+3EbHyK91NOJndOMdloJLIGqoFKbaYUxuWU Y/Lno5m61NO4wUHoS53mOi1YFg== X-Google-Smtp-Source: ALg8bN7/wQSinHisGGaql3kcec2ekLGLreLus3/j+iTO/2x/47Ych+ECPa4/rLbZskFzRIzooYX1ZQ== X-Received: by 2002:a2e:974a:: with SMTP id f10-v6mr34782408ljj.61.1549035775668; Fri, 01 Feb 2019 07:42:55 -0800 (PST) Received: from localhost.localdomain ([217.76.202.68]) by smtp.gmail.com with ESMTPSA id i13-v6sm1305712ljg.82.2019.02.01.07.42.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 07:42:54 -0800 (PST) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , Michael Turquette , Rob Herring , Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi , linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki Subject: [PATCH v7 06/23] drm/sun4i: sun6i_mipi_dsi: Probe tcon0 during dsi_bind Date: Fri, 1 Feb 2019 21:12:15 +0530 Message-Id: <20190201154232.10505-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> References: <20190201154232.10505-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Probe tcon0 during dsi_bind, so-that the tcon attributes like divider value, clock rate can get whenever it need. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++++++ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 16a86d35dc5a..2aeaa19a8d1e 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -24,6 +24,7 @@ #include #include "sun4i_drv.h" +#include "sun4i_tcon.h" #include "sun6i_mipi_dsi.h" #include