blob: 2c3746c44f5508ff1c9bf1753c86402a76fc2d6a [file] [log] [blame]
From d956e4fc04ddc6abe916f542ce5ff17b6b5df57d Mon Sep 17 00:00:00 2001
From: John Stultz <>
Date: Wed, 29 Jan 2020 20:12:44 +0000
Subject: [PATCH] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for
commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d upstream.
I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.
This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
Thanks as always to Sami for his help narrowing this down.
Cc: Rob Clark <>
Cc: Sean Paul <>
Cc: Sami Tolvanen <>
Cc: Todd Kjos <>
Cc: Alistair Delva <>
Cc: Amit Pundir <>
Cc: Sumit Semwal <>
Signed-off-by: John Stultz <>
Reviewed-by: Nick Desaulniers <>
Tested-by: Amit Pundir <>
Signed-off-by: Rob Clark <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index ec6cb0f7f206..b61ced4dcb72 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -320,7 +320,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector)
return num;
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
int id = dsi_mgr_connector_get_id(connector);