From 91110a4b64fe0bdbac084b79dbd5f10c458327e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
Date: Thu, 18 May 2017 22:38:36 +0300
Subject: [PATCH] drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
Mime-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8bit
Git-commit: 91110a4b64fe0bdbac084b79dbd5f10c458327e9
Patch-mainline: v4.13-rc1
References: FATE#322643 bsc#1055900
drm_atomic_set_mode_for_crtc() doesn't modify the passed mode, so let's
make it const.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170518193837.393-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Takashi Iwai <tiwai@suse.de>
---
drivers/gpu/drm/drm_atomic.c | 2 +-
include/drm/drm_atomic.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -328,7 +328,7 @@ static s32 __user *get_out_fence_for_crt
* Zero on success, error code on failure. Cannot return -EDEADLK.
*/
int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
- struct drm_display_mode *mode)
+ const struct drm_display_mode *mode)
{
struct drm_mode_modeinfo umode;
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -520,7 +520,7 @@ __drm_atomic_get_current_plane_state(str
int __must_check
drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
- struct drm_display_mode *mode);
+ const struct drm_display_mode *mode);
int __must_check
drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
struct drm_property_blob *blob);