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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 94965C433B4 for ; Fri, 16 Apr 2021 23:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76C68610CD for ; Fri, 16 Apr 2021 23:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233213AbhDPXDY (ORCPT ); Fri, 16 Apr 2021 19:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234807AbhDPXDW (ORCPT ); Fri, 16 Apr 2021 19:03:22 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 720F0C061574 for ; Fri, 16 Apr 2021 16:02:57 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id e13so20726423qkl.6 for ; Fri, 16 Apr 2021 16:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S2TYM+wdp6+vDu4GYyPIj8WsiphUkb2AvhRdqqeeoy0=; b=Jrf5W3Bx2YFA/wzMJQ4naBpogVfH2bAOaRDsvRP+wQCyW65LnEFXDogl9l/5ok/Y+d HKuhWhsbxsOZ3HbwY6lDvjJuo+jYbjpbbe/Bqt6o3yHBZPTrgvTmnqrZkXu7zDf4Ocx9 AXFe6MfdwJicBmuEKIBtdvCrHkcK8pWB9JXJA= 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=S2TYM+wdp6+vDu4GYyPIj8WsiphUkb2AvhRdqqeeoy0=; b=PM3u8vKjBsayXX5UV2GaWRdHVBiY86K+O/hizctqYY6wc1scLID2/8FJWjnMSWkTxI p5PL9cwKpTrqaHHCP02StbJpRkgrD8yr4Ms4khGNLrSL7N/RJlYePV6Oyqjk0FiWctVY Rkut9b3b8/shMKUrA6BhtbEg6wjRPIm3SzclADvpdwcZCQvT1yX+oFUXHsvmB+3Pc5I5 exNSyN2KZ1+CNWFCVVLp3man50DcGDzpasO0+thKYOkgdzRRzpoM32yu8UAtNIzT27gK wVqrlM1t2cz5f07QZKuYuNNmNiR9jeEuD6PZCD3Fm5IAVhiQs0vTV9uGt4ZRQ8VDnV/v x0mQ== X-Gm-Message-State: AOAM531LmGCljFQdhNbUHv4V1tjB8LeMYh3NJIpROi3p+rgZqra8vlSQ KTMGFrjspNkOn/s8cfWFuzX96vG/nvzFVw== X-Google-Smtp-Source: ABdhPJyn8kkrCXA47SHQQz5EIY36A64lqjskBxnfBXZ6NpwQFpg/EbrzVFDn1ZYTA2ka9bETWedCow== X-Received: by 2002:a37:a603:: with SMTP id p3mr1606296qke.362.1618614176189; Fri, 16 Apr 2021 16:02:56 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id k17sm4642342qtp.26.2021.04.16.16.02.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 16:02:55 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id c195so31835060ybf.9 for ; Fri, 16 Apr 2021 16:02:54 -0700 (PDT) X-Received: by 2002:a25:244d:: with SMTP id k74mr2023484ybk.79.1618614174530; Fri, 16 Apr 2021 16:02:54 -0700 (PDT) MIME-Version: 1.0 References: <1618418390-15055-1-git-send-email-rajeevny@codeaurora.org> In-Reply-To: <1618418390-15055-1-git-send-email-rajeevny@codeaurora.org> From: Doug Anderson Date: Fri, 16 Apr 2021 16:02:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v1 0/3] drm: Add support for backlight control of eDP panel on ti-sn65dsi86 bridge To: Rajeev Nandan Cc: dri-devel , linux-arm-msm , freedreno , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , Rob Clark , mkrishn@codeaurora.org, Kalyan Thota , "Kristian H. Kristensen" , Abhinav Kumar , Sean Paul , Laurent Pinchart , Andrzej Hajda Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi, On Wed, Apr 14, 2021 at 9:41 AM Rajeev Nandan wrote: > > The backlight level of an eDP panel can be controlled through the AUX > channel using DPCD registers of the panel. > > The capability for the Source device to adjust backlight characteristics > within the panel, using the Sink device DPCD registers is indicated by > the TCON_BACKLIGHT_ADJUSTMENT_CAPABLE bit in the EDP_GENERAL_CAPABILITY_1 > register (DPCD Address 701h, bit0). In this configuration, the eDP TCON > receives the backlight level information from the host, through the AUX > channel. > > The changes in this patch series do the following: > - Add drm_dp_aux_backlight_ APIs to support backlight control using DPCD > registers on the DisplayPort AUX channel. > The current version only supports backlight brightness control by the > EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB registers (DPCD Addresses 722h-723h). > - Add support for backlight control of the eDP panel connected to the > ti-sn65dsi86 bridge. > > Rajeev Nandan (3): > drm/dp: Add DisplayPort aux backlight control support > dt-bindings: drm/bridge: ti-sn65dsi86: Document use-aux-backlight > drm/bridge: ti-sn65dsi86: Add DisplayPort aux backlight support > > .../bindings/display/bridge/ti,sn65dsi86.yaml | 8 + > drivers/gpu/drm/Kconfig | 8 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/bridge/Kconfig | 1 + > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 26 +++ > drivers/gpu/drm/drm_dp_aux_backlight.c | 191 +++++++++++++++++++++ > include/drm/drm_dp_aux_backlight.h | 29 ++++ > 7 files changed, 264 insertions(+) > create mode 100644 drivers/gpu/drm/drm_dp_aux_backlight.c > create mode 100644 include/drm/drm_dp_aux_backlight.h So I haven't looked in massive detail at this patch series, but the fact that it's touching "ti-sn65dsi86.c" is a red flag. I know in out-of-band communications you said you weren't sure how to do better. ...but, perhaps, if folks don't hate my recent series [1] there may be a way forward. I wonder if perhaps now that the AUX channel can be registered early if it gets around the circular dependency problems and now you can put your code in some combination of the panel code and (maybe?) a new backlight driver if it's generic enough. It's possible that you might need to add some code to be able to look up a "struct drm_dp_aux *" from a device tree node and you might need to add a new device tree property like "ddc-aux-bus" in order to do this, but I don't _think_ that would be controversial? [1] https://lore.kernel.org/r/20210416223950.3586967-1-dianders@chromium.org -Doug 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=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 7990AC433ED for ; Fri, 16 Apr 2021 23:03:00 +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 42D71610CC for ; Fri, 16 Apr 2021 23:03:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42D71610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.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 58C3F6ED08; Fri, 16 Apr 2021 23:02:59 +0000 (UTC) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 581246E135 for ; Fri, 16 Apr 2021 23:02:58 +0000 (UTC) Received: by mail-qt1-x82c.google.com with SMTP id t11so13439109qtr.8 for ; Fri, 16 Apr 2021 16:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S2TYM+wdp6+vDu4GYyPIj8WsiphUkb2AvhRdqqeeoy0=; b=Jrf5W3Bx2YFA/wzMJQ4naBpogVfH2bAOaRDsvRP+wQCyW65LnEFXDogl9l/5ok/Y+d HKuhWhsbxsOZ3HbwY6lDvjJuo+jYbjpbbe/Bqt6o3yHBZPTrgvTmnqrZkXu7zDf4Ocx9 AXFe6MfdwJicBmuEKIBtdvCrHkcK8pWB9JXJA= 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=S2TYM+wdp6+vDu4GYyPIj8WsiphUkb2AvhRdqqeeoy0=; b=uX68fsc/6GojpWC88BJVVyJWZYTDrpAvL/BHVB49oH86C7zl5mXrOj6SeUI6SN2/Gw O0SDKpNp/sTtkfZocccOeqe18GMS8SkOLfGh43d6wVJUX4rwePLC1ZiQMlzL0E1Tm5M/ uTQOXMv2YgbpfUda4ZvK6VFILTwE5vNm7DeyiVwZOGegLB+nvbeR2QQbi4MsxLf9DOXx aqeX6hhNhXe61+4czw8nlsa3Ypd+SE8Dvf+W3n34cPWUHRQp4typkzj+YN+t10OFpW+J Wkw7jCSy8Q8tGxxXpX1G5JQHqcX/VMyvgjZyRR3dyLndRS0URvmHnvFOQ9JEp/lXgfzR KMQg== X-Gm-Message-State: AOAM5332pGyqA1NSOYCBktygAR2kzdkByppApvspGatujnhBnrGvLBik Q79ocyyBunwtJ4e9LelXBdKUggfpOxVddw== X-Google-Smtp-Source: ABdhPJxTd6ILdJ2gOobwZNauCu+eeIBSU9HNO1vpgBDY6JRctkN6BsR3Y5c3I+Lo2HDz9Y7PLrR9tg== X-Received: by 2002:a05:622a:9:: with SMTP id x9mr1395364qtw.189.1618614175974; Fri, 16 Apr 2021 16:02:55 -0700 (PDT) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com. [209.85.219.175]) by smtp.gmail.com with ESMTPSA id l24sm1013132qki.119.2021.04.16.16.02.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 16:02:55 -0700 (PDT) Received: by mail-yb1-f175.google.com with SMTP id p3so11194401ybk.0 for ; Fri, 16 Apr 2021 16:02:54 -0700 (PDT) X-Received: by 2002:a25:244d:: with SMTP id k74mr2023484ybk.79.1618614174530; Fri, 16 Apr 2021 16:02:54 -0700 (PDT) MIME-Version: 1.0 References: <1618418390-15055-1-git-send-email-rajeevny@codeaurora.org> In-Reply-To: <1618418390-15055-1-git-send-email-rajeevny@codeaurora.org> From: Doug Anderson Date: Fri, 16 Apr 2021 16:02:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v1 0/3] drm: Add support for backlight control of eDP panel on ti-sn65dsi86 bridge To: Rajeev Nandan 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: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , mkrishn@codeaurora.org, linux-arm-msm , LKML , dri-devel , Andrzej Hajda , Sean Paul , Abhinav Kumar , Kalyan Thota , "Kristian H. Kristensen" , freedreno , Laurent Pinchart Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, On Wed, Apr 14, 2021 at 9:41 AM Rajeev Nandan wrote: > > The backlight level of an eDP panel can be controlled through the AUX > channel using DPCD registers of the panel. > > The capability for the Source device to adjust backlight characteristics > within the panel, using the Sink device DPCD registers is indicated by > the TCON_BACKLIGHT_ADJUSTMENT_CAPABLE bit in the EDP_GENERAL_CAPABILITY_1 > register (DPCD Address 701h, bit0). In this configuration, the eDP TCON > receives the backlight level information from the host, through the AUX > channel. > > The changes in this patch series do the following: > - Add drm_dp_aux_backlight_ APIs to support backlight control using DPCD > registers on the DisplayPort AUX channel. > The current version only supports backlight brightness control by the > EDP_BACKLIGHT_BRIGHTNESS_MSB/LSB registers (DPCD Addresses 722h-723h). > - Add support for backlight control of the eDP panel connected to the > ti-sn65dsi86 bridge. > > Rajeev Nandan (3): > drm/dp: Add DisplayPort aux backlight control support > dt-bindings: drm/bridge: ti-sn65dsi86: Document use-aux-backlight > drm/bridge: ti-sn65dsi86: Add DisplayPort aux backlight support > > .../bindings/display/bridge/ti,sn65dsi86.yaml | 8 + > drivers/gpu/drm/Kconfig | 8 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/bridge/Kconfig | 1 + > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 26 +++ > drivers/gpu/drm/drm_dp_aux_backlight.c | 191 +++++++++++++++++++++ > include/drm/drm_dp_aux_backlight.h | 29 ++++ > 7 files changed, 264 insertions(+) > create mode 100644 drivers/gpu/drm/drm_dp_aux_backlight.c > create mode 100644 include/drm/drm_dp_aux_backlight.h So I haven't looked in massive detail at this patch series, but the fact that it's touching "ti-sn65dsi86.c" is a red flag. I know in out-of-band communications you said you weren't sure how to do better. ...but, perhaps, if folks don't hate my recent series [1] there may be a way forward. I wonder if perhaps now that the AUX channel can be registered early if it gets around the circular dependency problems and now you can put your code in some combination of the panel code and (maybe?) a new backlight driver if it's generic enough. It's possible that you might need to add some code to be able to look up a "struct drm_dp_aux *" from a device tree node and you might need to add a new device tree property like "ddc-aux-bus" in order to do this, but I don't _think_ that would be controversial? [1] https://lore.kernel.org/r/20210416223950.3586967-1-dianders@chromium.org -Doug _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel