mbox series

[v2,0/2] drm: display: Fix atomic check for HDMI connector disablement

Message ID 20250110084821.3239518-1-victor.liu@nxp.com (mailing list archive)
Headers show
Series drm: display: Fix atomic check for HDMI connector disablement | expand

Message

Liu Ying Jan. 10, 2025, 8:48 a.m. UTC
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(+)