Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3768522pxt; Tue, 10 Aug 2021 10:53:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZLZFX34zV3hNuL8A5LSwPxDDuPP7ucID77qraM957E3pTpxRK6ztNW+eMKh1b1TKLnIXs X-Received: by 2002:a6b:f817:: with SMTP id o23mr176617ioh.205.1628617985972; Tue, 10 Aug 2021 10:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617985; cv=none; d=google.com; s=arc-20160816; b=rbV4kNIbXFJiD22f5rxNIu6u4c2Zt6555u5BVSC2IshE7yxpdu1T5JjnG3XdsC4iLP 9qCO9tjgnXs/g6Il53Dns8XnZ4JLRhGDIchkFFWY36gw/7OfoaOwA1089OliF3eX5+lw JpiF60mdrytkZZyRW5yIxntHHU3KQLEgM+phY86TPjXdS+ON4CFleCS+pkFFyHRjOH7P kPzfST+0/xI2tTUUTvoA3S7Lr6H88mIssmCc06SMReev6DmtmzshzOuwun7S88biPaSg K5v81TAYkpgttteZ/nZJ7dGg3cVzv9PkcFuocl8sF/3L6tQESH5SJVR5F0un1QlPvTqv vWPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cP8rnr7x4or+2G3XPNo88PHnRzK1JHONDX7sKf/xx38=; b=pPYCJKwhk+pG5bQH7EfGn12mwzFsERfJfplZO0PrIVim5yFh9x/cvTquj0LTqUlEeC V7i2QSe3DrYBrndhPbX8HyoX/FQAiAMFKcj6lmfGbkSZrrjI852IRkqS1XFNtJXlFjy8 97OwqKw7RPyzpa+B5krDQVa2zTYQEt7nuNglZnljEncKjSlB2WTAZOdua7G9YprAvOg2 0PZCHCqEPp4vZN4UnEZCS9tvXXXDhWmFtoFNxXmehnkm3acFYb3j4l2mKQYMGkS7YgTa QgClFa/ZNpjfSlDUGf27cRF/bq9ejUpbm1VU+Q0a2K35XoztO6D6k04/GJHDAn7wTjtX cmMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fLvTMHey; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si27729806ilu.80.2021.08.10.10.52.51; Tue, 10 Aug 2021 10:53:05 -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=@linuxfoundation.org header.s=korg header.b=fLvTMHey; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235842AbhHJRw1 (ORCPT + 99 others); Tue, 10 Aug 2021 13:52:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:34572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236521AbhHJRt0 (ORCPT ); Tue, 10 Aug 2021 13:49:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1CF1A61248; Tue, 10 Aug 2021 17:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617301; bh=Q8D+xTf6pW+QKu0pELwnvTzgnHYLZci1mq3j4oWaUKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fLvTMHeyM3Jye6SDdHDbQELAc3TME3wdBllv7Oy2W/SlEeQUalZq/Vv+iujqpPQJF mltdbmWIJn2NESiv25kWLgMvyCETHJMHKV+HMaCUb/kNEDa10k+HEXvW+fTYvWkI9V m/4A0P+w+VevZr7nCnetXPzrpnPxEbTbBWlKL4iw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roman Li , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 134/135] drm/amdgpu/display: only enable aux backlight control for OLED panels Date: Tue, 10 Aug 2021 19:31:08 +0200 Message-Id: <20210810173000.362881367@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher [ Upstream commit f2ad3accefc63e72e9932e141c21875cc04beec8 ] We've gotten a number of reports about backlight control not working on panels which indicate that they use aux backlight control. A recent patch: commit 2d73eabe2984a435737498ab39bb1500a9ffe9a9 Author: Camille Cho Date: Thu Jul 8 18:28:37 2021 +0800 drm/amd/display: Only set default brightness for OLED [Why] We used to unconditionally set backlight path as AUX for panels capable of backlight adjustment via DPCD in set default brightness. [How] This should be limited to OLED panel only since we control backlight via PWM path for SDR mode in LCD HDR panel. Reviewed-by: Krunoslav Kovac Acked-by: Rodrigo Siqueira Signed-off-by: Camille Cho Signed-off-by: Alex Deucher Changes some other code to only use aux for backlight control on OLED panels. The commit message seems to indicate that PWM should be used for SDR mode on HDR panels. Do something similar for backlight control in general. This may need to be revisited if and when HDR started to get used. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1438 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=213715 Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2162,9 +2162,9 @@ static void update_connector_ext_caps(st max_cll = conn_base->hdr_sink_metadata.hdmi_type1.max_cll; min_cll = conn_base->hdr_sink_metadata.hdmi_type1.min_cll; - if (caps->ext_caps->bits.oled == 1 || + if (caps->ext_caps->bits.oled == 1 /*|| caps->ext_caps->bits.sdr_aux_backlight_control == 1 || - caps->ext_caps->bits.hdr_aux_backlight_control == 1) + caps->ext_caps->bits.hdr_aux_backlight_control == 1*/) caps->aux_support = true; if (amdgpu_backlight == 0)