<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/bridge/panel.c, branch v6.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-07-13T08:46:06+00:00</updated>
<entry>
<title>drm/bridge: panel: Introduce drmm_of_get_bridge</title>
<updated>2022-07-13T08:46:06+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-07-11T17:38:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae9f1f2ca093906f06311ade42772eeb021af39f'/>
<id>urn:sha1:ae9f1f2ca093906f06311ade42772eeb021af39f</id>
<content type='text'>
Unlike what can be found for other DRM entities, we don't have a
DRM-managed function equivalent to devm_drm_of_get_bridge().

Let's create it.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://lore.kernel.org/r/20220711173939.1132294-12-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm/bridge: panel: Introduce drmm_panel_bridge_add</title>
<updated>2022-07-13T08:46:06+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-07-11T17:38:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abea75e9207e7744f524a5373e9c149226e17a5d'/>
<id>urn:sha1:abea75e9207e7744f524a5373e9c149226e17a5d</id>
<content type='text'>
Unlike what can be found for other entities, there's no DRM-managed
function to create a panel_bridge instance from a panel.

Let's introduce one.

Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://lore.kernel.org/r/20220711173939.1132294-11-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: Config orientation property if panel provides it</title>
<updated>2022-06-21T15:52:59+00:00</updated>
<author>
<name>Hsin-Yi Wang</name>
<email>hsinyi@chromium.org</email>
</author>
<published>2022-06-09T07:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15b9ca1641f0c3cd74885280331e9172c62a125e'/>
<id>urn:sha1:15b9ca1641f0c3cd74885280331e9172c62a125e</id>
<content type='text'>
Panel orientation property should be set before drm_dev_register().
Some drm driver calls drm_dev_register() in .bind(). However, most
panels sets orientation property relatively late, mostly in .get_modes()
callback, since this is when they are able to get the connector and
binds the orientation property to it, though the value should be known
when the panel is probed.

In drm_bridge_connector_init(), if a bridge is a panel bridge, use it to
set the connector's panel orientation property.

Suggested-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Hsin-Yi Wang &lt;hsinyi@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
[dianders: fixed space vs. tab indentation]
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-9-hsinyi@chromium.org
</content>
</entry>
<entry>
<title>drm: bridge: panel: Register connector if DRM device is already registered</title>
<updated>2022-04-19T16:11:27+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2022-04-19T09:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34263c1b1593e44a3963dcfd6ed9af70c3002686'/>
<id>urn:sha1:34263c1b1593e44a3963dcfd6ed9af70c3002686</id>
<content type='text'>
If panel_bridge_attach() happens after DRM device registration, the
created connector will not be registered by the DRM core anymore. Fix
this by registering it explicitly in such case.

This fixes the following issue observed on Samsung Exynos4210-based Trats
board with a DSI panel (the panel driver is registered after the Exynos DRM
component device is bound):

$ ./modetest -c -Mexynos
could not get connector 56: No such file or directory
Segmentation fault

While touching this, move the connector reset() call also under the DRM
device registered check, because otherwise it is not really needed.

Fixes: 934aef885f9d ("drm: bridge: panel: Reset the connector state pointer")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Signed-off-by: Robert Foss &lt;robert.foss@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220419091422.4255-1-m.szyprowski@samsung.com
</content>
</entry>
<entry>
<title>drm: bridge: panel: Reset the connector state pointer</title>
<updated>2022-03-31T14:21:31+00:00</updated>
<author>
<name>Jagan Teki</name>
<email>jagan@amarulasolutions.com</email>
</author>
<published>2022-03-03T16:36:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=934aef885f9d99662a02690de3737b3b70116121'/>
<id>urn:sha1:934aef885f9d99662a02690de3737b3b70116121</id>
<content type='text'>
Trigger hotplug event with drm_kms_helper_hotplug_event might fail if the
connector state pointer is NULL.

BUG observed in exynos dsi driver where drm_bridge_attach is trying to
register a connector in panel_bridge before the hotplug event is triggered.

WARNING: CPU: 1 PID: 1 at drivers/gpu/drm/drm_atomic_state_helper.c:494 drm_atomic_helper_connector_duplicate_state+0x94/0x9c
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.16.0-rc1-00009-g704b1dbfa4c2 #11058
Hardware name: Samsung Exynos (Flattened Device Tree)
[&lt;c0110b30&gt;] (unwind_backtrace) from [&lt;c010c618&gt;] (show_stack+0x10/0x14)
[&lt;c010c618&gt;] (show_stack) from [&lt;c0b657d4&gt;] (dump_stack_lvl+0x58/0x70)
[&lt;c0b657d4&gt;] (dump_stack_lvl) from [&lt;c01261dc&gt;] (__warn+0xd0/0x134)
[&lt;c01261dc&gt;] (__warn) from [&lt;c0b5f628&gt;] (warn_slowpath_fmt+0x5c/0xb4)
[&lt;c0b5f628&gt;] (warn_slowpath_fmt) from [&lt;c064bce4&gt;] (drm_atomic_helper_connector_duplicate_state+0x94/0x9c)
[&lt;c064bce4&gt;] (drm_atomic_helper_connector_duplicate_state) from [&lt;c0666b64&gt;] (drm_atomic_get_connector_state+0xd4/0x190)
[&lt;c0666b64&gt;] (drm_atomic_get_connector_state) from [&lt;c0667928&gt;] (__drm_atomic_helper_set_config+0x314/0x368)
[&lt;c0667928&gt;] (__drm_atomic_helper_set_config) from [&lt;c067e628&gt;] (drm_client_modeset_commit_atomic+0x170/0x278)
[&lt;c067e628&gt;] (drm_client_modeset_commit_atomic) from [&lt;c067e800&gt;] (drm_client_modeset_commit_locked+0x60/0x1c8)
[&lt;c067e800&gt;] (drm_client_modeset_commit_locked) from [&lt;c067e98c&gt;] (drm_client_modeset_commit+0x24/0x40)
[&lt;c067e98c&gt;] (drm_client_modeset_commit) from [&lt;c06509c0&gt;] (drm_fb_helper_set_par+0xb8/0xf8)
[&lt;c06509c0&gt;] (drm_fb_helper_set_par) from [&lt;c05b86d0&gt;] (fbcon_init+0x2c0/0x518)
[&lt;c05b86d0&gt;] (fbcon_init) from [&lt;c060636c&gt;] (visual_init+0xc0/0x108)
[&lt;c060636c&gt;] (visual_init) from [&lt;c06085e4&gt;] (do_bind_con_driver+0x1b8/0x3a4)
[&lt;c06085e4&gt;] (do_bind_con_driver) from [&lt;c0608b40&gt;] (do_take_over_console+0x13c/0x1e8)
[&lt;c0608b40&gt;] (do_take_over_console) from [&lt;c05b6854&gt;] (do_fbcon_takeover+0x78/0xd8)
[&lt;c05b6854&gt;] (do_fbcon_takeover) from [&lt;c05b1154&gt;] (register_framebuffer+0x208/0x2e0)
[&lt;c05b1154&gt;] (register_framebuffer) from [&lt;c064ead0&gt;] (__drm_fb_helper_initial_config_and_unlock+0x400/0x63c)
[&lt;c064ead0&gt;] (__drm_fb_helper_initial_config_and_unlock) from [&lt;c063a718&gt;] (drm_kms_helper_hotplug_event+0x24/0x30)
[&lt;c063a718&gt;] (drm_kms_helper_hotplug_event) from [&lt;c068f668&gt;] (exynos_dsi_host_attach+0x174/0x1fc)
[&lt;c068f668&gt;] (exynos_dsi_host_attach) from [&lt;c0699354&gt;] (s6e8aa0_probe+0x1b4/0x218)

So reset the atomic state for a given connector by freeing the state pointer
and allocate a new empty state object. This can be done using connector
funcs-&gt;reset helper and has to be done before the hotplug even calls.

This patch calls the connector-&gt;funcs-&gt;reset in panel_bridge_attach.

Signed-off-by: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Robert Foss &lt;robert.foss@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220303163654.3381470-3-jagan@amarulasolutions.com
</content>
</entry>
<entry>
<title>drm: Plumb debugfs_init through to panels</title>
<updated>2022-02-15T23:25:18+00:00</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2022-02-05T00:13:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2509969a9862b522d2208e8663057fb227556687'/>
<id>urn:sha1:2509969a9862b522d2208e8663057fb227556687</id>
<content type='text'>
We'd like panels to be able to add things to debugfs underneath the
connector's directory. Let's plumb it through. A panel will be able to
put things in a "panel" directory under the connector's
directory. Note that debugfs is not ABI and so it's always possible
that the location that the panel gets for its debugfs could change in
the future.

NOTE: this currently only works if you're using a modern
architecture. Specifically the plumbing relies on _both_
drm_bridge_connector and drm_panel_bridge. If you're not using one or
both of these things then things won't be plumbed through.

As a side effect of this change, drm_bridges can also get callbacks to
put stuff underneath the connector's debugfs directory. At the moment
all bridges in the chain have their debugfs_init() called with the
connector's root directory.

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220204161245.v2.2.Ib0bd5346135cbb0b63006b69b61d4c8af6484740@changeid
</content>
</entry>
<entry>
<title>drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c</title>
<updated>2021-09-22T08:44:00+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-09-17T18:09:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4ae66f10c8b9959dce1766d9a87070e567236eb'/>
<id>urn:sha1:d4ae66f10c8b9959dce1766d9a87070e567236eb</id>
<content type='text'>
By depending on devm_drm_panel_bridge_add(), devm_drm_of_get_bridge()
introduces a circular dependency between the modules drm (where
devm_drm_of_get_bridge() ends up) and drm_kms_helper (where
devm_drm_panel_bridge_add() is).

Fix this by moving devm_drm_of_get_bridge() to bridge/panel.c and thus
drm_kms_helper.

Fixes: 87ea95808d53 ("drm/bridge: Add a function to abstract away panels")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210917180925.2602266-1-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: bridge/panel: Cleanup connector on bridge detach</title>
<updated>2021-03-29T15:46:01+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2021-03-27T11:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d906839d321c2efbf3fed4bc31ffd9ff55b75c0'/>
<id>urn:sha1:4d906839d321c2efbf3fed4bc31ffd9ff55b75c0</id>
<content type='text'>
If we don't call drm_connector_cleanup() manually in
panel_bridge_detach(), the connector will be cleaned up with the other
DRM objects in the call to drm_mode_config_cleanup(). However, since our
drm_connector is devm-allocated, by the time drm_mode_config_cleanup()
will be called, our connector will be long gone. Therefore, the
connector must be cleaned up when the bridge is detached to avoid
use-after-free conditions.

v2: Cleanup connector only if it was created

v3: Add FIXME

v4: (Use connector-&gt;dev) directly in if() block

Fixes: 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge.")
Cc: &lt;stable@vger.kernel.org&gt; # 4.12+
Cc: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Cc: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Cc: Laurent Pinchart &lt;Laurent.pinchart@ideasonboard.com&gt;
Cc: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Cc: Jernej Skrabec &lt;jernej.skrabec@siol.net&gt;
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210327115742.18986-2-paul@crapouillou.net
</content>
</entry>
<entry>
<title>drm: Remove unnecessary drm_panel_attach and drm_panel_detach</title>
<updated>2020-08-08T07:06:33+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2020-08-02T16:43:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87154ff86bf69ecf76600e56ecab0b79fc3f71ea'/>
<id>urn:sha1:87154ff86bf69ecf76600e56ecab0b79fc3f71ea</id>
<content type='text'>
These functions are now empty and no longer
useful so remove the functions and their uses.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Bernard Zhao &lt;bernard@vivo.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;,
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Icenowy Zheng &lt;icenowy@aosc.io&gt;,
Cc: Jagan Teki &lt;jagan@amarulasolutions.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Robert Chiras &lt;robert.chiras@nxp.com&gt;
Cc: dri-devel@lists.freedesktop.org,
Cc: linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt; # Fixed build and a few warnings
Link: https://patchwork.freedesktop.org/patch/msgid/9e13761020750b1ce2f1fabee23ef6e2a2942882.camel@perches.com
</content>
</entry>
<entry>
<title>drm/bridge: panel: Return always an error pointer in drm_panel_bridge_add()</title>
<updated>2020-04-25T14:48:55+00:00</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2020-04-16T21:06:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30be3031087139061de4421bf52015931eaab569'/>
<id>urn:sha1:30be3031087139061de4421bf52015931eaab569</id>
<content type='text'>
Since commit 89958b7cd955 ("drm/bridge: panel: Infer connector type from
panel by default"), drm_panel_bridge_add() and their variants can return
NULL and an error pointer. This is fine but none of the actual users of
the API are checking for the NULL value. Instead of change all the
users, seems reasonable to return an error pointer instead. So change
the returned value for those functions when the connector type is unknown.

Suggested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200416210654.2468805-1-enric.balletbo@collabora.com
</content>
</entry>
</feed>
