Commit bacdcd55 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Constify load detect mode

Make the mode used for load detection const, and adjust all relevant
functions to accept a const mode.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170518193837.393-2-ville.syrjala@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 17ad4fdd
...@@ -9758,7 +9758,7 @@ static void i9xx_disable_cursor(struct intel_plane *plane, ...@@ -9758,7 +9758,7 @@ static void i9xx_disable_cursor(struct intel_plane *plane,
/* VESA 640x480x72Hz mode to set on the pipe */ /* VESA 640x480x72Hz mode to set on the pipe */
static struct drm_display_mode load_detect_mode = { static const struct drm_display_mode load_detect_mode = {
DRM_MODE("640x480", DRM_MODE_TYPE_DEFAULT, 31500, 640, 664, DRM_MODE("640x480", DRM_MODE_TYPE_DEFAULT, 31500, 640, 664,
704, 832, 0, 480, 489, 491, 520, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC), 704, 832, 0, 480, 489, 491, 520, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
}; };
...@@ -9793,7 +9793,7 @@ intel_framebuffer_pitch_for_width(int width, int bpp) ...@@ -9793,7 +9793,7 @@ intel_framebuffer_pitch_for_width(int width, int bpp)
} }
static u32 static u32
intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp) intel_framebuffer_size_for_mode(const struct drm_display_mode *mode, int bpp)
{ {
u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp); u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp);
return PAGE_ALIGN(pitch * mode->vdisplay); return PAGE_ALIGN(pitch * mode->vdisplay);
...@@ -9801,7 +9801,7 @@ intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp) ...@@ -9801,7 +9801,7 @@ intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp)
static struct drm_framebuffer * static struct drm_framebuffer *
intel_framebuffer_create_for_mode(struct drm_device *dev, intel_framebuffer_create_for_mode(struct drm_device *dev,
struct drm_display_mode *mode, const struct drm_display_mode *mode,
int depth, int bpp) int depth, int bpp)
{ {
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
...@@ -9828,7 +9828,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev, ...@@ -9828,7 +9828,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev,
static struct drm_framebuffer * static struct drm_framebuffer *
mode_fits_in_fbdev(struct drm_device *dev, mode_fits_in_fbdev(struct drm_device *dev,
struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
#ifdef CONFIG_DRM_FBDEV_EMULATION #ifdef CONFIG_DRM_FBDEV_EMULATION
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
...@@ -9861,7 +9861,7 @@ mode_fits_in_fbdev(struct drm_device *dev, ...@@ -9861,7 +9861,7 @@ mode_fits_in_fbdev(struct drm_device *dev,
static int intel_modeset_setup_plane_state(struct drm_atomic_state *state, static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
struct drm_crtc *crtc, struct drm_crtc *crtc,
struct drm_display_mode *mode, const struct drm_display_mode *mode,
struct drm_framebuffer *fb, struct drm_framebuffer *fb,
int x, int y) int x, int y)
{ {
...@@ -9895,7 +9895,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state, ...@@ -9895,7 +9895,7 @@ static int intel_modeset_setup_plane_state(struct drm_atomic_state *state,
} }
int intel_get_load_detect_pipe(struct drm_connector *connector, int intel_get_load_detect_pipe(struct drm_connector *connector,
struct drm_display_mode *mode, const struct drm_display_mode *mode,
struct intel_load_detect_pipe *old, struct intel_load_detect_pipe *old,
struct drm_modeset_acquire_ctx *ctx) struct drm_modeset_acquire_ctx *ctx)
{ {
......
...@@ -1403,7 +1403,7 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv, ...@@ -1403,7 +1403,7 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
struct intel_digital_port *dport, struct intel_digital_port *dport,
unsigned int expected_mask); unsigned int expected_mask);
int intel_get_load_detect_pipe(struct drm_connector *connector, int intel_get_load_detect_pipe(struct drm_connector *connector,
struct drm_display_mode *mode, const struct drm_display_mode *mode,
struct intel_load_detect_pipe *old, struct intel_load_detect_pipe *old,
struct drm_modeset_acquire_ctx *ctx); struct drm_modeset_acquire_ctx *ctx);
void intel_release_load_detect_pipe(struct drm_connector *connector, void intel_release_load_detect_pipe(struct drm_connector *connector,
......
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