mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm: display: Fix atomic check for HDMI connector disablement
@ 2025-01-10  8:48 Liu Ying
  2025-01-10  8:48 ` [PATCH v2 1/2] drm/connector: hdmi: Do atomic check when necessary Liu Ying
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Liu Ying @ 2025-01-10  8:48 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: andrzej.hajda, neil.armstrong, rfoss, Laurent.pinchart, jonas,
	jernej.skrabec, maarten.lankhorst, mripard, tzimmermann, airlied,
	simona, dmitry.baryshkov

Hi,

This patch series fixes a potential NULL pointer dereference when using
drm_atomic_helper_connector_hdmi_check() to check a DRM atomic commit
which tries to disable a HDMI connector.

Patch 1 adds necessary checks to avoid the potential NULL pointer dereference.
Patch 2 adds a KUnit test case to make sure that atomic check succeeds when
disabling a HDMI connector.

Patch 1 is tested with i.MX8MP imx-lcdif, but not tested with sun4i and
rockchip due to no HW access.

v2:
* Trim backtrace in patch 1's commit message. (Dmitry)
* Drop timestamps from backtrace in patch 1's commit message. (Dmitry)
* Move the necessary checks from drm_bridge_connector_atomic_check() to
  drm_atomic_helper_connector_hdmi_check(). (Dmitry)
* Add the KUnit test case in patch 2. (Dmitry)

Liu Ying (2):
  drm/connector: hdmi: Do atomic check when necessary
  drm/tests: hdmi: Add connector disablement test

 .../gpu/drm/display/drm_hdmi_state_helper.c   |  3 ++
 .../drm/tests/drm_hdmi_state_helper_test.c    | 52 +++++++++++++++++++
 2 files changed, 55 insertions(+)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-14 18:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-10  8:48 [PATCH v2 0/2] drm: display: Fix atomic check for HDMI connector disablement Liu Ying
2025-01-10  8:48 ` [PATCH v2 1/2] drm/connector: hdmi: Do atomic check when necessary Liu Ying
2025-01-10  9:18   ` Dmitry Baryshkov
2025-01-10  8:48 ` [PATCH v2 2/2] drm/tests: hdmi: Add connector disablement test Liu Ying
2025-01-14 17:48   ` Maxime Ripard
2025-01-14 18:04 ` [PATCH v2 0/2] drm: display: Fix atomic check for HDMI connector disablement Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®