All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: vop: use IS_REACHABLE(CONFIG_DRM_ANALOGIX_DP)
@ 2026-12-04  2:25 ` Pengpeng Hou
  0 siblings, 0 replies; 3+ messages in thread
From: Pengpeng Hou @ 2026-12-04  2:25 UTC (permalink / raw)
  To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: Chaoyi Chen, Damon Ding, dri-devel, linux-rockchip,
	linux-arm-kernel, Pengpeng Hou

Rockchip VOP's eDP CRC callbacks return the unavailable result if
Analogix DP is modular, even when VOP is itself in a module. The
provider exports the start and stop interfaces.

Use the same reachability test for both callbacks. Retain the existing
output and chip checks.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: 6cca3869c598 ("drm/rockchip: Fix link error when CONFIG_DRM_ANALOGIX_DP undefined")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
Built rockchip_drm_vop.o for arm64 with Clang 18 and W=1, with
DRM_ROCKCHIP=m and DRM_ANALOGIX_DP=m. The patched object references both
Analogix CRC entry points; the original did not reference both. No
display CRC was measured.

 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 69e72727da24f33ced4724b673babb594ab96d07..0860b189918a64a6a5eb1b00545caffbd14b53c6 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -32,7 +32,7 @@
 #include <drm/drm_self_refresh_helper.h>
 #include <drm/drm_vblank.h>
 
-#ifdef CONFIG_DRM_ANALOGIX_DP
+#if IS_REACHABLE(CONFIG_DRM_ANALOGIX_DP)
 #include <drm/bridge/analogix_dp.h>
 #endif
 
@@ -1669,7 +1669,7 @@ static struct drm_crtc_state *vop_crtc_create_state(struct drm_crtc *crtc)
 	return &crtc_state->base;
 }
 
-#ifdef CONFIG_DRM_ANALOGIX_DP
+#if IS_REACHABLE(CONFIG_DRM_ANALOGIX_DP)
 static struct drm_connector *vop_get_edp_connector(struct vop *vop)
 {
 	struct drm_connector *connector;

base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106



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

end of thread, other threads:[~2026-12-04  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  2:25 [PATCH] drm/rockchip: vop: use IS_REACHABLE(CONFIG_DRM_ANALOGIX_DP) Pengpeng Hou
2026-12-04  2:25 ` Pengpeng Hou
2026-12-04  2:40 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.