Skip to contentSkip to conversation

drm/panel: st7701: Add prepare_prev_first flag to drm_panel

PATCH Applied Marek Vasut 3 participants 3 messages Nov 24, 2024 – Dec 13, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: st7701: Add prepare_prev_first flag to drm_panel

The DSI host must be enabled for the panel to be initialized in prepare(). Set the prepare_prev_first flag to guarantee this. This fixes the panel operation on NXP i.MX8MP SoC / Samsung DSIM DSI host.

Fixes 849b2e3ff969 ("drm/panel: Add Sitronix ST7701 panel driver")

---
Cc: Chris Morgan <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Hironori KIKUCHI <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Jessica Zhang <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Simona Vetter <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Cc: [email protected] # v6.2+
---
Note that the prepare_prev_first flag was added in Linux 6.2.y commit 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel"), hence the CC stable v6.2+, even if the Fixes tag points to a commit in Linux 5.1.y .

---
 drivers/gpu/drm/panel/panel-sitronix-st7701.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-sitronix-st7701.c +1 -0
index eef03d04e0cd2..1f72ef7ca74c9 100644
@@ -1177,6 +1177,7 @@ static int st7701_probe(struct device *dev, int connector_type)
 		return dev_err_probe(dev, ret, "Failed to get orientation\n");
 
 	drm_panel_init(&st7701->panel, dev, &st7701_funcs, connector_type);
+	st7701->panel.prepare_prev_first = true;
 
 	/**
 	 * Once sleep out has been issued, ST7701 IC required to wait 120ms
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Marek Vasut

The DSI host must be enabled for the panel to be initialized in prepare(). Set the prepare_prev_first flag to guarantee this. This fixes the panel operation on NXP i.MX8MP SoC / Samsung DSIM DSI host.

Hi Marek,

LGTM.

Thanks,

Jessica Zhang

Quoted 40 lines
Fixes 849b2e3ff969 ("drm/panel: Add Sitronix ST7701 panel driver")

---
Cc: Chris Morgan <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Hironori KIKUCHI <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Jessica Zhang <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Simona Vetter <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Cc: [email protected] # v6.2+
---
Note that the prepare_prev_first flag was added in Linux 6.2.y commit 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel"), hence the CC stable v6.2+, even if the Fixes tag points to a commit in Linux 5.1.y .

---
  drivers/gpu/drm/panel/panel-sitronix-st7701.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-sitronix-st7701.c +1 -0
index eef03d04e0cd2..1f72ef7ca74c9 100644
@@ -1177,6 +1177,7 @@ static int st7701_probe(struct device *dev, int connector_type)
  		return dev_err_probe(dev, ret, "Failed to get orientation\n");
 
  	drm_panel_init(&st7701->panel, dev, &st7701_funcs, connector_type);
+	st7701->panel.prepare_prev_first = true;
 
  	/**
  	 * Once sleep out has been issued, ST7701 IC required to wait 120ms
Signature · 1 line
2.45.2
maintainer Applied
#2 lore raw
In reply to Marek Vasut

Hi,

Quoted 6 lines · Marek Vasut

The DSI host must be enabled for the panel to be initialized in prepare(). Set the prepare_prev_first flag to guarantee this. This fixes the panel operation on NXP i.MX8MP SoC / Samsung DSIM DSI host.

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-fixes)

[1/1] drm/panel: st7701: Add prepare_prev_first flag to drm_panel

      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/406dd4c7984a457567ca652455d5efad81983f02
Signature · 1 line
Neil