Commit 359f1dcb authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-fixes-2019-08-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

drm-misc-fixes for v5.3-rc4:
- Suspend fix for rockchip
- Fix unterminated strncpy cmdline mode parser
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ace294a6-6bb2-d9b1-695d-3260e1d60831@linux.intel.com
parents 6ca847a9 f7ccbed6
...@@ -1770,7 +1770,9 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option, ...@@ -1770,7 +1770,9 @@ bool drm_mode_parse_command_line_for_connector(const char *mode_option,
} }
if (named_mode) { if (named_mode) {
strncpy(mode->name, name, mode_end); if (mode_end + 1 > DRM_DISPLAY_MODE_LEN)
return false;
strscpy(mode->name, name, mode_end + 1);
} else { } else {
ret = drm_mode_parse_cmdline_res_mode(name, mode_end, ret = drm_mode_parse_cmdline_res_mode(name, mode_end,
parse_extras, parse_extras,
......
...@@ -432,7 +432,7 @@ static int rockchip_dp_resume(struct device *dev) ...@@ -432,7 +432,7 @@ static int rockchip_dp_resume(struct device *dev)
static const struct dev_pm_ops rockchip_dp_pm_ops = { static const struct dev_pm_ops rockchip_dp_pm_ops = {
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
.suspend = rockchip_dp_suspend, .suspend_late = rockchip_dp_suspend,
.resume_early = rockchip_dp_resume, .resume_early = rockchip_dp_resume,
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment