From patchwork Wed Mar 6 03:13:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yu, Gareth" X-Patchwork-Id: 13583298 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00C2DC54E49 for ; Wed, 6 Mar 2024 03:06:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 77633112382; Wed, 6 Mar 2024 03:06:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="TKeqSUEA"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id A4301112382 for ; Wed, 6 Mar 2024 03:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709694386; x=1741230386; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZAWGyNBOBH/Lk1u7Rc+GiELJ77g12p0bMOJIEZ91S5k=; b=TKeqSUEAq6ZaQcV2FGqcqSRBdC9xtYBCtS2UqEq3G3lGIlKvQPaL8xdz ljx/wnlQzVi25T4k8xr5/Vv8rObZQGkJVZ/xYaqi8jCdy0PV+2MNeI9ib 12sNMcETEn1u00LWeI7Qf0+W5h0t0DuPzhYG0OdWD+PePPS1i5s+gsYm/ 9i22MbqWmS91yX67celZGderDFO+z1mHNEvSOYicieDRSJwJKgENgQmf/ fOxpqqo9CwkA7UuTV+ELdp3X9tPN1PqZlQxWrXw+ZVLvXyG0P1ksOzIRR Ubaf38SIZkNtiSVTlYrN8afwcjFoAzfsUF8xabb0C2Aj9Ijt2jDUKI7O7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="4458789" X-IronPort-AV: E=Sophos;i="6.06,207,1705392000"; d="scan'208";a="4458789" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 19:06:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,207,1705392000"; d="scan'208";a="40479530" Received: from gyu3-linux.itwn.intel.com ([10.225.64.197]) by orviesa002.jf.intel.com with ESMTP; 05 Mar 2024 19:06:12 -0800 From: gareth.yu@intel.com To: intel-gfx@lists.freedesktop.org Cc: Gareth Yu Subject: [PATCH] drm/i915/display: Fixed a screen flickering when turning on display from off Date: Wed, 6 Mar 2024 11:13:48 +0800 Message-Id: <20240306031348.1344034-1-gareth.yu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Gareth Yu Turn on the panel from zero brightness of the last state, the panel was set a maximum PWM in the flow. Once the panel initialization is completed, the backlight is restored to zero brightness. There is a flckering generated. Set the brightness to the minimum value when the brightness is less or equal to the minimum value to fix this flickering Cc : Tejas Upadhyay Cc : Matt Roper Cc : Ville Syrjälä Signed-off-by: Gareth Yu --- drivers/gpu/drm/i915/display/intel_backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c index 3f3cd944a1c5..855d6ead905c 100644 --- a/drivers/gpu/drm/i915/display/intel_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_backlight.c @@ -762,7 +762,7 @@ static void __intel_backlight_enable(const struct intel_crtc_state *crtc_state, WARN_ON(panel->backlight.max == 0); if (panel->backlight.level <= panel->backlight.min) { - panel->backlight.level = panel->backlight.max; + panel->backlight.level = panel->backlight.min; if (panel->backlight.device) panel->backlight.device->props.brightness = scale_hw_to_user(connector,