Skip to content

Commit

Permalink
drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI
Browse files Browse the repository at this point in the history
[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

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
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: Sami Tolvanen <[email protected]>
Cc: Todd Kjos <[email protected]>
Cc: Alistair Delva <[email protected]>
Cc: Amit Pundir <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: John Stultz <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Tested-by: Amit Pundir <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
johnstultz-work authored and gregkh committed Mar 11, 2020
1 parent dd75e3d commit 1dc1316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/dsi/dsi_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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);
Expand Down

0 comments on commit 1dc1316

Please sign in to comment.