summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_lvds.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-05-01 15:37:55 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-05-30 10:28:21 +0200
commiteead06dff9c34699f0e6c16fc6d6d4f105008336 (patch)
tree4dc710cf91ea774850b8be9d66527856835cb6c2 /drivers/gpu/drm/i915/intel_lvds.c
parentd8197317f172193b12fbaa75a653e7caa0614738 (diff)
drm/i915: Use atomic scaling_mode instead of panel.fitting_mode
The first step in converting connector properties to atomic is wiring up the atomic state. We're still not completely supoprting the scaling mode in the atomic case, but this is the first step towards it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-4-maarten.lankhorst@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 8b942ef2b3ec..a14bdefdcb8f 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -433,10 +433,10 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder,
pipe_config->has_pch_encoder = true;
intel_pch_panel_fitting(intel_crtc, pipe_config,
- intel_connector->panel.fitting_mode);
+ conn_state->scaling_mode);
} else {
intel_gmch_panel_fitting(intel_crtc, pipe_config,
- intel_connector->panel.fitting_mode);
+ conn_state->scaling_mode);
}
@@ -602,7 +602,6 @@ static int intel_lvds_set_property(struct drm_connector *connector,
struct drm_property *property,
uint64_t value)
{
- struct intel_connector *intel_connector = to_intel_connector(connector);
struct drm_device *dev = connector->dev;
if (property == dev->mode_config.scaling_mode_property) {
@@ -613,11 +612,11 @@ static int intel_lvds_set_property(struct drm_connector *connector,
return -EINVAL;
}
- if (intel_connector->panel.fitting_mode == value) {
+ if (connector->state->scaling_mode == value) {
/* the LVDS scaling property is not changed */
return 0;
}
- intel_connector->panel.fitting_mode = value;
+ connector->state->scaling_mode = value;
crtc = intel_attached_encoder(connector)->base.crtc;
if (crtc && crtc->state->enable) {
@@ -1087,7 +1086,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
drm_object_attach_property(&connector->base,
dev->mode_config.scaling_mode_property,
DRM_MODE_SCALE_ASPECT);
- intel_connector->panel.fitting_mode = DRM_MODE_SCALE_ASPECT;
+ connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
intel_lvds_pps_get_hw_state(dev_priv, &lvds_encoder->init_pps);
lvds_encoder->init_lvds_val = lvds;