From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5424FC433F5 for ; Thu, 11 Nov 2021 10:09:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0B77661215 for ; Thu, 11 Nov 2021 10:09:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0B77661215 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E4AA6EA5D; Thu, 11 Nov 2021 10:09:53 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09CA26EA76 for ; Thu, 11 Nov 2021 10:09:52 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10164"; a="212920948" X-IronPort-AV: E=Sophos;i="5.87,225,1631602800"; d="scan'208";a="212920948" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2021 02:09:51 -0800 X-IronPort-AV: E=Sophos;i="5.87,225,1631602800"; d="scan'208";a="504374678" Received: from pbohlinb-mobl.ger.corp.intel.com (HELO localhost) ([10.249.33.242]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2021 02:09:48 -0800 From: Jani Nikula To: "20211110010217.26759-1-william.tseng\@intel.com" <20211110010217.26759-1-william.tseng@intel.com>, "intel-gfx\@lists.freedesktop.org" In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20211109082458.13740-1-william.tseng@intel.com> <20211110010217.26759-1-william.tseng@intel.com> <87r1bo47dh.fsf@intel.com> Date: Thu, 11 Nov 2021 12:09:46 +0200 Message-ID: <87ilwz3swl.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/dsi: transmit brightness command in HS state 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: , Cc: "Chiou, Cooper" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, 11 Nov 2021, "Tseng, William" wrote: > Noted. Thanks for your consideration, Jani. And pushed, thanks for the patch. BR, Jani. > > Regards > William > > -----Original Message----- > From: Jani Nikula > Sent: Wednesday, November 10, 2021 6:45 PM > To: Tseng, William ; intel-gfx@lists.freedesktop.org > Cc: Tseng, William ; Ville Syrjala ; Kulkarni, Vandita ; Lee, Shawn C ; Chiou, Cooper > Subject: Re: [PATCH v3] drm/i915/dsi: transmit brightness command in HS state > > On Wed, 10 Nov 2021, William Tseng wrote: >> In Video Mode, if DSI transcoder is set to transmit packets in LP >> Escape mode, screen flickering would be obseved when brightness >> commands are continuously and quickly transmitted to a panel. >> >> The problem may be resolved by changing the mode to transmit packets >> from Low Power to HS. >> >> Cc: Ville Syrjala >> Cc: Jani Nikula >> Cc: Vandita Kulkarni >> Cc: Lee Shawn C >> Cc: Cooper Chiou >> Signed-off-by: William Tseng >> --- >> drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c >> b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c >> index f61ed82e8867..7d234429e71e 100644 >> --- a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c >> +++ b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c >> @@ -71,6 +71,7 @@ static void dcs_set_backlight(const struct drm_connector_state *conn_state, u32 >> u8 data[2] = {}; >> enum port port; >> size_t len = panel->backlight.max > U8_MAX ? 2 : 1; >> + unsigned long mode_flags; >> >> if (len == 1) { >> data[0] = level; >> @@ -81,8 +82,11 @@ static void dcs_set_backlight(const struct >> drm_connector_state *conn_state, u32 >> >> for_each_dsi_port(port, intel_dsi->dcs_backlight_ports) { >> dsi_device = intel_dsi->dsi_hosts[port]->device; >> + mode_flags = dsi_device->mode_flags; >> + dsi_device->mode_flags &= ~MIPI_DSI_MODE_LPM; >> mipi_dsi_dcs_write(dsi_device, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, >> &data, len); >> + dsi_device->mode_flags = mode_flags; > > I realize we don't really have a clear picture how to manage > ->mode_flags or MIPI_DSI_MODE_LPM in particular, but this seems like the > safest option for now. > > Reviewed-by: Jani Nikula > > I'll push once CI results are in; had to request a re-run. > > > >> } >> } > > -- > Jani Nikula, Intel Open Source Graphics Center -- Jani Nikula, Intel Open Source Graphics Center