<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/stm, branch v5.15.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-07-19T13:35:55+00:00</updated>
<entry>
<title>drm/stm: dsi: compute the transition time from LP to HS and back</title>
<updated>2021-07-19T13:35:55+00:00</updated>
<author>
<name>Antonio Borneo</name>
<email>antonio.borneo@foss.st.com</email>
</author>
<published>2021-07-13T14:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5cc4e71f0199391b0e311c44e79736c13eea269d'/>
<id>urn:sha1:5cc4e71f0199391b0e311c44e79736c13eea269d</id>
<content type='text'>
The driver uses a conservative set of hardcoded values for the
maximum time delay of the transitions between LP and HS, either
for data and clock lanes.

By using the info in STM32MP157 datasheet, valid also for other ST
devices, compute the actual delay from the lane's bps.

Signed-off-by: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Reviewed-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Acked-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Signed-off-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210713144941.3599-1-antonio.borneo@foss.st.com
</content>
</entry>
<entry>
<title>drm/stm: ltdc: Silence -EPROBE_DEFER till bridge attached</title>
<updated>2021-07-19T13:31:56+00:00</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2021-07-04T13:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=648ce7fd186cfb2ed7443f32bea8db735f9d219c'/>
<id>urn:sha1:648ce7fd186cfb2ed7443f32bea8db735f9d219c</id>
<content type='text'>
As dw-mipi-dsi supported all possible ways to find the DSI
devices. It can take multiple iterations for ltdc to find
all components attached to the DSI bridge.

The current ltdc driver failed to find the endpoint as
it returned -EINVAL for the first iteration itself. This leads
to following error:

[    3.099289] [drm:ltdc_load] *ERROR* init encoder endpoint 0

So, check the return value and cleanup the encoder only if it's
not -EPROBE_DEFER. This make all components in the attached DSI
bridge found properly.

Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Tested-by: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Acked-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Signed-off-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210704135914.268308-1-jagan@amarulasolutions.com
</content>
</entry>
<entry>
<title>drm/stm: Don't set struct drm_device.irq_enabled</title>
<updated>2021-06-29T13:40:45+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-06-25T08:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa2fcf12178a3e2cecd251fdf0cd17a713b83125'/>
<id>urn:sha1:aa2fcf12178a3e2cecd251fdf0cd17a713b83125</id>
<content type='text'>
The field drm_device.irq_enabled is only used by legacy drivers
with userspace modesetting. Don't set it in stm.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Tested-by: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210625082222.3845-20-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/&lt;driver&gt;: drm_gem_plane_helper_prepare_fb is now the default</title>
<updated>2021-06-24T13:35:24+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2021-06-22T16:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29a840842743d3ac20a3ac93d4f32fa9db503b9f'/>
<id>urn:sha1:29a840842743d3ac20a3ac93d4f32fa9db503b9f</id>
<content type='text'>
No need to set it explicitly.

Acked-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Acked-by: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Acked-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Acked-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Acked-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Laurentiu Palcu &lt;laurentiu.palcu@oss.nxp.com&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: NXP Linux Team &lt;linux-imx@nxp.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: Paul Cercueil &lt;paul@crapouillou.net&gt;
Cc: Chun-Kuang Hu &lt;chunkuang.hu@kernel.org&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Cc: Kevin Hilman &lt;khilman@baylibre.com&gt;
Cc: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Cc: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
Cc: Stefan Agner &lt;stefan@agner.ch&gt;
Cc: Sandy Huang &lt;hjc@rock-chips.com&gt;
Cc: "Heiko Stübner" &lt;heiko@sntech.de&gt;
Cc: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Cc: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Chen-Yu Tsai &lt;wens@csie.org&gt;
Cc: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt;
Cc: Jyri Sarha &lt;jyri.sarha@iki.fi&gt;
Cc: Tomi Valkeinen &lt;tomba@kernel.org&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-sunxi@lists.linux.dev
Link: https://patchwork.freedesktop.org/patch/msgid/20210622165511.3169559-9-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/stm: Remove usage of drm_display_mode_to_videomode()</title>
<updated>2021-06-08T16:49:36+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2021-06-07T17:24:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e99168f9f08644217d052808dd611dfe43e839cb'/>
<id>urn:sha1:e99168f9f08644217d052808dd611dfe43e839cb</id>
<content type='text'>
There is not much value in the extra conversion step, the calculations
required for the LTDC IP are different than what is used in the
drm_display_mode_to_videomode(), so just do the right ones in the LTDC
driver right away.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Cc: Antonio Borneo &lt;antonio.borneo@foss.st.com&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@foss.st.com&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Vincent Abriou &lt;vincent.abriou@foss.st.com&gt;
Cc: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-stm32@st-md-mailman.stormreply.com
To: dri-devel@lists.freedesktop.org
Tested-by: Yannick Fertré &lt;yannick.fertre@st.com&gt;
Signed-off-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210607172457.14471-1-marex@denx.de
</content>
</entry>
<entry>
<title>drm/stm: Don't set allow_fb_modifiers explicitly</title>
<updated>2021-05-06T09:43:50+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2021-04-27T09:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b397027b8e4536e754b4ec9b332c72ccd905acc0'/>
<id>urn:sha1:b397027b8e4536e754b4ec9b332c72ccd905acc0</id>
<content type='text'>
Since

commit 890880ddfdbe256083170866e49c87618b706ac7
Author: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Date:   Fri Jan 4 09:56:10 2019 +0100

    drm: Auto-set allow_fb_modifiers when given modifiers at plane init

this is done automatically as part of plane init, if drivers set the
modifier list correctly. Which is the case here.

Acked-by: Philippe Cornu &lt;philippe.cornu@st.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Cc: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Cc: Benjamin Gaignard &lt;benjamin.gaignard@linaro.org&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20210427092018.832258-7-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/stm: dsi: Avoid printing errors for -EPROBE_DEFER</title>
<updated>2021-03-08T14:06:56+00:00</updated>
<author>
<name>Yannick Fertre</name>
<email>yannick.fertre@foss.st.com</email>
</author>
<published>2021-02-22T09:22:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=edf208591724e66682cc5aa0b61035800757a49a'/>
<id>urn:sha1:edf208591724e66682cc5aa0b61035800757a49a</id>
<content type='text'>
Don't print error when probe deferred error is returned.

Signed-off-by: Raphael Gallais-Pou &lt;raphael.gallais-pou@foss.st.com&gt;
Signed-off-by: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Tested-by: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Signed-off-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210222092205.32086-2-raphael.gallais-pou@foss.st.com
</content>
</entry>
<entry>
<title>drm/stm: ltdc: Use simple encoder</title>
<updated>2021-03-08T10:40:29+00:00</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2021-03-02T17:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a9cdf68092908313320c6959c4e1bdfdb7103613'/>
<id>urn:sha1:a9cdf68092908313320c6959c4e1bdfdb7103613</id>
<content type='text'>
STM ltdc driver uses an empty implementation for its encoder.
Replace the code with the generic simple encoder.

Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Yannick Fertre &lt;yannick.fertre@foss.st.com&gt;
Signed-off-by: Philippe Cornu &lt;philippe.cornu@foss.st.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210302175700.28640-1-jagan@amarulasolutions.com
</content>
</entry>
<entry>
<title>drm: Use state helper instead of the plane state pointer</title>
<updated>2021-02-25T07:05:28+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37418bf14c1392260d633e3b4448b78c2f15044a'/>
<id>urn:sha1:37418bf14c1392260d633e3b4448b78c2f15044a</id>
<content type='text'>
Many drivers reference the plane-&gt;state pointer in order to get the
current plane state in their atomic_update or atomic_disable hooks,
which would be the new plane state in the global atomic state since
_swap_state happened when those hooks are run.

Use the drm_atomic_get_new_plane_state helper to get that state to make it
more obvious.

This was made using the coccinelle script below:

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

(
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_disable = func,
	...,
 };
|
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_update = func,
	...,
 };
)

@ adds_new_state @
identifier plane_atomic_func.func;
identifier plane, state;
identifier new_state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state)
 {
 	...
-	struct drm_plane_state *new_state = plane-&gt;state;
+	struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, plane);
	...
 }

@ include depends on adds_new_state @
@@

 #include &lt;drm/drm_atomic.h&gt;

@ no_include depends on !include &amp;&amp; adds_new_state @
@@

+ #include &lt;drm/drm_atomic.h&gt;
  #include &lt;drm/...&gt;

Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://lore.kernel.org/r/20210219120032.260676-1-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm/atomic: Pass the full state to planes atomic disable and update</title>
<updated>2021-02-25T07:05:28+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-02-19T12:00:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=977697e20b3d758786b67edc33941e5c410ffe4d'/>
<id>urn:sha1:977697e20b3d758786b67edc33941e5c410ffe4d</id>
<content type='text'>
The current atomic helpers have either their object state being passed as
an argument or the full atomic state.

The former is the pattern that was done at first, before switching to the
latter for new hooks or when it was needed.

Let's convert the remaining helpers to provide a consistent interface,
this time with the planes atomic_update and atomic_disable.

The conversion was done using the coccinelle script below, built tested on
all the drivers.

@@
identifier plane, plane_state;
symbol state;
@@

 struct drm_plane_helper_funcs {
 	...
	void (*atomic_update)(struct drm_plane *plane,
-			      struct drm_plane_state *plane_state);
+			      struct drm_atomic_state *state);
 	...
 }

@@
identifier plane, plane_state;
symbol state;
@@

 struct drm_plane_helper_funcs {
	...
	void (*atomic_disable)(struct drm_plane *plane,
-			       struct drm_plane_state *plane_state);
+			       struct drm_atomic_state *state);
	...
 }

@ plane_atomic_func @
identifier helpers;
identifier func;
@@

(
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_update = func,
	...,
 };
|
 static const struct drm_plane_helper_funcs helpers = {
 	...,
 	.atomic_disable = func,
	...,
 };
)

@@
struct drm_plane_helper_funcs *FUNCS;
identifier f;
identifier crtc_state;
identifier plane, plane_state, state;
expression e;
@@

 f(struct drm_crtc_state *crtc_state)
 {
 	...
 	struct drm_atomic_state *state = e;
 	&lt;+...
(
-	FUNCS-&gt;atomic_disable(plane, plane_state)
+	FUNCS-&gt;atomic_disable(plane, state)
|
-	FUNCS-&gt;atomic_update(plane, plane_state)
+	FUNCS-&gt;atomic_update(plane, state)
)
 	...+&gt;
 }

@@
identifier plane_atomic_func.func;
identifier plane;
symbol state;
@@

 func(struct drm_plane *plane,
-    struct drm_plane_state *state)
+    struct drm_plane_state *old_plane_state)
 {
	&lt;...
-	state
+	old_plane_state
	...&gt;
 }

@ ignores_old_state @
identifier plane_atomic_func.func;
identifier plane, old_state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *old_state)
 {
	... when != old_state
 }

@ adds_old_state depends on plane_atomic_func &amp;&amp; !ignores_old_state @
identifier plane_atomic_func.func;
identifier plane, plane_state;
@@

 func(struct drm_plane *plane, struct drm_plane_state *plane_state)
 {
+	struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane);
 	...
 }

@ depends on plane_atomic_func @
identifier plane_atomic_func.func;
identifier plane, plane_state;
@@

 func(struct drm_plane *plane,
-     struct drm_plane_state *plane_state
+     struct drm_atomic_state *state
     )
 { ... }

@ include depends on adds_old_state @
@@

 #include &lt;drm/drm_atomic.h&gt;

@ no_include depends on !include &amp;&amp; adds_old_state @
@@

+ #include &lt;drm/drm_atomic.h&gt;
  #include &lt;drm/...&gt;

@@
identifier plane_atomic_func.func;
identifier plane, state;
identifier plane_state;
@@

 func(struct drm_plane *plane, struct drm_atomic_state *state) {
 	...
 	struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane);
 	&lt;+...
-	plane_state-&gt;state
+	state
 	...+&gt;
 }

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-9-maxime@cerno.tech
</content>
</entry>
</feed>
