• Ander Conselvan de Oliveira's avatar
    drm/i915: Embedded struct drm_crtc_state in intel_crtc_state · 2d112de7
    Ander Conselvan de Oliveira authored
    And get rid of the duplicate mode structures. This patch was generated
    with the following semantic patch:
    
    @@ @@
    struct intel_crtc_state {
    +struct drm_crtc_state base;
    +
    ...
    -struct drm_display_mode requested_mode;
    -struct drm_display_mode adjusted_mode;
    ...
    }
    @@ struct intel_crtc_state *state; @@
    -state->adjusted_mode
    +state->base.adjusted_mode
    @@ struct intel_crtc_state *state; @@
    -state->requested_mode
    +state->base.mode
    @@ struct intel_crtc_state state; @@
    -state.adjusted_mode
    +state.base.adjusted_mode
    @@ struct intel_crtc_state state; @@
    -state.requested_mode
    +state.base.mode
    @@ struct drm_crtc *crtc; @@
    -to_intel_crtc(crtc)->config.adjusted_mode
    +to_intel_crtc(crtc)->config.base.adjusted_mode
    @@ identifier member; expression E; @@
    -PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
    +PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
    @@ identifier member; @@
    -PIPE_CONF_CHECK_I(adjusted_mode.member);
    +PIPE_CONF_CHECK_I(base.adjusted_mode.member);
    @@ identifier member; @@
    -PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
    +PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);
    
    v2: Completely generate the patch with cocci. (Ander)
    Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
    Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    2d112de7
intel_hdmi.c 52.6 KB