Commit a03a8623 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/disp: kill off nouveau_crtc.mode

This hasn't been necessary for a long time now..
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent c8334423
...@@ -32,8 +32,6 @@ struct nouveau_crtc { ...@@ -32,8 +32,6 @@ struct nouveau_crtc {
int index; int index;
struct drm_display_mode *mode;
uint32_t dpms_saved_fp_control; uint32_t dpms_saved_fp_control;
uint32_t fp_users; uint32_t fp_users;
int saturation; int saturation;
......
...@@ -362,7 +362,6 @@ nv50_crtc_destroy(struct drm_crtc *crtc) ...@@ -362,7 +362,6 @@ nv50_crtc_destroy(struct drm_crtc *crtc)
nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo); nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo);
nouveau_bo_unmap(nv_crtc->cursor.nvbo); nouveau_bo_unmap(nv_crtc->cursor.nvbo);
nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo); nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
kfree(nv_crtc->mode);
kfree(nv_crtc); kfree(nv_crtc);
} }
...@@ -604,8 +603,6 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, ...@@ -604,8 +603,6 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
/* Find the connector attached to this CRTC */ /* Find the connector attached to this CRTC */
nv_connector = nouveau_crtc_connector_get(nv_crtc); nv_connector = nouveau_crtc_connector_get(nv_crtc);
*nv_crtc->mode = *adjusted_mode;
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
hsync_dur = adjusted_mode->hsync_end - adjusted_mode->hsync_start; hsync_dur = adjusted_mode->hsync_end - adjusted_mode->hsync_start;
...@@ -736,12 +733,6 @@ nv50_crtc_create(struct drm_device *dev, int index) ...@@ -736,12 +733,6 @@ nv50_crtc_create(struct drm_device *dev, int index)
if (!nv_crtc) if (!nv_crtc)
return -ENOMEM; return -ENOMEM;
nv_crtc->mode = kzalloc(sizeof(*nv_crtc->mode), GFP_KERNEL);
if (!nv_crtc->mode) {
kfree(nv_crtc);
return -ENOMEM;
}
/* Default CLUT parameters, will be activated on the hw upon /* Default CLUT parameters, will be activated on the hw upon
* first mode set. * first mode set.
*/ */
...@@ -763,7 +754,6 @@ nv50_crtc_create(struct drm_device *dev, int index) ...@@ -763,7 +754,6 @@ nv50_crtc_create(struct drm_device *dev, int index)
} }
if (ret) { if (ret) {
kfree(nv_crtc->mode);
kfree(nv_crtc); kfree(nv_crtc);
return ret; return ret;
} }
......
...@@ -188,8 +188,8 @@ nv50_sor_commit(struct drm_encoder *encoder) ...@@ -188,8 +188,8 @@ nv50_sor_commit(struct drm_encoder *encoder)
} }
static void static void
nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
struct drm_display_mode *adjusted_mode) struct drm_display_mode *mode)
{ {
struct nouveau_channel *evo = nv50_display(encoder->dev)->master; struct nouveau_channel *evo = nv50_display(encoder->dev)->master;
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
...@@ -206,22 +206,22 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, ...@@ -206,22 +206,22 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
switch (nv_encoder->dcb->type) { switch (nv_encoder->dcb->type) {
case OUTPUT_TMDS: case OUTPUT_TMDS:
if (nv_encoder->dcb->sorconf.link & 1) { if (nv_encoder->dcb->sorconf.link & 1) {
if (adjusted_mode->clock < 165000) if (mode->clock < 165000)
mode_ctl = 0x0100; mode_ctl = 0x0100;
else else
mode_ctl = 0x0500; mode_ctl = 0x0500;
} else } else
mode_ctl = 0x0200; mode_ctl = 0x0200;
nouveau_hdmi_mode_set(encoder, adjusted_mode); nouveau_hdmi_mode_set(encoder, mode);
break; break;
case OUTPUT_DP: case OUTPUT_DP:
nv_connector = nouveau_encoder_connector_get(nv_encoder); nv_connector = nouveau_encoder_connector_get(nv_encoder);
if (nv_connector && nv_connector->base.display_info.bpc == 6) { if (nv_connector && nv_connector->base.display_info.bpc == 6) {
nv_encoder->dp.datarate = crtc->mode->clock * 18 / 8; nv_encoder->dp.datarate = mode->clock * 18 / 8;
mode_ctl |= 0x00020000; mode_ctl |= 0x00020000;
} else { } else {
nv_encoder->dp.datarate = crtc->mode->clock * 24 / 8; nv_encoder->dp.datarate = mode->clock * 24 / 8;
mode_ctl |= 0x00050000; mode_ctl |= 0x00050000;
} }
...@@ -239,10 +239,10 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, ...@@ -239,10 +239,10 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
else else
mode_ctl |= NV50_EVO_SOR_MODE_CTRL_CRTC0; mode_ctl |= NV50_EVO_SOR_MODE_CTRL_CRTC0;
if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) if (mode->flags & DRM_MODE_FLAG_NHSYNC)
mode_ctl |= NV50_EVO_SOR_MODE_CTRL_NHSYNC; mode_ctl |= NV50_EVO_SOR_MODE_CTRL_NHSYNC;
if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) if (mode->flags & DRM_MODE_FLAG_NVSYNC)
mode_ctl |= NV50_EVO_SOR_MODE_CTRL_NVSYNC; mode_ctl |= NV50_EVO_SOR_MODE_CTRL_NVSYNC;
nv50_sor_dpms(encoder, DRM_MODE_DPMS_ON); nv50_sor_dpms(encoder, DRM_MODE_DPMS_ON);
......
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