Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp649007ybh; Thu, 12 Mar 2020 08:35:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvm4KfBUd/Px/unDU6tGdAu93DEwwnNv0p7xSlI6nzG3trlKHmHDnIE8o95y90nINNh7BTR X-Received: by 2002:a9d:4542:: with SMTP id p2mr2218547oti.169.1584027312037; Thu, 12 Mar 2020 08:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584027312; cv=none; d=google.com; s=arc-20160816; b=jW3DC9YrpzQjKjvRoa0sfhHvC109YfXQGKSTwA3o1qWZqLsHCzk/hyeAmG9NtAVUOa NZ20XV21RFBe7GoIvpwPJjUvLeilPlPKYkTi0vDG06KWoXKNffdZfdvWtgphpLnc28jN eaKQjkUS/t3XN9IWx8Sr8Jyf4Zm8kiNOuuodLKpvE6x9WJvPLF2MpYFRgxxDGySESUeN w4pgHUijxv6AMWEjWiP+rJDJkhx+t7aVz0a1fdm1VxXKpw/oL/eUuM/7+QxNircTKvdU X6VL1YPKDVb1HFlo0nTWzFyQmYBkRj4rMv4jgy8MkaSDCt5IbNixI+0KDtBN/omGfcbb AD+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=J6aDQGjkdfrS52YkEz3ek5dt906Ty2Nt38vKTDhn80w=; b=l/400pcObGaShe12UkPh6qsPvts6La/BRK0/uiBR02TsibKZeEfEngiBqRr2gRs2LC 5IWbD9jEHPs82MTXRzbpBf2G17JaQ7qTrveu68v3X0ueLXmGZg6sFhdizGIUHftHsy3g ozKqCW1qS9cUCcYUBAP8NGV8DD0nN6nvMJEOjLpYQufozSYaVb2sfx1SnuG/vEo1iKkf bEXMXDQWqQ9HZlDhtMHjkJSARME3M5eDbMDcH6JCsr9K7yHJqUbKOgYfxyRobq/ZmM6r Wr3SiT88vCAAwVRc09JoZL0HlT/DMZuV9rqUsRldvewkKJOhqUt2mZCdy8owALJ/gtwC eVAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pascalroeleven.nl header.s=x header.b=hG2lKuGO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pascalroeleven.nl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si176366oig.263.2020.03.12.08.34.59; Thu, 12 Mar 2020 08:35:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@pascalroeleven.nl header.s=x header.b=hG2lKuGO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pascalroeleven.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727790AbgCLPGU (ORCPT + 99 others); Thu, 12 Mar 2020 11:06:20 -0400 Received: from web0081.zxcs.nl ([185.104.29.10]:56548 "EHLO web0081.zxcs.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727133AbgCLPGU (ORCPT ); Thu, 12 Mar 2020 11:06:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pascalroeleven.nl; s=x; h=Message-ID:References:In-Reply-To:Subject:Cc:To: From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To :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=J6aDQGjkdfrS52YkEz3ek5dt906Ty2Nt38vKTDhn80w=; b=hG2lKuGOULLVa42qYNnOMiU+E+ 1fF6zxRYgwLngJMFHPGArXhjerUxJQ3plKRZCO5TSTnVi+2Q8tQ6C+C6aNn40pyjspW7YwCzKMQpp syAzO2hUtLaflC0V1kUwjCmFDeZWQlAgJ7edx0xUiyAyRK6Ve3MXMeFoqm/8SuhsGbjvvflanRDwi uJZM+RCzqt5AIQOpws1Wm09byjKK1YZDLkylSTk29ub38ToQxSkCbjKk9IDDgGd0OfMXuFUP4xsVe 79E3bHRr3rpcvkxTdxEe+saXneBo447d07pKSoi/9Akj0hMmJk75kVHMFuA+GZIae8997/r68Trkv 7nt7VLxQ==; Received: from spamrelay.zxcs.nl ([185.104.28.12]:47086 helo=mail-slave02.zxcs.nl) by web0081.zxcs.nl with esmtp (Exim 4.92.3) (envelope-from ) id 1jCPPT-002SyE-RZ; Thu, 12 Mar 2020 16:06:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 12 Mar 2020 16:06:07 +0100 From: Pascal Roeleven To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= Cc: Thierry Reding , Maxime Ripard , Chen-Yu Tsai , Philipp Zabel , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: pwm: sun4i: pwm-backlight not working since 5.6-rc1 In-Reply-To: <20200312132942.2kfspvmoc3mxkdx4@pengutronix.de> References: <6185b5540ca082d887d7d13330c9d938@pascalroeleven.nl> <20200312132942.2kfspvmoc3mxkdx4@pengutronix.de> User-Agent: Roundcube Webmail/1.4.2 Message-ID: <6e995c4c22c4e6c93acb1f491e5aa109@pascalroeleven.nl> X-Sender: dev@pascalroeleven.nl Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-03-12 14:29, Uwe Kleine-König wrote: > On Thu, Mar 12, 2020 at 01:22:13PM +0100, Pascal Roeleven wrote: >> Hi all, >> >> I am working on adding an old A10 device to mainline and noticed an >> issue >> when testing on 5.5.8 vs master. >> >> Since 5.6-rc1, I can't control the brightness of my LCD backlight >> anymore. >> The backlight stays on full brightness instead. I am controlling the >> brightness value via sysfs for testing. >> >> I am not sure if this is a general pwm-sun4i issue or if it is related >> to >> the backlight. However I narrowed it down to one commit for pwm-sun4i: >> >> fa4d81784681a26bcf7d2a43c6ac5cf991ef28f5 >> >> If I use pwm-sun4i.c from 5b090b430d750961305030232314b6acdb0102aa on >> master, the backlight works fine. Unfortunately, due to my lack of >> kernel >> experience, I can't see how the commit above broke it. > > Hmm, I cannot see how fa4d81784681a26bcf7d2a43c6ac5cf991ef28f5 breaks > this. Looking at the output of > > git show -b fa4d81784681a26bcf7d2a43c6ac5cf991ef28f5 > > (i.e. ignoring whitespace changes) I don't see how the behaviour you're > reporting can be explained. > > Are you sure that fa4d81784681a26bcf7d2a43c6ac5cf991ef28f5 is the bad > commit? > > Can you install a tool to inspect register values and check how the > affected registers change if you switch kernel versions and/or pwm > settings? > > (e.g. > memtool md 0x1c20e00+0xc > ) > > Best regards > Uwe Thanks for your response. Yes I am sure that is the commit. If I am on master, and replace pwm-sun4i.c with the one from 5b090b43, everything works. If I then apply fa4d8178, it stops working. And strangely the output of the registers is exactly the same before and after fa4d8178: 01c20e00: 00000050 00130014 00000000 (full brightness) 01c20e00: 00000050 00130006 00000000 (min brightness) Even when I'm on 5b090b43 and cherry-pick fa4d8178 can I reproduce the issue.