All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Tseng <william.tseng@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Cooper Chiou <cooper.chiou@intel.com>,
	William Tseng <william.tseng@intel.com>
Subject: [Intel-gfx] [PATCH v3] drm/i915/dsi: transmit brightness command in HS state
Date: Wed, 10 Nov 2021 09:02:17 +0800	[thread overview]
Message-ID: <20211110010217.26759-1-william.tseng@intel.com> (raw)
In-Reply-To: <20211109082458.13740-1-william.tseng@intel.com>

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 <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Lee Shawn C <shawn.c.lee@intel.com>
Cc: Cooper Chiou <cooper.chiou@intel.com>
Signed-off-by: William Tseng <william.tseng@intel.com>
---
 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;
 	}
 }
 
-- 
2.17.1


  parent reply	other threads:[~2021-11-10  1:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09  6:50 [Intel-gfx] [PATCH] drm/i915/dsi: transmit brightness command in HS state William Tseng
2021-11-09  7:22 ` Jani Nikula
2021-11-09  8:23   ` Tseng, William
2021-11-09  7:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-09  8:24 ` [Intel-gfx] [PATCH v2] " William Tseng
2021-11-09 10:40   ` Jani Nikula
2021-11-10  1:01     ` Tseng, William
2021-11-10  1:02   ` William Tseng [this message]
2021-11-10 10:44     ` [Intel-gfx] [PATCH v3] " Jani Nikula
2021-11-11  1:14       ` Tseng, William
2021-11-11 10:09         ` Jani Nikula
2021-11-09  9:10 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
2021-11-09 10:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dsi: transmit brightness command in HS state (rev2) Patchwork
2021-11-09 12:26 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-10  2:21 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dsi: transmit brightness command in HS state (rev3) Patchwork
2021-11-10 15:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dsi: transmit brightness command in HS state (rev4) Patchwork
2021-11-10 18:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211110010217.26759-1-william.tseng@intel.com \
    --to=william.tseng@intel.com \
    --cc=cooper.chiou@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.