From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH v2 02/25] drm/panel: add backlight support Date: Fri, 13 Dec 2019 14:30:54 +0100 Message-ID: References: <20191207140353.23967-1-sam@ravnborg.org> <20191207140353.23967-3-sam@ravnborg.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191207140353.23967-3-sam@ravnborg.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Sam Ravnborg Cc: Neil Armstrong , David Airlie , "open list:DRM PANEL DRIVERS" , Thierry Reding , Laurent Pinchart , linux-samsung-soc , "open list:ARM/Rockchip SoC..." , Tomi Valkeinen , NXP Linux Team , Jagan Teki , Jitao Shi , Pengutronix Kernel Team , "moderated list:ARM/Mediatek SoC support" , Abhinav Kumar , linux-tegra@vger.kernel.org, Maxime Ripard , Sean Paul , Linux ARM , Purism Kernel Team , Linux-Ren List-Id: linux-tegra@vger.kernel.org On Sat, Dec 7, 2019 at 3:04 PM Sam Ravnborg wrote: > Panels often supports backlight as specified in a device tree. > Update the drm_panel infrastructure to support this to > simplify the drivers. > > With this the panel driver just needs to add the following to the > probe() function: > > err = drm_panel_of_backlight(panel); > if (err) > return err; > > Then drm_panel will handle all the rest. > > There is one caveat with the backlight support. > If drm_panel_(enable|disable) are called multiple times > in row then backlight_(enable|disable) will be called multiple times. > > The above will happen when a panel drivers unconditionally > calls drm_panel_disable() in their shutdown() function, > whan the panel is already disabled and then shutdown() is called. > > Reading the backlight code it seems safe to call > the backlight_(enable|disable) several times. > > v3: v3 looks good to me +/- Laurent's comments: Reviewed-by: Linus Walleij Yours, Linus Walleij 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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C568C3498D for ; Fri, 13 Dec 2019 20:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B224624756 for ; Fri, 13 Dec 2019 20:37:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Cbhnm/ox" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbfLMNbI (ORCPT ); Fri, 13 Dec 2019 08:31:08 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40700 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727296AbfLMNbI (ORCPT ); Fri, 13 Dec 2019 08:31:08 -0500 Received: by mail-lj1-f193.google.com with SMTP id s22so2637022ljs.7 for ; Fri, 13 Dec 2019 05:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=Cbhnm/ox1I54nuH9njXHzccQrQot6KLJxrMb3XxyvsplUdUL3Q5Rul7FpZFaw6qIui KYp2hTrI1d6g+6A/dt3EeK/jyydFWmrzksF0s5cf6LxX401J1UfovmCKuRKzXFovXU5C QsI8OLd61zJoOK06uURda9yi4bsvTHAi28Tnrv3Y2WUQG8yz9MVsYlfxzXPwO2QT9YRG RsAyEYz1F5CKeLy89t5OQs+1Sn+GSZS1npqdvVHKIH8gmwGE2/La+4ljJz3l0hoayrrz IPjK34H/OTvJKUlP1UABm4Vzd9dvTCGe00klnysMonCEbsx3CWRH5rIYuP+ptTWBx8JB NZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=n5tpGYfixcl+vIeuPiNK9R72ohJdfUM0iJ1Pv7MVdox2rG8vDCxs5zcgFxAct/0RSu PfvviIJ0epxdetPzRiWHsMfpUyTIyWxP0p+5QvFUHPEIixzGPb2pZpmp+74nCc9Uw18y 3ItqBxlb8kONHgWtKu2awRyIL/sSB/JkOfNAPgKSSsATj7DivnBXTMTAUoSXNTufBHrx ZPRpb029u4nzYATNgx6udTbKbIY5Ooqlq0AVPRGSOU9bVk74h1Y+PJdYpuD1+gMa7WCB 2AaJ9QAV6Nspj5xjmYJGpuBcff6nvudZeh19g2yosCDYtvg/8QZZ2L8rJcGLaCcx7hyO M7YQ== X-Gm-Message-State: APjAAAW5cBdd4kxku1kLFx6lpE+V5GEaPeRvO6PI5DE6mt2RQW645k+t vjYAAx6tgLhm9/seb1I1nwK1Dt1NKx1vlkEtuzb0Ug== X-Google-Smtp-Source: APXvYqwMLtHFJLKb/OsUbyLvQlBeLa8EouQdhXkxY6ssHTmFd/qwkZ2hUZ7P2vEvqVVUtgkdycvnaAaf3SbpBeZBuMg= X-Received: by 2002:a2e:9587:: with SMTP id w7mr9207930ljh.42.1576243865608; Fri, 13 Dec 2019 05:31:05 -0800 (PST) MIME-Version: 1.0 References: <20191207140353.23967-1-sam@ravnborg.org> <20191207140353.23967-3-sam@ravnborg.org> In-Reply-To: <20191207140353.23967-3-sam@ravnborg.org> From: Linus Walleij Date: Fri, 13 Dec 2019 14:30:54 +0100 Message-ID: Subject: Re: [PATCH v2 02/25] drm/panel: add backlight support To: Sam Ravnborg Cc: "open list:DRM PANEL DRIVERS" , Thierry Reding , Laurent Pinchart , Abhinav Kumar , Andrzej Hajda , Benjamin Gaignard , Boris Brezillon , Daniel Vetter , David Airlie , Jagan Teki , Jitao Shi , Linux ARM , "moderated list:ARM/Mediatek SoC support" , Linux-Renesas , "open list:ARM/Rockchip SoC..." , linux-samsung-soc , linux-tegra@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Neil Armstrong , NXP Linux Team , Pengutronix Kernel Team , Purism Kernel Team , Sean Paul , Stefan Agner , Tomi Valkeinen , Maxime Ripard Content-Type: text/plain; charset="UTF-8" Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org On Sat, Dec 7, 2019 at 3:04 PM Sam Ravnborg wrote: > Panels often supports backlight as specified in a device tree. > Update the drm_panel infrastructure to support this to > simplify the drivers. > > With this the panel driver just needs to add the following to the > probe() function: > > err = drm_panel_of_backlight(panel); > if (err) > return err; > > Then drm_panel will handle all the rest. > > There is one caveat with the backlight support. > If drm_panel_(enable|disable) are called multiple times > in row then backlight_(enable|disable) will be called multiple times. > > The above will happen when a panel drivers unconditionally > calls drm_panel_disable() in their shutdown() function, > whan the panel is already disabled and then shutdown() is called. > > Reading the backlight code it seems safe to call > the backlight_(enable|disable) several times. > > v3: v3 looks good to me +/- Laurent's comments: Reviewed-by: Linus Walleij Yours, Linus Walleij 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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 104A9C43603 for ; Fri, 13 Dec 2019 22:22:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D591E22527 for ; Fri, 13 Dec 2019 22:22:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="immxMwyT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Cbhnm/ox" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D591E22527 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0Ea9qFGAvkbXC56FyZA6EDpnzDjY33UEIf4ilsmG/mA=; b=immxMwyTMg1g6a 0IcgCGYwM2pAUH5reEgPwv5CckQrjvlrU4Gh8tbv6Ca/gb0zP8aRpZxrzWVMpY6jhF4C4meT8ZNEU ceseRmHtC7OLPQbyKY17VIDMJRzSVPy7gX6XciY35JdQXkSn/uvaqWEeitBRQvyaL/tiXHutS0gsK PmXJoklILvsk2DQH9H55Y0qYjld5VISONLx6egUJ0w4OLQp7QTpKmyjylssSZBKdIwMTiG+uejP2/ NFvwSUN0hXQKyNh/JXGduXO5rh89pn0itrBA8xMKq1N8vGbkUpt1sRuQwYwLX9lph/FFSID6HlxRO RQLreL+HL2mKYEkGdyeQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl2Y-0000n9-3W; Fri, 13 Dec 2019 13:31:30 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl2C-0000Sk-Ei for linux-mediatek@lists.infradead.org; Fri, 13 Dec 2019 13:31:09 +0000 Received: by mail-lj1-x242.google.com with SMTP id s22so2637021ljs.7 for ; Fri, 13 Dec 2019 05:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=Cbhnm/ox1I54nuH9njXHzccQrQot6KLJxrMb3XxyvsplUdUL3Q5Rul7FpZFaw6qIui KYp2hTrI1d6g+6A/dt3EeK/jyydFWmrzksF0s5cf6LxX401J1UfovmCKuRKzXFovXU5C QsI8OLd61zJoOK06uURda9yi4bsvTHAi28Tnrv3Y2WUQG8yz9MVsYlfxzXPwO2QT9YRG RsAyEYz1F5CKeLy89t5OQs+1Sn+GSZS1npqdvVHKIH8gmwGE2/La+4ljJz3l0hoayrrz IPjK34H/OTvJKUlP1UABm4Vzd9dvTCGe00klnysMonCEbsx3CWRH5rIYuP+ptTWBx8JB NZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=doBX/f31FTbJf9nqW9vynTb/IOPWUVjz+RDCtjOxGkTulR8QcouLXGuc6MW1i227SE vJw6LXh2RMy/g9nw15inZA5m8Fjsap02etipR6jOvhIVWEXqoF96QVib0RF8zpp9iy4x oaRttcKFycESNM5e4Rk7dHXomPCSjHeVIqbOzQF5ob9rYPdITVMrVkt/9Y53zRMAN0TH vBoXFwMvVtAgjOh4PsDnEm6xcRv83io6zeUG3yQpN2hHKLjP8EN9F1YwIbqxmtRcAUd/ sfvvSJrWHTN340A8FvZoYOTCp5t+mNnHUZtQzQPqOSTeTALJFm6xxK79xHVXptc3+LC+ o68Q== X-Gm-Message-State: APjAAAUpPDwzooj6ZFk2EhvvA5Rl6SorGoALWWFHeEeIprPlznGxp9+C 52pvU70/pVIhL3rU/se873aSb5oePPcx2xmCWQsW2w== X-Google-Smtp-Source: APXvYqwMLtHFJLKb/OsUbyLvQlBeLa8EouQdhXkxY6ssHTmFd/qwkZ2hUZ7P2vEvqVVUtgkdycvnaAaf3SbpBeZBuMg= X-Received: by 2002:a2e:9587:: with SMTP id w7mr9207930ljh.42.1576243865608; Fri, 13 Dec 2019 05:31:05 -0800 (PST) MIME-Version: 1.0 References: <20191207140353.23967-1-sam@ravnborg.org> <20191207140353.23967-3-sam@ravnborg.org> In-Reply-To: <20191207140353.23967-3-sam@ravnborg.org> From: Linus Walleij Date: Fri, 13 Dec 2019 14:30:54 +0100 Message-ID: Subject: Re: [PATCH v2 02/25] drm/panel: add backlight support To: Sam Ravnborg X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191213_053108_507469_93B052EB X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , David Airlie , "open list:DRM PANEL DRIVERS" , Andrzej Hajda , Thierry Reding , Laurent Pinchart , Benjamin Gaignard , Stefan Agner , linux-samsung-soc , "open list:ARM/Rockchip SoC..." , Tomi Valkeinen , NXP Linux Team , Jagan Teki , Jitao Shi , Pengutronix Kernel Team , Maarten Lankhorst , Maxime Ripard , "moderated list:ARM/Mediatek SoC support" , Abhinav Kumar , linux-tegra@vger.kernel.org, Maxime Ripard , Sean Paul , Linux ARM , Purism Kernel Team , Linux-Renesas , Boris Brezillon , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Sat, Dec 7, 2019 at 3:04 PM Sam Ravnborg wrote: > Panels often supports backlight as specified in a device tree. > Update the drm_panel infrastructure to support this to > simplify the drivers. > > With this the panel driver just needs to add the following to the > probe() function: > > err = drm_panel_of_backlight(panel); > if (err) > return err; > > Then drm_panel will handle all the rest. > > There is one caveat with the backlight support. > If drm_panel_(enable|disable) are called multiple times > in row then backlight_(enable|disable) will be called multiple times. > > The above will happen when a panel drivers unconditionally > calls drm_panel_disable() in their shutdown() function, > whan the panel is already disabled and then shutdown() is called. > > Reading the backlight code it seems safe to call > the backlight_(enable|disable) several times. > > v3: v3 looks good to me +/- Laurent's comments: Reviewed-by: Linus Walleij Yours, Linus Walleij _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D2DDC00454 for ; Fri, 13 Dec 2019 22:25:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7501B214D8 for ; Fri, 13 Dec 2019 22:25:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JQBC5Kqq"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Cbhnm/ox" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7501B214D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lmw+WmDFhSSzRK6HMu7Qn/64vYolDqv54jJVjezfDCs=; b=JQBC5KqqCWvQ0x zLZLNR34ouXMdXQ26QggK1jROV1UBmVI6+Q8smubX5aN+rO7dPV/3pVTUoF468RocRSbO/PYGT3/v +Wb6OOWogxijEQ9g4ZgcRjRjsPbyAfXbyXvG9F56e+rT5L+2EK3TsvAZyjkF61M6Y8WnaMlKlasDs Dr8yscSeOGrreaTYfj+kbpOYeOcEZhZR81i2bkOTZ3omhr3EGuL0SejvLuMOxaQuAK+rDnawZBT7v deEm8oGYWYcU8cgU6jPOTZe5G34uxd4PIhUSwaoGkuVgodxaE3O1/ediKHLdok9+OieXVD5Ojnz/W aA4kpllS9AsLoii1/Ozw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl2f-0000tK-M3; Fri, 13 Dec 2019 13:31:37 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifl2C-0000Sn-Hf for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 13:31:11 +0000 Received: by mail-lj1-x244.google.com with SMTP id a13so2628787ljm.10 for ; Fri, 13 Dec 2019 05:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=Cbhnm/ox1I54nuH9njXHzccQrQot6KLJxrMb3XxyvsplUdUL3Q5Rul7FpZFaw6qIui KYp2hTrI1d6g+6A/dt3EeK/jyydFWmrzksF0s5cf6LxX401J1UfovmCKuRKzXFovXU5C QsI8OLd61zJoOK06uURda9yi4bsvTHAi28Tnrv3Y2WUQG8yz9MVsYlfxzXPwO2QT9YRG RsAyEYz1F5CKeLy89t5OQs+1Sn+GSZS1npqdvVHKIH8gmwGE2/La+4ljJz3l0hoayrrz IPjK34H/OTvJKUlP1UABm4Vzd9dvTCGe00klnysMonCEbsx3CWRH5rIYuP+ptTWBx8JB NZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=APkeHZ1CM9rRoRoQ8JSKrJhMnU+seNBTUMS2f6YQ802xlNeyiam2KYGsGfrCWqW2T1 LR3oklBylslxVMw/Ij7M9R/P2O/hYfyimdmD2tbv2wyzDmjbsGK4FS1V9cwZmwCPu8Xz Uxj7uV+a3ELOj407N6fOvpQERLCfbl2nvxyExbt+3+dpN0l/PfIkp1vz9hLZe7lmPbty /tO4QfrtcOqxGv7UsC+rtZe0jXP49ZGvz0a9Ey0XOLB8TtgJTVm7MW0HZWliJo1KWwYM tIitEDUBN8p7ROi15EuHfqzHVhLpSv2IA8sDtHxn6Necjf1ZvGQL2g2sJSliD5yXE4XA MMng== X-Gm-Message-State: APjAAAXdHOpXIH/HVaAXbd0YlHe+qRYZPcH/pD8IZhjWxAvlUHIdkq+2 0/o6q0Mn2uw0Lmb8VzB4fR+99ezSseyoWMMK8CiI9Q== X-Google-Smtp-Source: APXvYqwMLtHFJLKb/OsUbyLvQlBeLa8EouQdhXkxY6ssHTmFd/qwkZ2hUZ7P2vEvqVVUtgkdycvnaAaf3SbpBeZBuMg= X-Received: by 2002:a2e:9587:: with SMTP id w7mr9207930ljh.42.1576243865608; Fri, 13 Dec 2019 05:31:05 -0800 (PST) MIME-Version: 1.0 References: <20191207140353.23967-1-sam@ravnborg.org> <20191207140353.23967-3-sam@ravnborg.org> In-Reply-To: <20191207140353.23967-3-sam@ravnborg.org> From: Linus Walleij Date: Fri, 13 Dec 2019 14:30:54 +0100 Message-ID: Subject: Re: [PATCH v2 02/25] drm/panel: add backlight support To: Sam Ravnborg X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191213_053108_792137_ECEF19EA X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , David Airlie , "open list:DRM PANEL DRIVERS" , Andrzej Hajda , Thierry Reding , Laurent Pinchart , Benjamin Gaignard , Stefan Agner , linux-samsung-soc , "open list:ARM/Rockchip SoC..." , Tomi Valkeinen , NXP Linux Team , Jagan Teki , Jitao Shi , Pengutronix Kernel Team , Maarten Lankhorst , Maxime Ripard , "moderated list:ARM/Mediatek SoC support" , Abhinav Kumar , linux-tegra@vger.kernel.org, Maxime Ripard , Sean Paul , Linux ARM , Purism Kernel Team , Linux-Renesas , Boris Brezillon , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Dec 7, 2019 at 3:04 PM Sam Ravnborg wrote: > Panels often supports backlight as specified in a device tree. > Update the drm_panel infrastructure to support this to > simplify the drivers. > > With this the panel driver just needs to add the following to the > probe() function: > > err = drm_panel_of_backlight(panel); > if (err) > return err; > > Then drm_panel will handle all the rest. > > There is one caveat with the backlight support. > If drm_panel_(enable|disable) are called multiple times > in row then backlight_(enable|disable) will be called multiple times. > > The above will happen when a panel drivers unconditionally > calls drm_panel_disable() in their shutdown() function, > whan the panel is already disabled and then shutdown() is called. > > Reading the backlight code it seems safe to call > the backlight_(enable|disable) several times. > > v3: v3 looks good to me +/- Laurent's comments: Reviewed-by: Linus Walleij Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4066C7D603 for ; Fri, 13 Dec 2019 20:39:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1B6424804 for ; Fri, 13 Dec 2019 20:39:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Cbhnm/ox" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1B6424804 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD8486E48D; Fri, 13 Dec 2019 13:31:08 +0000 (UTC) Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 444206E48D for ; Fri, 13 Dec 2019 13:31:07 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id j6so2670110lja.2 for ; Fri, 13 Dec 2019 05:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=Cbhnm/ox1I54nuH9njXHzccQrQot6KLJxrMb3XxyvsplUdUL3Q5Rul7FpZFaw6qIui KYp2hTrI1d6g+6A/dt3EeK/jyydFWmrzksF0s5cf6LxX401J1UfovmCKuRKzXFovXU5C QsI8OLd61zJoOK06uURda9yi4bsvTHAi28Tnrv3Y2WUQG8yz9MVsYlfxzXPwO2QT9YRG RsAyEYz1F5CKeLy89t5OQs+1Sn+GSZS1npqdvVHKIH8gmwGE2/La+4ljJz3l0hoayrrz IPjK34H/OTvJKUlP1UABm4Vzd9dvTCGe00klnysMonCEbsx3CWRH5rIYuP+ptTWBx8JB NZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HrvoDck5eY5GK0w6K4AhLmPPIWL1Xrc1xH4Up/JEjjk=; b=uH8EmO12eBiDAs/UN77yeCPQjs2QFUVHw3/kZQsLCV3FtekFYuwCNV8ZbB+nglDRxA i0Zioh1KxPI9dPbMnmxWPqRtzJnR0Ais/eymlDY4a/qGcjFez6AaeEHofgOT+5lV7dfS EoYPIvp/eJXBY+AIlHg4B/ueN+ZntqlFhxHP/ly1Oxr6Mot3CDW0+/slpCCYvrby+ASZ adQO7BTaoDyxYhFSvDZEPBcD7QjETgyrPy7hPzkNdjMVx0G8MmP22p/GO8Ix18QFD7A2 fupx5dl61xXinaHfat5o9EIGdMJ3X/cfAlq92FOpTJftxxXSsQYGNQnrI1/TRFLtgPh/ OPAQ== X-Gm-Message-State: APjAAAUVIusdIi0ObTJutxI8bKv8IPIHz93OavdeAI9MetcpVd3D9Nza e88aBZnAyMN2rzuiznO8ISeyi6zwD/nZEzKjISZEtA== X-Google-Smtp-Source: APXvYqwMLtHFJLKb/OsUbyLvQlBeLa8EouQdhXkxY6ssHTmFd/qwkZ2hUZ7P2vEvqVVUtgkdycvnaAaf3SbpBeZBuMg= X-Received: by 2002:a2e:9587:: with SMTP id w7mr9207930ljh.42.1576243865608; Fri, 13 Dec 2019 05:31:05 -0800 (PST) MIME-Version: 1.0 References: <20191207140353.23967-1-sam@ravnborg.org> <20191207140353.23967-3-sam@ravnborg.org> In-Reply-To: <20191207140353.23967-3-sam@ravnborg.org> From: Linus Walleij Date: Fri, 13 Dec 2019 14:30:54 +0100 Message-ID: Subject: Re: [PATCH v2 02/25] drm/panel: add backlight support To: Sam Ravnborg X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , David Airlie , "open list:DRM PANEL DRIVERS" , Thierry Reding , Laurent Pinchart , linux-samsung-soc , "open list:ARM/Rockchip SoC..." , Tomi Valkeinen , NXP Linux Team , Jagan Teki , Jitao Shi , Pengutronix Kernel Team , "moderated list:ARM/Mediatek SoC support" , Abhinav Kumar , linux-tegra@vger.kernel.org, Maxime Ripard , Sean Paul , Linux ARM , Purism Kernel Team , Linux-Renesas , Boris Brezillon Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, Dec 7, 2019 at 3:04 PM Sam Ravnborg wrote: > Panels often supports backlight as specified in a device tree. > Update the drm_panel infrastructure to support this to > simplify the drivers. > > With this the panel driver just needs to add the following to the > probe() function: > > err = drm_panel_of_backlight(panel); > if (err) > return err; > > Then drm_panel will handle all the rest. > > There is one caveat with the backlight support. > If drm_panel_(enable|disable) are called multiple times > in row then backlight_(enable|disable) will be called multiple times. > > The above will happen when a panel drivers unconditionally > calls drm_panel_disable() in their shutdown() function, > whan the panel is already disabled and then shutdown() is called. > > Reading the backlight code it seems safe to call > the backlight_(enable|disable) several times. > > v3: v3 looks good to me +/- Laurent's comments: Reviewed-by: Linus Walleij Yours, Linus Walleij _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel