Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3098444ybi; Thu, 18 Jul 2019 21:00:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVG+7P5qtC82j/gpEt90Ugsf/uY1ktMfrrFdayF3ijG0KsNPlTgWYbxiCgt6QCbHvb/TOR X-Received: by 2002:a65:6497:: with SMTP id e23mr49694829pgv.89.1563508832946; Thu, 18 Jul 2019 21:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508832; cv=none; d=google.com; s=arc-20160816; b=W/NJysQmJl0VWL2odVn9Gk5RshNiOhpSTWOBzn+l1hmOZeX+ZJsBQw/6O5BtbRHNer u6hjC6F7OmUTAn1jZuF9hjLQwBS1lFHf4ml11G8qx6AVocHsJpJKCfRHrxkLdTDcJ77Y DBdT1tkYNffzdfA9qybveMsIGh7jpXF+n20Cwc7UMbMthRB8ehH5SY4FNZgq7xPxjZce WF369/2oTgSX05hT0Vx1nJALYugPEZFkO4x29Gg8aWWi6MNXxeDkVNhRlz7ghvTTAJ1i kI1AGjKABd/u/SQk9veS3Zvj+7HTbkCmFUJ+xHDrRA2WWeKJp4h+/V9mjXNGNIl6Y5cb qjvg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5dzS3BNsh4bk3E9+FpS2Ao7AleqCjK/LX7M+VYevFrc=; b=y915rC4OICIPuAOMiYNIoxBsLPG28clVvo/TRDdmDAgJ4hpYSPk5v+YVbDHFHss04Z hHPRfmnjo2m1CLJLUJQ0eNc8ON7omCdbWaajebeVwyhcK3wk/ZLnl7BWH76iClza+XnX v4JZ3e45zZaqh0/XqnU5m4VCTSAd5EfZWyC7iaBrJCdg/0MkjWFmmzdir38mcvELK+WJ RNP4gaJJLg16xgf30KvkWojlKCKob5HO4bUxXgVc8wZdEi1udjRdqI6ayK0y6SbkBerV FBLdyW/lzx8GOwC2SZjTW9uftePLXZIPEijAK+iFqgBy0u3nH80wphwCnEDZsEjZ+FK1 cYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="glryT/8U"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si3861075pls.115.2019.07.18.21.00.17; Thu, 18 Jul 2019 21:00:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b="glryT/8U"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727912AbfGSD6U (ORCPT + 99 others); Thu, 18 Jul 2019 23:58:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727823AbfGSD6S (ORCPT ); Thu, 18 Jul 2019 23:58:18 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C4C9421851; Fri, 19 Jul 2019 03:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508697; bh=A18q6bvzumReKnIF7R7v4bUP7cQ6XlnNJDmpFzffm7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=glryT/8UB0ETnx3d/nUZeKOqaHrcvf8fZ9QZcZLl1wKHs78dlY25ucYFHCWXdzjon 3S03CORL8uEBCDi2FCKQ5sR/Y2/+c16f4cgyTbeMNqCf9AMSPMEkKNqolGlReYhW43 fDaY0xqw+Nxh50y1OteZdhOi477N81Ww4db23L4A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Eryk Brol , Jun Lei , Leo Li , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 037/171] drm/amd/display: Increase Backlight Gain Step Size Date: Thu, 18 Jul 2019 23:54:28 -0400 Message-Id: <20190719035643.14300-37-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eryk Brol [ Upstream commit e25228b02e4833e5b0fdd262801a2ae6cc72b39d ] [Why] Some backlight tests fail due to backlight settling taking too long. This happens because the step size used to change backlight levels is too small. [How] 1. Change the size of the backlight gain step size 2. Change how DMCU firmware gets the step size value so that it is passed in by driver during DMCU initn Signed-off-by: Eryk Brol Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c index 818536eea00a..c6a607cd0e4b 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c @@ -388,6 +388,9 @@ static bool dcn10_dmcu_init(struct dmcu *dmcu) /* Set initialized ramping boundary value */ REG_WRITE(MASTER_COMM_DATA_REG1, 0xFFFF); + /* Set backlight ramping stepsize */ + REG_WRITE(MASTER_COMM_DATA_REG2, abm_gain_stepsize); + /* Set command to initialize microcontroller */ REG_UPDATE(MASTER_COMM_CMD_REG, MASTER_COMM_CMD_REG_BYTE0, MCP_INIT_DMCU); diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h index 60ce56f60ae3..5bd0df55aa5d 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h @@ -263,4 +263,6 @@ struct dmcu *dcn10_dmcu_create( void dce_dmcu_destroy(struct dmcu **dmcu); +static const uint32_t abm_gain_stepsize = 0x0060; + #endif /* _DCE_ABM_H_ */ -- 2.20.1