From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79323C43334 for ; Thu, 9 Jun 2022 18:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XBEyRuJg2JGGopvwF4NZLrKkJ7reo1koFVi0P084heo=; b=YGx3TULmYAYOSX 8av6yy38bBGHojWIaEO2ubU6ycMxL8JZeH2HP4xGEwymq9V0kMLsOB6TDGRUE39v7ZiZ/Mi4Z1WEK jW8YzUgvbmkkVrNyIMi1jNjhtLICMZqF/jTKZrMrWmyW/k1A9Xyv5P9XReMx8lMUWry6bvWXcWVZS cjH3OQ9OzV+o/6KnTHpP3880724rpvI60uyA8yb3+MP4q3YvjSJiqYm1LpXQhleNTMbmRjbw/QlpY 4Ub3pyhdwstBOOCNsGdo5btqIshPshcGIEv5IesohDMddyD0RsarKQ9w+pHkqrA0zxWfbTPEfUCor jpWBbgCTvmTIo7vLKsAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzNK2-003kPH-In; Thu, 09 Jun 2022 18:55:58 +0000 Received: from mailrelay4-1.pub.mailoutpod1-cph3.one.com ([46.30.210.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzNJy-003kLm-Le for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 18:55:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=jKbDcZ4FhDibO8JxQCv+QTocgVRW/U4XOgTC8XfUUug=; b=hB40xZ4hyPPam4Fq/YieoN0twbebpXGTVjxxVs1G+S+8a9iH9D8i0u3i+AMp8/RLibzAcma9Vlt7v VyO6DO4zilHHgBE2VUs2eADzCQ5C/q6dQqPCKNR4iCwX8ge4AdqSQkqi5sSjaapMCA7XLkmGPSY7sW epNdmDZ3KYvcvm5DO25vTWp9w/uRRpcYqwX12wYXCOO/IgXaIwiYYcPBqnB3nKlV9atmQM8kstFqwp tpSeGRj0hDrBQuiizXznNkHJ3TETssMxo//Rk6pbLM7V6caV93KqPdX/yHx3UQPQsKs8o1QtEqdWq7 jjGblP9Qw5uY2Mg3/ncc6DnA2XjU0ag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=jKbDcZ4FhDibO8JxQCv+QTocgVRW/U4XOgTC8XfUUug=; b=h+XYNB6d3kMH4x9JO6z2R7yz+scQXKcFoWGqN5h9JQ+W64bMGdDm5wYYLMKC72jEHdyxVuWYMau7f 8sh55jeCA== X-HalOne-Cookie: b7de46776df3454b5a3e685c6072709fa563f076 X-HalOne-ID: c0b9d5a1-e825-11ec-8231-d0431ea8bb10 Received: from mailproxy3.cst.dirpod4-cph3.one.com (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) by mailrelay4.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id c0b9d5a1-e825-11ec-8231-d0431ea8bb10; Thu, 09 Jun 2022 18:55:39 +0000 (UTC) Date: Thu, 9 Jun 2022 20:55:37 +0200 From: Sam Ravnborg To: Stephen Kitt Subject: Re: [PATCH v2] fbdev: atmel_lcdfb: Rework backlight status updates Message-ID: References: <20220609180440.3138625-1-steve@sk2.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220609180440.3138625-1-steve@sk2.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_115554_863842_5AABF3B5 X-CRM114-Status: GOOD ( 16.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Helge Deller , Alexandre Belloni , dri-devel@lists.freedesktop.org, Daniel Thompson , Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Stephen, thanks! On Thu, Jun 09, 2022 at 08:04:40PM +0200, Stephen Kitt wrote: > Instead of checking the state of various backlight_properties fields > against the memorised state in atmel_lcdfb_info.bl_power, > atmel_bl_update_status() should retrieve the desired state using > backlight_get_brightness (which takes into account the power state, > blanking etc.). This means the explicit checks using props.fb_blank > and props.power can be dropped. > > The backlight framework ensures that backlight is never negative, so > the test before reading the brightness from the hardware always ends > up false and the whole block can be removed. The framework retrieves > the brightness from the hardware through atmel_bl_get_brightness() > when necessary. > > As a result, bl_power in struct atmel_lcdfb_info is no longer > necessary, so remove that while we're at it. Since we only ever care > about reading the current state in backlight_properties, drop the > updates at the end of the function. > > Signed-off-by: Stephen Kitt > Cc: Nicolas Ferre > Cc: Helge Deller > Cc: Alexandre Belloni > Cc: Claudiu Beznea > Cc: linux-fbdev@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Cc: linux-arm-kernel@lists.infradead.org Acked-by: Sam Ravnborg Sam _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel