<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/display, branch for-next</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=for-next</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=for-next'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-01-13T09:18:20Z</updated>
<entry>
<title>drm/bridge-connector: Sync supported_formats with computed ycbcr_420_allowed</title>
<updated>2025-01-13T09:18:20Z</updated>
<author>
<name>Cristian Ciocaltea</name>
<email>cristian.ciocaltea@collabora.com</email>
</author>
<published>2024-12-24T18:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1bd1562d3522f7a846dad795359c31b371e6303b'/>
<id>urn:sha1:1bd1562d3522f7a846dad795359c31b371e6303b</id>
<content type='text'>
The case of having an HDMI bridge in the pipeline which advertises
YUV420 capability via its -&gt;supported_formats and a non-HDMI one that
didn't enable -&gt;ycbcr_420_allowed, is incorrectly handled because
supported_formats is passed as is to the helper initializing the HDMI
connector.

Ensure HDMI_COLORSPACE_YUV420 is removed from the bitmask passed to
drmm_connector_hdmi_init() when connector's -&gt;ycbcr_420_allowed flag
ends up not being set.

Fixes: 3ced1c687512 ("drm/display: bridge_connector: handle ycbcr_420_allowed")
Signed-off-by: Cristian Ciocaltea &lt;cristian.ciocaltea@collabora.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241224-bridge-conn-fmt-prio-v4-2-a9ceb5671379@collabora.com
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
</content>
</entry>
<entry>
<title>drm/display: use ERR_PTR on DP tunnel manager creation fail</title>
<updated>2024-12-13T16:57:34Z</updated>
<author>
<name>Krzysztof Karas</name>
<email>krzysztof.karas@intel.com</email>
</author>
<published>2024-12-12T11:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=080b2e7b5e9ad23343e4b11f0751e4c724a78958'/>
<id>urn:sha1:080b2e7b5e9ad23343e4b11f0751e4c724a78958</id>
<content type='text'>
Instead of returning a generic NULL on error from
drm_dp_tunnel_mgr_create(), use error pointers with informative codes
to align the function with stub that is executed when
CONFIG_DRM_DISPLAY_DP_TUNNEL is unset. This will also trigger IS_ERR()
in current caller (intel_dp_tunnerl_mgr_init()) instead of bypassing it
via NULL pointer.

v2: use error codes inside drm_dp_tunnel_mgr_create() instead of handling
 on caller's side (Michal, Imre)

v3: fixup commit message and add "CC"/"Fixes" lines (Andi),
 mention aligning function code with stub

Fixes: 91888b5b1ad2 ("drm/i915/dp: Add support for DP tunnel BW allocation")
Cc: Imre Deak &lt;imre.deak@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v6.9+
Signed-off-by: Krzysztof Karas &lt;krzysztof.karas@intel.com&gt;
Reviewed-by: Andi Shyti &lt;andi.shyti@linux.intel.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/7q4fpnmmztmchczjewgm6igy55qt6jsm7tfd4fl4ucfq6yg2oy@q4lxtsu6445c
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-fixes-2024-12-05' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes</title>
<updated>2024-12-05T22:40:47Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2024-12-05T22:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=471f3a21addd4e5f170ab1364f11c3e4823e687d'/>
<id>urn:sha1:471f3a21addd4e5f170ab1364f11c3e4823e687d</id>
<content type='text'>
drm-misc-fixes v6.13-rc2:
- v3d performance counter fix.
- A lot of DP-MST related fixes.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
From: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/2ce1650d-801f-4265-a876-5a8743f1c82b@linux.intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Use reset_msg_rx_state() instead of open coding it</title>
<updated>2024-12-05T14:49:41Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-03T16:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59ca0e1c97c5d752f85ca2922ff258ff5e62bc73'/>
<id>urn:sha1:59ca0e1c97c5d752f85ca2922ff258ff5e62bc73</id>
<content type='text'>
Use reset_msg_rx_state() in drm_dp_mst_handle_up_req() instead of
open-coding it.

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241203160223.2926014-8-imre.deak@intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Reset message rx state after OOM in drm_dp_mst_handle_up_req()</title>
<updated>2024-12-05T14:19:35Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-03T16:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b245c97b1af5d8f04c359e0826cb5a5c81ef704'/>
<id>urn:sha1:2b245c97b1af5d8f04c359e0826cb5a5c81ef704</id>
<content type='text'>
After an out-of-memory error the reception state should be reset, so
that the next attempt receiving a message doesn't fail (due to getting a
start-of-message packet, while the reception state has already the
start-of-message flag set).

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241203160223.2926014-7-imre.deak@intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Ensure mst_primary pointer is valid in drm_dp_mst_handle_up_req()</title>
<updated>2024-12-05T14:19:30Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-04T13:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e54b00086f7473dbda1a7d6fc47720ced157c6a8'/>
<id>urn:sha1:e54b00086f7473dbda1a7d6fc47720ced157c6a8</id>
<content type='text'>
While receiving an MST up request message from one thread in
drm_dp_mst_handle_up_req(), the MST topology could be removed from
another thread via drm_dp_mst_topology_mgr_set_mst(false), freeing
mst_primary and setting drm_dp_mst_topology_mgr::mst_primary to NULL.
This could lead to a NULL deref/use-after-free of mst_primary in
drm_dp_mst_handle_up_req().

Avoid the above by holding a reference for mst_primary in
drm_dp_mst_handle_up_req() while it's used.

v2: Fix kfreeing the request if getting an mst_primary reference fails.

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt; (v1)
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241204132007.3132494-1-imre.deak@intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Fix down request message timeout handling</title>
<updated>2024-12-05T14:19:09Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-03T17:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f611855031f94385c2eeb32b1f99dd7a9fa566b'/>
<id>urn:sha1:3f611855031f94385c2eeb32b1f99dd7a9fa566b</id>
<content type='text'>
If receiving a reply for an MST down request message times out, the
thread receiving the reply in drm_dp_mst_handle_down_rep() could try to
dereference the drm_dp_sideband_msg_tx txmsg request message after the
thread waiting for the reply - calling drm_dp_mst_wait_tx_reply() - has
timed out and freed txmsg, hence leading to a use-after-free in
drm_dp_mst_handle_down_rep().

Prevent the above by holding the drm_dp_mst_topology_mgr::qlock in
drm_dp_mst_handle_down_rep() for the whole duration txmsg is looked up
from the request list and dereferenced.

v2: Fix unlocking mgr-&gt;qlock after verify_rx_request_type() fails.

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241203174632.2941402-1-imre.deak@intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Simplify error path in drm_dp_mst_handle_down_rep()</title>
<updated>2024-12-05T14:18:58Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-03T16:02:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b559b68d2761739b7c2e44d6fa59092b0d03e9ed'/>
<id>urn:sha1:b559b68d2761739b7c2e44d6fa59092b0d03e9ed</id>
<content type='text'>
Simplify the error return path in drm_dp_mst_handle_down_rep(),
preparing for the next patch.

While at it use reset_msg_rx_state() instead of open-coding it.

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241203160223.2926014-4-imre.deak@intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Verify request type in the corresponding down message reply</title>
<updated>2024-12-05T14:18:46Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-03T16:02:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d49e77a973d3b5d1881663c3f122906a0702940'/>
<id>urn:sha1:4d49e77a973d3b5d1881663c3f122906a0702940</id>
<content type='text'>
After receiving the response for an MST down request message, the
response should be accepted/parsed only if the response type matches
that of the request. Ensure this by checking if the request type code
stored both in the request and the reply match, dropping the reply in
case of a mismatch.

This fixes the topology detection for an MST hub, as described in the
Closes link below, where the hub sends an incorrect reply message after
a CLEAR_PAYLOAD_TABLE -&gt; LINK_ADDRESS down request message sequence.

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12804
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241203160223.2926014-3-imre.deak@intel.com
</content>
</entry>
<entry>
<title>drm/dp_mst: Fix resetting msg rx state after topology removal</title>
<updated>2024-12-05T14:18:07Z</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2024-12-03T16:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6fa67d26de385c3c7a23c1e109a0e23bfda4ec7'/>
<id>urn:sha1:a6fa67d26de385c3c7a23c1e109a0e23bfda4ec7</id>
<content type='text'>
If the MST topology is removed during the reception of an MST down reply
or MST up request sideband message, the
drm_dp_mst_topology_mgr::up_req_recv/down_rep_recv states could be reset
from one thread via drm_dp_mst_topology_mgr_set_mst(false), racing with
the reading/parsing of the message from another thread via
drm_dp_mst_handle_down_rep() or drm_dp_mst_handle_up_req(). The race is
possible since the reader/parser doesn't hold any lock while accessing
the reception state. This in turn can lead to a memory corruption in the
reader/parser as described by commit bd2fccac61b4 ("drm/dp_mst: Fix MST
sideband message body length check").

Fix the above by resetting the message reception state if needed before
reading/parsing a message. Another solution would be to hold the
drm_dp_mst_topology_mgr::lock for the whole duration of the message
reception/parsing in drm_dp_mst_handle_down_rep() and
drm_dp_mst_handle_up_req(), however this would require a bigger change.
Since the fix is also needed for stable, opting for the simpler solution
in this patch.

Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 1d082618bbf3 ("drm/display/dp_mst: Fix down/up message handling after sink disconnect")
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13056
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241203160223.2926014-2-imre.deak@intel.com
</content>
</entry>
</feed>
