Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp733219imm; Thu, 13 Sep 2018 07:00:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1dFV+L7jIYGRLlAvmsyx5UFj6cGFW2PihYIpQUnTiHeff+pgvOWwxZIv90a6YE9WxbSgv X-Received: by 2002:a17:902:8e86:: with SMTP id bg6-v6mr7543556plb.108.1536847233530; Thu, 13 Sep 2018 07:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847233; cv=none; d=google.com; s=arc-20160816; b=L3mS8GgtzhzA0Z1Nrod82+nkSVw2SCenDz/IjuUT/3PcxHEPTqtb3TSJcbruyDyYpK kTEJldq2U91jHwnqlOx+A/wXYCoVyulBX2Iv3cncjA4rRMlZh71J3lTPO0B2kzpZJyOz c3JSssl+3H3okn0gwJ794qIq0JhGO9hf8nOcUt93E/t+x/eW+74EuQHgWSed/TmJwzUJ fOY1tGr3GPcyo/WgtQoWZAgqLYPJ+Bul7WAL7th7Fn00kzfDFPLrpUia4pQgcrpYUM5F GfMRVkMT7M+oxY/NK7T5AEVcBRPyBzbrFEFQMGMzgn9VlOy0xZC1609FFQLRCmW0Pv87 KCzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=d+SWPt4hxs3UxnuslFJqral420HFg5k+7mUozOUF/k4=; b=AcjAMf5V9xJ4ry6alcqQzgN6Ml3dOUntdgKTSs+vBAnEaDJu+7rk4yLvAqj8ayBwKb HvkwDKhcsSEfpJt7U+DQUmiGYQYDdtI/vsh9wkCjUkPBYWsMvn242t2uolhKUCg2HoF/ cOhnAPcdX7Y12lLqodSJiG1kHe//6BVWIIK/7DVLuQ4ih9vxUOS4wLhJU7kwyq8bmdxS w2djp2c+4l6RaKCc/j0dxya8kwPM4KWjhgT4qoTvGNEUnMvg2nT54aL2Lyam1ibhPOQH eescAdtdyrOzBATqDcdBRW34+IcmXtB0H80UNODyv6V2ttXrIchSv265zOa04Pnz/cFC ImjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si4218540plt.342.2018.09.13.07.00.17; Thu, 13 Sep 2018 07:00:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731772AbeIMTJo (ORCPT + 99 others); Thu, 13 Sep 2018 15:09:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34904 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729831AbeIMTJn (ORCPT ); Thu, 13 Sep 2018 15:09:43 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AD067D15; Thu, 13 Sep 2018 14:00:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Francis , Harry Wentland , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 4.18 129/197] drm/amd/display: Read back max backlight value at boot Date: Thu, 13 Sep 2018 15:31:18 +0200 Message-Id: <20180913131846.711053417@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Francis [ Upstream commit 53a53f8687faf492df2644d8c18ff0217fc18730 ] [Why] If there is no program explicitly setting the backlight brightness (for example, during a minimal install of linux), the hardware defaults to maximum brightness but the backlight_device defaults to 0 value. Thus, settings displays the wrong brightness value. [How] When creating the backlight device, set brightness to max Signed-off-by: David Francis Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1334,6 +1334,7 @@ amdgpu_dm_register_backlight_device(stru struct backlight_properties props = { 0 }; props.max_brightness = AMDGPU_MAX_BL_LEVEL; + props.brightness = AMDGPU_MAX_BL_LEVEL; props.type = BACKLIGHT_RAW; snprintf(bl_name, sizeof(bl_name), "amdgpu_bl%d",