Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1488439pxf; Fri, 19 Mar 2021 08:12:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp6SCqx9Ij7pVFCcxWkw36Z5OY5uIXZGBYHu7A6BV9epBQmk1SSQ4WhIGPL9zPd5NkaZPm X-Received: by 2002:a17:906:3648:: with SMTP id r8mr5095853ejb.58.1616166723353; Fri, 19 Mar 2021 08:12:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1616166723; cv=pass; d=google.com; s=arc-20160816; b=M2Ya5JdK4k41TvGNqXyWf/eqRVFrs1H2ZEUuCCKcluDk9qBOW7/DuSUELEHugvCZmo oOtX05B247WBF5aZqqufShhOf6rl+FVGjnutGjhxm0p6mfo85HIw4qKpSzphNZBQu97h AcqfEdFPoBeb+wlrTe411hqS9osPF2NL0WajPuqnGHqaSON5vHJUZUu/0i3SckSXWiEf D18lEnHFrCSQgigCsJkt+Vp7mDNFNQ2hSE0CgYUj15Jx3Lz96WSka7akOtsVbpLhoI+0 ve9FnEk24YeS6Fj83Z4XwgDH+IsR9+4cG+BU5OE278F3Nn4S7dRsFyXzr/iMB51Baq/c /SSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=VxZoTS8ucEz+k8MYLFafz2eWzWycmkVvN25QVVgiV+U=; b=WWEccCPFN6Q46sMwHPBvy+auex4OYN3UNh1zSmKjcX+BOAvmyMaLY9Bsgvv3uED+tz oPKCq6CuMcdV/8Cqyf+L1GxugdXwQSWKydLfUWhH2YBZ5BvLs1q5W31+Kpb9qprKG0fZ g4UIkSxXdpKfdShZhiGge7g1hkrqW1S9ZsBryN6nxdW3bLxbyRtpC7M6LeLVS+2ARzl8 TS6phKjmMhr26RgBaCfWvQrXDOunYayop9Gk8+1S/Dou7c+kBOMNJWLhdVxsiDUAawKQ IgqnYvTcNQI5ljdbu7h8SxcXxSVwIN/I72yAkk5DkOydx6zCImWemZfYT74Q+BS+ehum J7cA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=QymuUyKJ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=NONE dis=NONE) header.from=amd.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si4224978edy.86.2021.03.19.08.11.36; Fri, 19 Mar 2021 08:12:03 -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=@amd.com header.s=selector1 header.b=QymuUyKJ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=NONE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230401AbhCSPIN (ORCPT + 99 others); Fri, 19 Mar 2021 11:08:13 -0400 Received: from mail-dm6nam12on2072.outbound.protection.outlook.com ([40.107.243.72]:59361 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231186AbhCSPHm (ORCPT ); Fri, 19 Mar 2021 11:07:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nC12EdWLfO0tWFqroa5HfccNbnISvMUMRXfYA17vRqii57x3nHn8U6hb17TyofoRb4kO774YqC50cJ7q+AlSGRVwK9LCM2FJNbxW1FPa2uF3n0xdGXVW0xb5K7+18hMqiqNNjNy9jJl4aDpXkQgG82gpVPWbi6HqAEDUHLM9Pn1CfxDy0jdpzib630Jv1LBAoHB+e2WeZSYMfTjanJPNQCTCxK6KZqK69iv+bhpRhsHWwXW405ZLcPDcPqHYdpsdcLa0Sm+MDNPEh6lUfRWe3yG/oZi7D3jM3Egctuv491hLKCvL+qT6NfaQD15J9O7uLVyQ2HpQhUYj7cDJlFcAew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VxZoTS8ucEz+k8MYLFafz2eWzWycmkVvN25QVVgiV+U=; b=g8hBncikt4tB2ywGEwTjOy36SoNHJ50SdvuzalUqHACyXhzRgYsrG1RLckdNSNSkJwluuJMBHbWiMJJwXG7MfZjyHD66czcMaaz+ocwVXt15R5RSDciJ4raWk+cfaTrH8uTqLsXcL+a4UUToMT3FTRDiSAtqji6TBRT/oh+te5yfGGjNun8smAJd4fAV3H5nX1NIx4q5yoW1VZqQ+eYaBzRWUMmA4JeKVJyPXfkwPSiQlksEDWxS6E6n1MC/sTq4AVrVrlJ7MQCD28+lR/LHTabSLzitF7UJX6UiCGy/4znY+K2WgLspRJiE2Xof/sZIaZvBhb5lDygeXpix+KEs3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VxZoTS8ucEz+k8MYLFafz2eWzWycmkVvN25QVVgiV+U=; b=QymuUyKJKzKMjYbV+95vwr8bxooCEv1qy1bayANoW+DdC9D6wL4WKUqzwhlhSLh/sBpL7OOOxYTV99gCJWP2Cs4VppHnUWboyVyfp65qz/klTJT0TbMNGA/IRNuVZE5ujEXJNI6nJnydCrNVopg8leqYPImkcw6ybZDCDCttpIY= Authentication-Results: chromium.org; dkim=none (message not signed) header.d=none;chromium.org; dmarc=none action=none header.from=amd.com; Received: from MW3PR12MB4379.namprd12.prod.outlook.com (2603:10b6:303:5e::11) by MW3PR12MB4523.namprd12.prod.outlook.com (2603:10b6:303:5b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Fri, 19 Mar 2021 15:07:37 +0000 Received: from MW3PR12MB4379.namprd12.prod.outlook.com ([fe80::4987:8b2f:78ca:deb8]) by MW3PR12MB4379.namprd12.prod.outlook.com ([fe80::4987:8b2f:78ca:deb8%7]) with mapi id 15.20.3955.018; Fri, 19 Mar 2021 15:07:37 +0000 Subject: Re: [PATCH] drm/amd/display: Set AMDGPU_DM_DEFAULT_MIN_BACKLIGHT to 0 To: Alex Deucher , Evan Benn Cc: 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 References: <20210319164418.1.I5d51cc12776ee8993a1a54089b548952f75ada41@changeid> From: Harry Wentland Message-ID: <54fc883a-c149-3f43-fb79-3cbff13e7b6a@amd.com> Date: Fri, 19 Mar 2021 11:07:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [198.200.67.155] X-ClientProxiedBy: YT2PR01CA0002.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:38::7) To MW3PR12MB4379.namprd12.prod.outlook.com (2603:10b6:303:5e::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.193] (198.200.67.155) by YT2PR01CA0002.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:38::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32 via Frontend Transport; Fri, 19 Mar 2021 15:07:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 360a7870-941e-461c-09fb-08d8eae8bb80 X-MS-TrafficTypeDiagnostic: MW3PR12MB4523: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lQX2vDAof3cRzdDIfwLWB8amTlzBcpwGGGeE+eO5hzxfBuBRxiMdEN3Dkx+bxOhLhqu2Eis1irFgOsy0NfSrFeVqENakXgvi9gupmXDTTHcxZ5WORKKzFoQlozStqI/py2QzCaIL/Y01Uw7wlTmgayFBbEXMTUZ6515rJmtxUzltgqkVRw74GnSr3Va8gwGBPzFmwGccENxstMUij4FGqA2vL+6DtyJrOgTwBpbymMTPwwNPFQ07dozVBr9Rr8XqHqVX9xP6T29Ou4a3zM3T9lumGRz/anZPEEQVDnoLjgikIU+1huI6Y1mIvC4mTb4tx79sOdniyzkzrfj8JQ03LwN7dbcT5GQgoRVLduw6NiX5bQLk+GBxrYnzE8153/IUM8ssKqjeT4Bl64x4xdul8wBxdeViVawlJARTdpwT0IJnkeFJYAzHRPkrRz4vg2whFg3Ex/HOmxmCvJyqCj5Eb9PPzkzm09S2JNwdFKnOrv5qAphYGmsOMIQGCcM4j1YC5JkKt+ji1KBMsCFMUyh2wDuLB59J7MNM5GqzvnfNzrVqP63RvxxJS3gzIZLNIp+UPaSbLeFkx1JQLJv9VTX9XDYBIKlbOu1ahz3MlAjWx9BoZFb9F+nPG79A92oSXdtiLq/L2QmLAszKd1YlyEi4eHB76WAghEPQ+1zcl7NbnGJXDwv9tAX2YKa4Fey52cnbtl5sCq1UFwH4baQp/zSQ/Jpau45t/KwRE5AO8LeLuBG2UxEyTkPI3E9ZsebG2MadKeWFh6U+shx6AMKsBH1WPUaQJ5oMRNZJIJy7eFIiX2A= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR12MB4379.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(136003)(346002)(366004)(39860400002)(396003)(16576012)(478600001)(316002)(66556008)(54906003)(2906002)(83380400001)(66476007)(38100700001)(31696002)(31686004)(8676002)(53546011)(110136005)(66946007)(966005)(26005)(8936002)(5660300002)(4326008)(6486002)(956004)(2616005)(44832011)(36756003)(86362001)(186003)(16526019)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?Z1RTVXRMdmViOXZDRkxEQ2ZXRFhIZ1E0ZHM3R0NmRlkyV3gyREdoWEdCZytE?= =?utf-8?B?WkhRUkRSZGZOTVFpR3lMR0tOcHF1QkVGdlk2dFJJckFBR1UzZG1YN0g1SVRu?= =?utf-8?B?TmF3WE9mVThnMG9ITXc1ampZZmRiQnZJaUlqR2NDUE9PZU9pU3NIK0ZQQ21q?= =?utf-8?B?R3RqOHFadUtacDZBNk91Mmt0UmRZckg2TDYrL3VZeEZNSEtHRUVIWkU4aFh1?= =?utf-8?B?bzdtTnBpa1M3NFFGNTVvV1ZFenYrTnF3enI2cmttb3BuZ1QyK1pYTXRqUjFx?= =?utf-8?B?SWVuUmwwaW1aZXAzTHNYdnFseDFkWWFUZVZaZVgvcTFSeFNYQ1RYOXRoVEds?= =?utf-8?B?L1VqcFY5OE05cXVKaWhwaWhlYzF3TTJNQkh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JwRGQ2RGNmMU81RkF0dUFGSzNMbDZLSkpxWGpKQm5xRDhMcmxuY1hk?= =?utf-8?B?U042THp2WU9ZN2p4ZytXYmNseTZ1MWdVKzYyVXRwRHVmTThqdkhybEs1M1BD?= =?utf-8?B?Q2xraDlNSXltWkJYbjRQbktHQWhTSmE2QjJoczhlSHlIbHRUM1h6RjZ3RzZX?= =?utf-8?B?WkZ5REJ0eW13bTdVeGxjZzJhSkVmSVB0T2Rldnl1d0dubEdNQlEySjRXZ2Js?= =?utf-8?B?Z2ZlRmY3a21KUC96VDM3WjUxWkpCRW5RZlFHZ2dlUk04UWFuK2NQZHpaM1Vv?= =?utf-8?B?T0lMVXFEZE1TV3NXSHVuUmpBdmY3RmhLNndFcnpJdUtHRmRBQVBaUmNrTFpu?= =?utf-8?B?MTFBdFMxa29uZE5PR2xKYXA0UmRHbWE1YkJpVXV1QnRKWUpFN3g5Zm81VHVl?= =?utf-8?B?eHUxejJWQVFJUHdMWDloL1dYNGtlQ1lxdTRCWkJta1hlUUxrZjQzeTNCZVIw?= =?utf-8?Q?fwkhvB/bbXkLB46+MZ7H1zsBRoAzNZdrRnDegQF?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 360a7870-941e-461c-09fb-08d8eae8bb80 X-MS-Exchange-CrossTenant-AuthSource: MW3PR12MB4379.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2021 15:07:37.5741 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mIkXROogONITs5UMtD1Xi8r86ESKRi/AfVufIRgl/emauLk6SRQw8UXBBU/KdhdLqjBt/iPaWfbX2GaLkKeIOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4523 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. I agree a whitelist approach might be best. 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. 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>>