Commit f6a83288 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: Pass explicit mode into mode_from_pipe_config v3

We want to reuse this in the fbdev initial config code independently
from any fastboot hacks. So allow a bit more flexibility.

v2: Forgot to git add ...
v3: make non-static (Jesse)
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent fa9fa083
...@@ -5263,25 +5263,23 @@ static void intel_get_pipe_timings(struct intel_crtc *crtc, ...@@ -5263,25 +5263,23 @@ static void intel_get_pipe_timings(struct intel_crtc *crtc,
pipe_config->requested_mode.hdisplay = pipe_config->pipe_src_w; pipe_config->requested_mode.hdisplay = pipe_config->pipe_src_w;
} }
static void intel_crtc_mode_from_pipe_config(struct intel_crtc *intel_crtc, void intel_mode_from_pipe_config(struct drm_display_mode *mode,
struct intel_crtc_config *pipe_config) struct intel_crtc_config *pipe_config)
{ {
struct drm_crtc *crtc = &intel_crtc->base; mode->hdisplay = pipe_config->adjusted_mode.crtc_hdisplay;
mode->htotal = pipe_config->adjusted_mode.crtc_htotal;
mode->hsync_start = pipe_config->adjusted_mode.crtc_hsync_start;
mode->hsync_end = pipe_config->adjusted_mode.crtc_hsync_end;
crtc->mode.hdisplay = pipe_config->adjusted_mode.crtc_hdisplay; mode->vdisplay = pipe_config->adjusted_mode.crtc_vdisplay;
crtc->mode.htotal = pipe_config->adjusted_mode.crtc_htotal; mode->vtotal = pipe_config->adjusted_mode.crtc_vtotal;
crtc->mode.hsync_start = pipe_config->adjusted_mode.crtc_hsync_start; mode->vsync_start = pipe_config->adjusted_mode.crtc_vsync_start;
crtc->mode.hsync_end = pipe_config->adjusted_mode.crtc_hsync_end; mode->vsync_end = pipe_config->adjusted_mode.crtc_vsync_end;
crtc->mode.vdisplay = pipe_config->adjusted_mode.crtc_vdisplay; mode->flags = pipe_config->adjusted_mode.flags;
crtc->mode.vtotal = pipe_config->adjusted_mode.crtc_vtotal;
crtc->mode.vsync_start = pipe_config->adjusted_mode.crtc_vsync_start;
crtc->mode.vsync_end = pipe_config->adjusted_mode.crtc_vsync_end;
crtc->mode.flags = pipe_config->adjusted_mode.flags; mode->clock = pipe_config->adjusted_mode.crtc_clock;
mode->flags |= pipe_config->adjusted_mode.flags;
crtc->mode.clock = pipe_config->adjusted_mode.crtc_clock;
crtc->mode.flags |= pipe_config->adjusted_mode.flags;
} }
static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc)
...@@ -11380,8 +11378,7 @@ void intel_modeset_setup_hw_state(struct drm_device *dev, ...@@ -11380,8 +11378,7 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
list_for_each_entry(crtc, &dev->mode_config.crtc_list, list_for_each_entry(crtc, &dev->mode_config.crtc_list,
base.head) { base.head) {
if (crtc->active && i915.fastboot) { if (crtc->active && i915.fastboot) {
intel_crtc_mode_from_pipe_config(crtc, &crtc->config); intel_mode_from_pipe_config(&crtc->base.mode, &crtc->config);
DRM_DEBUG_KMS("[CRTC:%d] found active mode: ", DRM_DEBUG_KMS("[CRTC:%d] found active mode: ",
crtc->base.base.id); crtc->base.base.id);
drm_mode_debug_printmodeline(&crtc->base.mode); drm_mode_debug_printmodeline(&crtc->base.mode);
......
...@@ -726,6 +726,8 @@ void hsw_enable_ips(struct intel_crtc *crtc); ...@@ -726,6 +726,8 @@ void hsw_enable_ips(struct intel_crtc *crtc);
void hsw_disable_ips(struct intel_crtc *crtc); void hsw_disable_ips(struct intel_crtc *crtc);
void intel_display_set_init_power(struct drm_device *dev, bool enable); void intel_display_set_init_power(struct drm_device *dev, bool enable);
int valleyview_get_vco(struct drm_i915_private *dev_priv); int valleyview_get_vco(struct drm_i915_private *dev_priv);
void intel_mode_from_pipe_config(struct drm_display_mode *mode,
struct intel_crtc_config *pipe_config);
/* intel_dp.c */ /* intel_dp.c */
void intel_dp_init(struct drm_device *dev, int output_reg, enum port port); void intel_dp_init(struct drm_device *dev, int output_reg, enum port port);
......
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