From patchwork Fri Oct 27 20:27:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10030627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4F8F6034B for ; Fri, 27 Oct 2017 20:28:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A71828FD9 for ; Fri, 27 Oct 2017 20:28:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EDF528FDD; Fri, 27 Oct 2017 20:28:21 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 C061228FD9 for ; Fri, 27 Oct 2017 20:28:20 +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-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UboFRKwRBtv27mK049H/n1eLconrapy9xEd6faXuKm4=; b=krFqVGqvHxmwg1WECMcT1jIem jIqqZ6ydH2vFZIBkHXewFAGa/JHhbdFLdSGliL/3Vuk7YEbt9XFtvHWRgAazIQIklUYCP2Vy68f9D cmCnoaW/VqdMn2+4q1t/kB65tW4LD4ZLuERbghGWW+2uicOILVmK2eupIoKciuuYoxkSVXDmDZl1d 1bfs9s/fRsoYfjYoL7dgJvsJAzuizHRx02E/RW4M/RvmXHGo2DwCwsZUIKKi2XkWCzUY0pgYGWgAw 14bNe5gKHvGM7tLDdpBSUYEKXUyMYxi2rkcE1BKR6D4Yd0bZ04q1e40z9qQrpqNIHug/7t4PePwx2 Pk1w0iHpw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e8BEg-0006yw-P5; Fri, 27 Oct 2017 20:28:10 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e8BEc-0006wb-PS for linux-arm-kernel@lists.infradead.org; Fri, 27 Oct 2017 20:28:09 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 0806E82417; Fri, 27 Oct 2017 22:27:43 +0200 (CEST) Date: Fri, 27 Oct 2017 22:27:43 +0200 From: Pavel Machek To: Sebastian Reichel Subject: Backlight on Nokia N900 was Re: 4.13 (and probably all recent) kernels refuse to boot on one Nokia N950, work or another Message-ID: <20171027202743.GA17874@amd> References: <20171025203459.GA22035@amd> <20171025212806.GA21504@atomide.com> <20171026091325.GA26929@amd> <20171026093115.4bc6ctxjx72ng7ld@earth> MIME-Version: 1.0 In-Reply-To: <20171026093115.4bc6ctxjx72ng7ld@earth> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171027_132807_154941_D08B2E37 X-CRM114-Status: GOOD ( 18.18 ) 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: ivo.g.dimitrov.75@gmail.com, khilman@kernel.org, Tony Lindgren , aaro.koskinen@iki.fi, kernel list , martijn@brixit.nl, filip.matijevic.pz@gmail.com, abcloriens@gmail.com, sakari.ailus@linux.intel.com, pali.rohar@gmail.com, clayton@craftyguy.net, linux-omap@vger.kernel.org, patrikbachan@gmail.com, linux-arm-kernel , serge@hallyn.com 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 Hi! > > I got "uncompressing Linux 4.13" on serial console now, debug LEDs > > blinking, and if I use a flashlight, I see output on the screen, too. > > > > (What do I need to do to get the backlight working?) > > Glad you got it working :) For backlight you can add this > in drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c: > > add the following code at the end of dsicm_probe: > > ----------------------------------------------------------- > mutex_unlock(&ddata->lock); > mutex_lock(&ddata->lock); > ddata->in->ops.dsi->bus_lock(ddata->in); > r = dsicm_wake_up(ddata); > if (!r) > r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100); > ddata->in->ops.dsi->bus_unlock(ddata->in); > mutex_unlock(&ddata->lock); > ----------------------------------------------------------- Ok, I tried that, and did not help. I also tried removing first mutex_unlock(), since that's unbalanced and strange. Did not work. So I commented it out with #if 0, and tried more hacks, but no luck :-(. (I still see the display.. but no backlight so reading it is .. difficult.) Best regards, Pavel diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 8f74633..c0bbb42 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -668,6 +668,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) goto err; r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff); + mdelay(1000); if (r) goto err; @@ -703,6 +704,8 @@ static int dsicm_power_on(struct panel_drv_data *ddata) in->ops.dsi->enable_hs(in, ddata->channel, true); + r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 0xff); + return 0; err: dev_err(&ddata->pdev->dev, "error while enabling panel, issuing HW reset\n"); @@ -1396,6 +1399,15 @@ static int dsicm_probe(struct platform_device *pdev) goto err_bl; } +#if 0 + mutex_lock(&ddata->lock); + ddata->in->ops.dsi->bus_lock(ddata->in); + r = dsicm_wake_up(ddata); + if (!r) + r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, 100); + ddata->in->ops.dsi->bus_unlock(ddata->in); + mutex_unlock(&ddata->lock); +#endif return 0; err_bl: