Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1734283pxf; Fri, 19 Mar 2021 14:33:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkaAuZxdIeW+eiA+jvJuCufmZDIHEN/4FA/80K1XLjEPMbbZ0q+wxL9SJAW4JxPNStYmcG X-Received: by 2002:a17:906:7389:: with SMTP id f9mr6616424ejl.423.1616189631513; Fri, 19 Mar 2021 14:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616189631; cv=none; d=google.com; s=arc-20160816; b=YDNiTABqXTekGdU71xXzs9aPWSm/+Jv6QCUKGcgUvB6kIypaGp3rqNbJy81cLXumnA Pr1zLAQ56dbiWwWCIyYVVftfw4DaytGvn7O/59obPkAtOTPwxX2Ac6iKSp8sre6MSnjg Cv0L7Lf88HwqUMm3eNI5cVeTxuF/HizntatGTyJR767sMjpFdbO/D05oZmN+mQUU4Sgy lRj000EWsmwbRM9Jcjl4uNUuU1NudpO/JJIfW576Am46GiQDTTLQD6syFDhlCYlQoz/d 5CEsgtIymNdJJGNSl0Qq5jtIelOsjhCGaSZHzCS+j9CAHOaQU4n2cOrXnHKKcciXQsIf DKiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mnFDnOo5yMcbPHmmE8oPg7EbW76+eTt1IMrohfUZyIU=; b=r5fdUo5TCUB2n/NPq7PQWeFc95P9xLYBfxdv+rm6HeiMuNdQmX7s1byMW1ep9oOJ50 Wmv1/jryT0pacM2FpzZZSYeGxivC88T0kQd6xTOW0sJnBWzIMLkAhSLtVc+QDmeVOcUA u9QLcytxjVVj7yxklq1/N+AqSLuj2upE8ojNg+HJS8E1KkryY7VPKPOMqz7HtDYkvmTS qiGfiaohHeSoFWv+JYnqxqZ3EeQkk3WudfVsSUWNIB7ySUUjC3paKf7P0KKRWBiT9FBx 4KPlEMxQ637nn+jHlR8eoKLYW+YR+Pbbgo6vLBbP06YLGjyjNCk1BYLYVIupWd9Ad6Lq QRXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CJ3MnOxI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si5125454edt.516.2021.03.19.14.33.28; Fri, 19 Mar 2021 14:33:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CJ3MnOxI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbhCSVbl (ORCPT + 99 others); Fri, 19 Mar 2021 17:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbhCSVbV (ORCPT ); Fri, 19 Mar 2021 17:31:21 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BFD6C06175F for ; Fri, 19 Mar 2021 14:31:21 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so5485543pjv.1 for ; Fri, 19 Mar 2021 14:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mnFDnOo5yMcbPHmmE8oPg7EbW76+eTt1IMrohfUZyIU=; b=CJ3MnOxIBAsmOakTHx0+zvI0rXduBbhZ7YLV8Ktwu73XjOqRzmIUURiCNYJh6EWFJG Ih11/v3vXng0DqFy+jj4A8CeRxxNsW2UiTDSeMk+jnC4p7CBnhcKL5VlArkkD/1qLDU+ X+61sa7x9SnHpn1bngpKkN1qYeb7QdNZn1503IAOpNGSIG70tZzjD52NFdNf/2Jda3FU 69N9fZcbO8/f6tipHQpg1yaq5YgkKLXCyTsyyOFVsQeJ0RskOByPW92cIfpPWHpfdDW1 w+JFPMQ//OdGDOiIrgsCg14rmvXhL1v6MJV0+ZafQoIzusbK8CSzCt4d9Xc5Qtg9xuyp BUjw== 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=mnFDnOo5yMcbPHmmE8oPg7EbW76+eTt1IMrohfUZyIU=; b=d0Z2I6HKE6JCVx4Ww/h9nrhmoyVr8jZu53r/ou4dYD6aS2QqpflyEufD70JUS3M2ZW OG+3F3RTYlfbLTSATi3rxorQ7gzGhVBxUz3wUAvxH0H+GuaO0Xce2s4soX1x0mzTY1Vm VUwluVYDGzaC1li+Mp5GtzJSxFmHs9n2mFOJsTh4cjn6joaHNAnfVALppzxb2u4C9b0i YC7T5+o2oEjMYrsWEY20bhY4EuvSMsJ2EoJYLyUlSgAIKWz08c2D1t0lXlC8xS1yLXUd 01vG6leSlItR6khC4umPqKjt0jcnoawlUTGK6JMtm0t80bje9myExG2ZLTPpls4Ak/Ev +4Wg== X-Gm-Message-State: AOAM530RnSW7UTQZ9/3Tvv+CJ4kJZLuJlU95H654PwjJUf0DKwPTIOEu g0Fzr/wy2h5Arcm67duhsrBrWyKnfG9LSBbAoRI= X-Received: by 2002:a17:902:c154:b029:e5:e7cf:9627 with SMTP id 20-20020a170902c154b02900e5e7cf9627mr15689833plj.68.1616189480887; Fri, 19 Mar 2021 14:31:20 -0700 (PDT) MIME-Version: 1.0 References: <20210319164418.1.I5d51cc12776ee8993a1a54089b548952f75ada41@changeid> <54fc883a-c149-3f43-fb79-3cbff13e7b6a@amd.com> In-Reply-To: <54fc883a-c149-3f43-fb79-3cbff13e7b6a@amd.com> From: Evan Benn Date: Sat, 20 Mar 2021 08:31:09 +1100 Message-ID: Subject: Re: [PATCH] drm/amd/display: Set AMDGPU_DM_DEFAULT_MIN_BACKLIGHT to 0 To: Harry Wentland Cc: Alex Deucher , Evan Benn , Stylon Wang , Eryk Brol , David Airlie , Rodrigo Siqueira , LKML , amd-gfx list , =?UTF-8?Q?Christian_K=C3=B6nig?= , Leo Li , Aurabindo Pillai , Maling list - DRI developers , Alex Deucher , Bhawanpreet Lakha , Nicholas Kazlauskas , Anand Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 20 Mar 2021 at 02:10, Harry Wentland wrote: > On 2021-03-19 10:22 a.m., Alex Deucher wrote: > > On Fri, Mar 19, 2021 at 3:23 AM Evan Benn wrote: > >> > >> AMDGPU_DM_DEFAULT_MIN_BACKLIGHT was set to the value of 12 > >> to ensure no display backlight will flicker at low user brightness > >> settings. However this value is quite bright, so for devices that do not > >> implement the ACPI ATIF > >> ATIF_FUNCTION_QUERY_BRIGHTNESS_TRANSFER_CHARACTERISTICS > >> functionality the user cannot set the brightness to a low level even if > >> the display would support such a low PWM. > >> > >> This ATIF feature is not implemented on for example AMD grunt chromebooks. > >> > >> Signed-off-by: Evan Benn > >> > >> --- > >> I could not find a justification for the reason for the value. It has > >> caused some noticable regression for users: https://bugzilla.kernel.org/show_bug.cgi?id=203439>>> > >> Maybe this can be either user controlled or userspace configured, but > >> preventing users from turning their backlight dim seems wrong. > > > > My understanding is that some panels flicker if you set the min to a > > value too low. This was a safe minimum if the platform didn't specify > > it's own safe minimum. I think we'd just be trading one bug for > > another (flickering vs not dim enough). Maybe a whitelist or > > blacklist would be a better solution? > > > > Yeah, this is a NACK from me as-is for the reasons Alex described. Thanks Harry + Alex, I agree this solution is not the best. > > I agree a whitelist approach might be best. Do you have any idea what an allowlist could be keyed on? Is the flickering you observed here a function of the panel or the gpu or some other component? Maybe we could move the minimum level into the logic for that hardware. > > Is this fix perhaps for OLED panels? If so we could use a different > min-value for OLED panels that don't do PWM, but use 12 for everything else. All the chromebooks I have worked with LCD + LED backlight have been fine with a backlight set to 0. We do have OLED panels too, but I'm not aware of what they do. > Harry > > > Alex > > > > > >> > >> Also reviewed here: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2748377>>> > >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > >> index 573cf17262da..0129bd69b94e 100644 > >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > >> @@ -3151,7 +3151,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev) > >> return 0; > >> } > >> > >> -#define AMDGPU_DM_DEFAULT_MIN_BACKLIGHT 12 > >> +#define AMDGPU_DM_DEFAULT_MIN_BACKLIGHT 0 > >> #define AMDGPU_DM_DEFAULT_MAX_BACKLIGHT 255 > >> #define AUX_BL_DEFAULT_TRANSITION_TIME_MS 50 > >> > >> -- > >> 2.31.0.291.g576ba9dcdaf-goog > >> > >> _______________________________________________ > >> dri-devel mailing list > >> dri-devel@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/dri-devel>> _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel>> >