Skip to content

Commit

Permalink
drm/i915: Remove intel_crtc->new_config
Browse files Browse the repository at this point in the history
It's not needed anymore, now that all the users were converted to using
an atomic state.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ander Conselvan de Oliveira authored and Daniel Vetter committed Apr 10, 2015
1 parent 225da59 commit d69ba09
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
31 changes: 0 additions & 31 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -9171,7 +9171,6 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,

intel_crtc = to_intel_crtc(crtc);
intel_crtc->new_enabled = true;
intel_crtc->new_config = intel_crtc->config;
old->dpms_mode = connector->dpms;
old->load_detect_temp = true;
old->release_fb = NULL;
Expand Down Expand Up @@ -9227,10 +9226,6 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,

fail:
intel_crtc->new_enabled = crtc->state->enable;
if (intel_crtc->new_enabled)
intel_crtc->new_config = intel_crtc->config;
else
intel_crtc->new_config = NULL;
fail_unlock:
if (state) {
drm_atomic_state_free(state);
Expand Down Expand Up @@ -9276,7 +9271,6 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
to_intel_connector(connector)->new_encoder = NULL;
intel_encoder->new_crtc = NULL;
intel_crtc->new_enabled = false;
intel_crtc->new_config = NULL;

connector_state->best_encoder = NULL;
connector_state->crtc = NULL;
Expand Down Expand Up @@ -10416,11 +10410,6 @@ static void intel_modeset_update_staged_output_state(struct drm_device *dev)

for_each_intel_crtc(dev, crtc) {
crtc->new_enabled = crtc->base.state->enable;

if (crtc->new_enabled)
crtc->new_config = crtc->config;
else
crtc->new_config = NULL;
}
}

Expand Down Expand Up @@ -10981,9 +10970,6 @@ intel_modeset_update_state(struct drm_device *dev, unsigned prepare_pipes)
/* Double check state. */
for_each_intel_crtc(dev, intel_crtc) {
WARN_ON(intel_crtc->base.state->enable != intel_crtc_in_use(&intel_crtc->base));
WARN_ON(intel_crtc->new_config &&
intel_crtc->new_config != intel_crtc->config);
WARN_ON(intel_crtc->base.state->enable != !!intel_crtc->new_config);
}

list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
Expand Down Expand Up @@ -11646,9 +11632,6 @@ static int __intel_set_mode(struct drm_crtc *crtc,

*saved_mode = crtc->mode;

if (modeset_pipes)
to_intel_crtc(crtc)->new_config = pipe_config;

/*
* See if the config requires any additional preparation, e.g.
* to adjust global state with pipes off. We need to do this
Expand Down Expand Up @@ -11741,9 +11724,6 @@ static int __intel_set_mode(struct drm_crtc *crtc,
sizeof *crtc_state_copy);
intel_crtc->config = crtc_state_copy;
intel_crtc->base.state = &crtc_state_copy->base;

if (modeset_pipes)
intel_crtc->new_config = intel_crtc->config;
} else {
kfree(crtc_state_copy);
}
Expand Down Expand Up @@ -11922,11 +11902,6 @@ static void intel_set_config_restore_state(struct drm_device *dev,
count = 0;
for_each_intel_crtc(dev, crtc) {
crtc->new_enabled = config->save_crtc_enabled[count++];

if (crtc->new_enabled)
crtc->new_config = crtc->config;
else
crtc->new_config = NULL;
}

count = 0;
Expand Down Expand Up @@ -12153,11 +12128,6 @@ intel_modeset_stage_output_state(struct drm_device *dev,
crtc->new_enabled ? "en" : "dis");
config->mode_changed = true;
}

if (crtc->new_enabled)
crtc->new_config = crtc->config;
else
crtc->new_config = NULL;
}

return 0;
Expand All @@ -12184,7 +12154,6 @@ static void disable_crtc_nofb(struct intel_crtc *crtc)
}

crtc->new_enabled = false;
crtc->new_config = NULL;
}

static int intel_crtc_set_config(struct drm_mode_set *set)
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ struct intel_crtc {

struct intel_initial_plane_config plane_config;
struct intel_crtc_state *config;
struct intel_crtc_state *new_config;
bool new_enabled;

/* reset counter value when the last flip was submitted */
Expand Down

0 comments on commit d69ba09

Please sign in to comment.