drm/i915: Prepare to split crtc state in uapi and hw state
Subsystems (3)
PATCH 1/4 drm/i915: Prepare to split crtc state in uapi and hw state
We want to split drm_crtc_state into the user visible state and actual hardware state. To prepare for this, we need some ground rules what should be in each state:
In uapi we use:
- crtc, *_changed flags, event, commit, state, mode_blob, (plane/connector/encoder)_mask.
In hw state we use what's displayed in hardware:
- enable, active, (adjusted) mode, color property blobs.
clear_intel_crtc_state and hw readout need to be updated for these rules, which will allow us to enable 2 joined pipes.
Note:
- When making calling atomic_commit() you need to manipulate the uapi variables, atomic_check() will copy it to hw. This is because you're just another atomic client. Of course you can still check hw members at that point to decide if a pipe is active.
- In general you should look at the hw members when available, unless there's a good reason to do something else.
--- drivers/gpu/drm/i915/display/icl_dsi.c | 18 +- drivers/gpu/drm/i915/display/intel_atomic.c | 14 +- .../gpu/drm/i915/display/intel_atomic_plane.c | 6 +- drivers/gpu/drm/i915/display/intel_audio.c | 12 +- drivers/gpu/drm/i915/display/intel_bw.c | 4 +- drivers/gpu/drm/i915/display/intel_cdclk.c | 16 +- drivers/gpu/drm/i915/display/intel_color.c | 180 +++--- drivers/gpu/drm/i915/display/intel_crt.c | 24 +- drivers/gpu/drm/i915/display/intel_ddi.c | 34 +- drivers/gpu/drm/i915/display/intel_display.c | 544 +++++++++--------- .../drm/i915/display/intel_display_types.h | 28 +- drivers/gpu/drm/i915/display/intel_dp.c | 42 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 6 +- drivers/gpu/drm/i915/display/intel_dpio_phy.c | 14 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 20 +- drivers/gpu/drm/i915/display/intel_dvo.c | 14 +- drivers/gpu/drm/i915/display/intel_fbc.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 64 +-- drivers/gpu/drm/i915/display/intel_lspcon.c | 4 +- drivers/gpu/drm/i915/display/intel_lvds.c | 12 +- drivers/gpu/drm/i915/display/intel_panel.c | 14 +- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 6 +- drivers/gpu/drm/i915/display/intel_psr.c | 10 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 22 +- drivers/gpu/drm/i915/display/intel_sprite.c | 25 +- drivers/gpu/drm/i915/display/intel_tv.c | 8 +- drivers/gpu/drm/i915/display/intel_vdsc.c | 12 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 20 +- drivers/gpu/drm/i915/i915_debugfs.c | 14 +- drivers/gpu/drm/i915/intel_pm.c | 180 +++--- 30 files changed, 702 insertions(+), 667 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +9 -9
@@ -276,7 +276,7 @@ static void configure_dual_link_mode(struct intel_encoder *encoder,if (intel_dsi->dual_link ==DSI_DUAL_LINK_FRONT_BACK ) {const struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;u32 dss_ctl2;u16 hactive = adjusted_mode->crtc_hdisplay;u16 dl_buffer_depth;
@@ -625,7 +625,7 @@ gen11_dsi_configure_transcoder(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dsi *intel_dsi =enc_to_intel_dsi (&encoder->base); -struct intel_crtc *intel_crtc =to_intel_crtc (pipe_config->base.crtc); +struct intel_crtc *intel_crtc =to_intel_crtc (pipe_config->uapi.crtc);enum pipe pipe = intel_crtc->pipe;u32 tmp;enum port port;
@@ -768,7 +768,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dsi *intel_dsi =enc_to_intel_dsi (&encoder->base);const struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;enum port port;enum transcoder dsi_trans;/* horizontal timings */
@@ -1216,7 +1216,7 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder, {struct intel_dsi *intel_dsi =enc_to_intel_dsi (&encoder->base);struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;if (intel_dsi->dual_link) { adjusted_mode->crtc_hdisplay *=2 ;
@@ -1242,16 +1242,16 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (pipe_config->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (pipe_config->uapi.crtc);struct intel_dsi *intel_dsi =enc_to_intel_dsi (&encoder->base);/* FIXME: adapt icl_ddi_clock_get() for DSI and use that? */ pipe_config->port_clock =cnl_calc_wrpll_link (dev_priv, &pipe_config->dpll_hw_state); - pipe_config->base.adjusted_mode.crtc_clock = intel_dsi->pclk; + pipe_config->hw.adjusted_mode.crtc_clock = intel_dsi->pclk;if (intel_dsi->dual_link) - pipe_config->base.adjusted_mode.crtc_clock *=2 ; + pipe_config->hw.adjusted_mode.crtc_clock *=2 ;gen11_dsi_get_timings (encoder, pipe_config); pipe_config->output_types |=BIT (INTEL_OUTPUT_DSI );
@@ -1265,11 +1265,11 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi, base);struct intel_connector *intel_connector = intel_dsi->attached_connector; -struct intel_crtc *crtc =to_intel_crtc (pipe_config->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (pipe_config->uapi.crtc);const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode; pipe_config->output_format =INTEL_OUTPUT_FORMAT_RGB ;intel_fixed_panel_mode (fixed_mode, adjusted_mode);
drivers/gpu/drm/i915/display/intel_atomic.c +9 -5
@@ -186,13 +186,14 @@ intel_digital_connector_duplicate_state(struct drm_connector *connector)struct drm_crtc_state *intel_crtc_duplicate_state (struct drm_crtc *crtc) { +const struct intel_crtc_state *old_crtc_state =to_intel_crtc_state (crtc->state);struct intel_crtc_state *crtc_state; - crtc_state =kmemdup (crtc->state,sizeof (*crtc_state),GFP_KERNEL ); + crtc_state =kmemdup (old_crtc_state,sizeof (*crtc_state),GFP_KERNEL );if (!crtc_state)return NULL ; -__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->base); +__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); crtc_state->update_pipe = false; crtc_state->disable_lp_wm = false;
@@ -204,7 +205,7 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state->fb_bits =0 ; crtc_state->update_planes =0 ; -return &crtc_state->base; +return &crtc_state->uapi; }/**
@@ -219,7 +220,10 @@ void intel_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state *state) { -drm_atomic_helper_crtc_destroy_state (crtc, state); + struct intel_crtc_state *crtc_state = to_intel_crtc_state(state); + +__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi); +kfree (crtc_state); } static void intel_atomic_setup_scaler(struct intel_crtc_scaler_state *scaler_state,
@@ -318,7 +322,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,struct intel_plane_state *plane_state =NULL ;struct intel_crtc_scaler_state *scaler_state = &crtc_state->scaler_state; -struct drm_atomic_state *drm_state = crtc_state->base.state; +struct drm_atomic_state *drm_state = crtc_state->uapi.state;struct intel_atomic_state *intel_state =to_intel_atomic_state (drm_state);int num_scalers_need;int i;
drivers/gpu/drm/i915/display/intel_atomic_plane.c +3 -3
@@ -271,7 +271,7 @@ void intel_update_plane(struct intel_plane *plane,const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state) { - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);trace_intel_update_plane (&plane->base, crtc); plane->update_plane (plane, crtc_state, plane_state);
@@ -281,7 +281,7 @@ void intel_update_slave(struct intel_plane *plane,const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state) { - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);trace_intel_update_plane (&plane->base, crtc); plane->update_slave (plane, crtc_state, plane_state);
@@ -290,7 +290,7 @@ void intel_update_slave(struct intel_plane *plane,void intel_disable_plane (struct intel_plane *plane,const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);trace_intel_disable_plane (&plane->base, crtc); plane->disable_plane (plane, crtc_state);
drivers/gpu/drm/i915/display/intel_audio.c +6 -6
@@ -233,7 +233,7 @@ static const struct hdmi_aud_ncts hdmi_aud_ncts_36bpp[] = {static u32 audio_config_hdmi_pixel_clock (const struct intel_crtc_state *crtc_state) {const struct drm_display_mode *adjusted_mode = - &crtc_state->base.adjusted_mode; + &crtc_state->hw.adjusted_mode;int i;for (i =0 ; i <ARRAY_SIZE (hdmi_audio_clock); i++) {
@@ -554,7 +554,7 @@ static void ilk_audio_codec_disable(struct intel_encoder *encoder, const struct drm_connector_state *old_conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->uapi.crtc);enum pipe pipe = crtc->pipe;enum port port = encoder->port;u32 tmp, eldv;
@@ -601,7 +601,7 @@ static void ilk_audio_codec_enable(struct intel_encoder *encoder, const struct drm_connector_state *conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_connector *connector = conn_state->connector;enum pipe pipe = crtc->pipe;enum port port = encoder->port;
@@ -691,10 +691,10 @@ void intel_audio_codec_enable(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct i915_audio_component *acomp = dev_priv->audio_component; -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_connector *connector = conn_state->connector;const struct drm_display_mode *adjusted_mode = - &crtc_state->base.adjusted_mode; + &crtc_state->hw.adjusted_mode;enum port port = encoder->port;enum pipe pipe = crtc->pipe;
@@ -752,7 +752,7 @@ void intel_audio_codec_disable(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct i915_audio_component *acomp = dev_priv->audio_component; -struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->uapi.crtc);enum port port = encoder->port;enum pipe pipe = crtc->pipe;
drivers/gpu/drm/i915/display/intel_bw.c +2 -2
@@ -274,7 +274,7 @@ static unsigned int intel_bw_crtc_num_active_planes(const struct intel_crtc_statstatic unsigned int intel_bw_crtc_data_rate (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);unsigned int data_rate =0 ;enum plane_id plane_id;
@@ -295,7 +295,7 @@ static unsigned int intel_bw_crtc_data_rate(const struct intel_crtc_state *crtc_void intel_bw_crtc_update (struct intel_bw_state *bw_state,const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc); bw_state->data_rate[crtc->pipe] =intel_bw_crtc_data_rate (crtc_state);
drivers/gpu/drm/i915/display/intel_cdclk.c +8 -8
@@ -1917,10 +1917,10 @@ static int intel_pixel_rate_to_cdclk(struct drm_i915_private *dev_priv,int intel_crtc_compute_min_cdclk (const struct intel_crtc_state *crtc_state) {struct drm_i915_private *dev_priv = -to_i915 (crtc_state->base.crtc->dev); +to_i915 (crtc_state->uapi.crtc->dev);int min_cdclk; -if (!crtc_state->base.enable) +if (!crtc_state->hw.enable)return 0 ; min_cdclk =intel_pixel_rate_to_cdclk (dev_priv, crtc_state->pixel_rate);
@@ -2043,7 +2043,7 @@ static u8 bxt_compute_min_voltage_level(struct intel_atomic_state *state) sizeof(state->min_voltage_level));for_each_new_intel_crtc_in_state (state, crtc, crtc_state, i) { -if (crtc_state->base.enable) +if (crtc_state->hw.enable) state->min_voltage_level[i] = crtc_state->min_voltage_level;else
@@ -2129,7 +2129,7 @@ static int skl_dpll0_vco(struct intel_atomic_state *state) vco = dev_priv->skl_preferred_vco_freq;for_each_new_intel_crtc_in_state (state, crtc, crtc_state, i) { -if (!crtc_state->base.enable) +if (!crtc_state->hw.enable)continue ;if (!intel_crtc_has_type (crtc_state,INTEL_OUTPUT_EDP ))
@@ -2255,11 +2255,11 @@ static int intel_modeset_all_pipes(struct intel_atomic_state *state)if (IS_ERR (crtc_state))return PTR_ERR (crtc_state); -if (!crtc_state->base.active || -drm_atomic_crtc_needs_modeset (&crtc_state->base)) +if (!crtc_state->hw.active || +drm_atomic_crtc_needs_modeset (&crtc_state->uapi))continue ; - crtc_state->base.mode_changed = true; + crtc_state->uapi.mode_changed = true; ret =drm_atomic_add_affected_connectors (&state->base, &crtc->base);
@@ -2310,7 +2310,7 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state) crtc =intel_get_crtc_for_pipe (dev_priv, pipe); crtc_state =intel_atomic_get_new_crtc_state (state, crtc);if (crtc_state && -drm_atomic_crtc_needs_modeset (&crtc_state->base)) +drm_atomic_crtc_needs_modeset (&crtc_state->uapi)) pipe =INVALID_PIPE ; }else { pipe =INVALID_PIPE ;
drivers/gpu/drm/i915/display/intel_color.c +90 -90
519 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_crt.c +12 -12
@@ -132,9 +132,9 @@ static void intel_crt_get_config(struct intel_encoder *encoder, { pipe_config->output_types |=BIT (INTEL_OUTPUT_ANALOG ); - pipe_config->base.adjusted_mode.flags |=intel_crt_get_flags (encoder); + pipe_config->hw.adjusted_mode.flags |=intel_crt_get_flags (encoder); - pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; + pipe_config->hw.adjusted_mode.crtc_clock = pipe_config->port_clock; } static void hsw_crt_get_config(struct intel_encoder *encoder,
@@ -144,13 +144,13 @@ static void hsw_crt_get_config(struct intel_encoder *encoder,intel_ddi_get_config (encoder, pipe_config); - pipe_config->base.adjusted_mode.flags &= ~(DRM_MODE_FLAG_PHSYNC | + pipe_config->hw.adjusted_mode.flags &= ~(DRM_MODE_FLAG_PHSYNC |DRM_MODE_FLAG_NHSYNC |DRM_MODE_FLAG_PVSYNC |DRM_MODE_FLAG_NVSYNC ); - pipe_config->base.adjusted_mode.flags |=intel_crt_get_flags (encoder); + pipe_config->hw.adjusted_mode.flags |=intel_crt_get_flags (encoder); - pipe_config->base.adjusted_mode.crtc_clock =lpt_get_iclkip (dev_priv); + pipe_config->hw.adjusted_mode.crtc_clock =lpt_get_iclkip (dev_priv); }/* Note: The caller is required to filter out dpms modes not supported by the
@@ -161,8 +161,8 @@ static void intel_crt_set_dpms(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_crt *crt =intel_encoder_to_crt (encoder); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); -const struct drm_display_mode *adjusted_mode = &crtc_state->base.adjusted_mode; +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc); +const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;u32 adpa;if (INTEL_GEN (dev_priv) >=5 )
@@ -271,7 +271,7 @@ static void hsw_pre_enable_crt(struct intel_encoder *encoder, const struct drm_connector_state *conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum pipe pipe = crtc->pipe;WARN_ON (!crtc_state->has_pch_encoder);
@@ -288,7 +288,7 @@ static void hsw_enable_crt(struct intel_encoder *encoder, const struct drm_connector_state *conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum pipe pipe = crtc->pipe;WARN_ON (!crtc_state->has_pch_encoder);
@@ -358,7 +358,7 @@ static int intel_crt_compute_config(struct intel_encoder *encoder, struct drm_connector_state *conn_state) {struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN )return -EINVAL ;
@@ -373,7 +373,7 @@ static int pch_crt_compute_config(struct intel_encoder *encoder, struct drm_connector_state *conn_state) {struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN )return -EINVAL ;
@@ -390,7 +390,7 @@ static int hsw_crt_compute_config(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;if (adjusted_mode->flags &DRM_MODE_FLAG_DBLSCAN )return -EINVAL ;
drivers/gpu/drm/i915/display/intel_ddi.c +17 -17
@@ -1479,7 +1479,7 @@ static void ddi_dotclock_get(struct intel_crtc_state *pipe_config)if (pipe_config->pixel_multiplier) dotclock /= pipe_config->pixel_multiplier; - pipe_config->base.adjusted_mode.crtc_clock = dotclock; + pipe_config->hw.adjusted_mode.crtc_clock = dotclock; } static void icl_ddi_clock_get(struct intel_encoder *encoder,
@@ -1694,7 +1694,7 @@ static void intel_ddi_clock_get(struct intel_encoder *encoder,void intel_ddi_set_pipe_settings (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;u32 temp;
@@ -1754,7 +1754,7 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)void intel_ddi_set_vc_payload_alloc (const struct intel_crtc_state *crtc_state,bool state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;u32 temp;
@@ -1776,7 +1776,7 @@ void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state,static u32 intel_ddi_transcoder_func_reg_val_get (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct intel_encoder *encoder =intel_ddi_get_crtc_encoder (crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe;
@@ -1808,9 +1808,9 @@ intel_ddi_transcoder_func_reg_val_get(const struct intel_crtc_state *crtc_state)BUG (); } -if (crtc_state->base.adjusted_mode.flags &DRM_MODE_FLAG_PVSYNC ) +if (crtc_state->hw.adjusted_mode.flags &DRM_MODE_FLAG_PVSYNC ) temp |=TRANS_DDI_PVSYNC ; -if (crtc_state->base.adjusted_mode.flags &DRM_MODE_FLAG_PHSYNC ) +if (crtc_state->hw.adjusted_mode.flags &DRM_MODE_FLAG_PHSYNC ) temp |=TRANS_DDI_PHSYNC ;if (cpu_transcoder ==TRANSCODER_EDP ) {
@@ -1863,7 +1863,7 @@ intel_ddi_transcoder_func_reg_val_get(const struct intel_crtc_state *crtc_state)void intel_ddi_enable_transcoder_func (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;u32 temp;
@@ -1879,7 +1879,7 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)static void intel_ddi_config_transcoder_func (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;u32 temp;
@@ -1891,7 +1891,7 @@ intel_ddi_config_transcoder_func(const struct intel_crtc_state *crtc_state)void intel_ddi_disable_transcoder_func (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;i915_reg_t reg =TRANS_DDI_FUNC_CTL (cpu_transcoder);
@@ -2189,7 +2189,7 @@ static void intel_ddi_get_power_domains(struct intel_encoder *encoder,void intel_ddi_enable_pipe_clock (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);struct intel_encoder *encoder =intel_ddi_get_crtc_encoder (crtc);enum port port = encoder->port;
@@ -2207,7 +2207,7 @@ void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state)void intel_ddi_disable_pipe_clock (const struct intel_crtc_state *crtc_state) { -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +struct drm_i915_private *dev_priv =to_i915 (crtc_state->uapi.crtc->dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;if (cpu_transcoder !=TRANSCODER_EDP ) {
@@ -3399,7 +3399,7 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state) { - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe;
@@ -3824,7 +3824,7 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,WARN_ON (crtc && crtc->active);intel_tc_port_get_link (enc_to_dig_port (&encoder->base), required_lanes); -if (crtc_state && crtc_state->base.active) +if (crtc_state && crtc_state->hw.active)intel_update_active_dpll (state, crtc, encoder); }
@@ -3954,7 +3954,7 @@ void intel_ddi_get_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *intel_crtc =to_intel_crtc (pipe_config->base.crtc); +struct intel_crtc *intel_crtc =to_intel_crtc (pipe_config->uapi.crtc);enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;u32 temp, flags =0 ;
@@ -3972,7 +3972,7 @@ void intel_ddi_get_config(struct intel_encoder *encoder,else flags |=DRM_MODE_FLAG_NVSYNC ; - pipe_config->base.adjusted_mode.flags |= flags; + pipe_config->hw.adjusted_mode.flags |= flags;switch (temp &TRANS_DDI_BPC_MASK ) {case TRANS_DDI_BPC_6 :
@@ -4118,7 +4118,7 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder,struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state) { - struct intel_crtc *crtc = to_intel_crtc(pipe_config->base.crtc); + struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);enum port port = encoder->port;int ret;
@@ -4249,7 +4249,7 @@ static int intel_hdmi_reset_link(struct intel_encoder *encoder,WARN_ON (!intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )); -if (!crtc_state->base.active) +if (!crtc_state->hw.active)return 0 ; if (!crtc_state->hdmi_high_tmds_clock_ratio &&
drivers/gpu/drm/i915/display/intel_display.c +276 -268
1,646 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_display_types.h +26 -2
@@ -749,7 +749,31 @@ enum intel_output_format { };struct intel_crtc_state { -struct drm_crtc_state base; +union { +/* +* uapi (drm) state. This is the software state shown to userspace. +* In particular, the following members are used for bookkeeping: +* - crtc +* - state +* - *_changed +* - event +* - commit +* - mode_blob +*/ +struct drm_crtc_state uapi; + +/* +* actual hardware state, the state we program to the hardware. +* The following members are used to verify the hardware state: +* - enable +* - active +* - mode / adjusted_mode +* - color property blobs. +* +* During initial hw readout, they need to be copied to uapi. +*/ +struct drm_crtc_state hw; + };/** * quirks - bitfield with hw state readout quirks
@@ -1093,7 +1117,7 @@ struct cxsr_latency {#define to_intel_atomic_state (x) container_of(x, struct intel_atomic_state, base)#define to_intel_crtc (x) container_of(x, struct intel_crtc, base) -#define to_intel_crtc_state (x) container_of(x, struct intel_crtc_state, base) +#define to_intel_crtc_state (x) container_of(x, struct intel_crtc_state, uapi)#define to_intel_connector (x) container_of(x, struct intel_connector, base)#define to_intel_encoder (x) container_of(x, struct intel_encoder, base)#define to_intel_framebuffer (x) container_of(x, struct intel_framebuffer, base)
drivers/gpu/drm/i915/display/intel_dp.c +21 -21
153 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_dp_mst.c +3 -3
@@ -42,13 +42,13 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,struct drm_connector_state *conn_state, struct link_config_limits *limits) { - struct drm_atomic_state *state = crtc_state->base.state; + struct drm_atomic_state *state = crtc_state->uapi.state;struct intel_dp_mst_encoder *intel_mst =enc_to_mst (&encoder->base);struct intel_dp *intel_dp = &intel_mst->primary->dp;struct intel_connector *connector =to_intel_connector (conn_state->connector);const struct drm_display_mode *adjusted_mode = - &crtc_state->base.adjusted_mode; + &crtc_state->hw.adjusted_mode;void *port = connector->port;bool constant_n =drm_dp_has_quirk (&intel_dp->desc,DP_DPCD_QUIRK_CONSTANT_N );
@@ -99,7 +99,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,struct intel_digital_connector_state *intel_conn_state =to_intel_digital_connector_state (conn_state);const struct drm_display_mode *adjusted_mode = - &pipe_config->base.adjusted_mode; + &pipe_config->hw.adjusted_mode;void *port = connector->port;struct link_config_limits limits;int ret;
drivers/gpu/drm/i915/display/intel_dpio_phy.c +7 -7
@@ -739,7 +739,7 @@ void chv_data_lane_soft_reset(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);enum dpio_channel ch =vlv_dport_to_channel (enc_to_dig_port (&encoder->base)); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum pipe pipe = crtc->pipe;u32 val;
@@ -783,7 +783,7 @@ void chv_phy_pre_pll_enable(struct intel_encoder *encoder, {struct intel_digital_port *dport =enc_to_dig_port (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum dpio_channel ch =vlv_dport_to_channel (dport);enum pipe pipe = crtc->pipe; unsigned int lane_mask =
@@ -864,7 +864,7 @@ void chv_phy_pre_encoder_enable(struct intel_encoder *encoder,struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);struct intel_digital_port *dport =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum dpio_channel ch =vlv_dport_to_channel (dport);enum pipe pipe = crtc->pipe;int data, i, stagger;
@@ -953,7 +953,7 @@ void chv_phy_post_pll_disable(struct intel_encoder *encoder, const struct intel_crtc_state *old_crtc_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -enum pipe pipe =to_intel_crtc (old_crtc_state->base.crtc)->pipe; +enum pipe pipe =to_intel_crtc (old_crtc_state->uapi.crtc)->pipe;u32 val;vlv_dpio_get (dev_priv);
@@ -1016,7 +1016,7 @@ void vlv_phy_pre_pll_enable(struct intel_encoder *encoder, {struct intel_digital_port *dport =enc_to_dig_port (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum dpio_channel port =vlv_dport_to_channel (dport);enum pipe pipe = crtc->pipe;
@@ -1046,7 +1046,7 @@ void vlv_phy_pre_encoder_enable(struct intel_encoder *encoder,struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);struct intel_digital_port *dport =dp_to_dig_port (intel_dp);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);enum dpio_channel port =vlv_dport_to_channel (dport);enum pipe pipe = crtc->pipe;u32 val;
@@ -1075,7 +1075,7 @@ void vlv_phy_reset_lanes(struct intel_encoder *encoder, {struct intel_digital_port *dport =enc_to_dig_port (&encoder->base);struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (old_crtc_state->uapi.crtc);enum dpio_channel port =vlv_dport_to_channel (dport);enum pipe pipe = crtc->pipe;
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +10 -10
@@ -136,7 +136,7 @@ void assert_shared_dpll(struct drm_i915_private *dev_priv,*/ void intel_prepare_shared_dpll (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);struct intel_shared_dpll *pll = crtc_state->shared_dpll;
@@ -163,7 +163,7 @@ void intel_prepare_shared_dpll(const struct intel_crtc_state *crtc_state)*/ void intel_enable_shared_dpll (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);struct intel_shared_dpll *pll = crtc_state->shared_dpll;unsigned int crtc_mask =drm_crtc_mask (&crtc->base);
@@ -208,7 +208,7 @@ void intel_enable_shared_dpll(const struct intel_crtc_state *crtc_state)*/ void intel_disable_shared_dpll (const struct intel_crtc_state *crtc_state) { -struct intel_crtc *crtc =to_intel_crtc (crtc_state->base.crtc); +struct intel_crtc *crtc =to_intel_crtc (crtc_state->uapi.crtc);struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);struct intel_shared_dpll *pll = crtc_state->shared_dpll;unsigned int crtc_mask =drm_crtc_mask (&crtc->base);
@@ -825,7 +825,7 @@ hsw_ddi_hdmi_get_dpll(struct intel_atomic_state *state,static struct intel_shared_dpll *hsw_ddi_dp_get_dpll (struct intel_crtc_state *crtc_state) { -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +struct drm_i915_private *dev_priv =to_i915 (crtc_state->uapi.crtc->dev);struct intel_shared_dpll *pll;enum intel_dpll_id pll_id;int clock = crtc_state->port_clock;
@@ -1734,7 +1734,7 @@ static bool bxt_ddi_hdmi_pll_dividers(struct intel_crtc_state *crtc_state, struct bxt_clk_div *clk_div) { - struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);struct dpll best_clock;/* Calculate HDMI div */
@@ -2257,7 +2257,7 @@ static bool cnl_ddi_calculate_wrpll(struct intel_crtc_state *crtc_state, struct skl_wrpll_params *wrpll_params) { - struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev); + struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);u32 afe_clock = crtc_state->port_clock *5 ;u32 ref_clock;u32 dco_min =7998000 ;
@@ -2523,7 +2523,7 @@ static const struct skl_wrpll_params icl_tbt_pll_19_2MHz_values = {static bool icl_calc_dp_combo_pll (struct intel_crtc_state *crtc_state,struct skl_wrpll_params *pll_params) { -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +struct drm_i915_private *dev_priv =to_i915 (crtc_state->uapi.crtc->dev);const struct icl_combo_pll_params *params = dev_priv->cdclk.hw.ref ==24000 ? icl_dp_combo_pll_24MHz_values :
@@ -2545,7 +2545,7 @@ static bool icl_calc_dp_combo_pll(struct intel_crtc_state *crtc_state,static bool icl_calc_tbt_pll (struct intel_crtc_state *crtc_state,struct skl_wrpll_params *pll_params) { -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +struct drm_i915_private *dev_priv =to_i915 (crtc_state->uapi.crtc->dev); *pll_params = dev_priv->cdclk.hw.ref ==24000 ? icl_tbt_pll_24MHz_values : icl_tbt_pll_19_2MHz_values;
@@ -2556,7 +2556,7 @@ static bool icl_calc_dpll_state(struct intel_crtc_state *crtc_state,struct intel_encoder *encoder, struct intel_dpll_hw_state *pll_state) { - struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev); + struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);u32 cfgcr0, cfgcr1;struct skl_wrpll_params pll_params = {0 };bool ret;
@@ -2682,7 +2682,7 @@ static bool icl_mg_pll_find_divisors(int clock_khz, bool is_dp, bool use_ssc,static bool icl_calc_mg_pll_state (struct intel_crtc_state *crtc_state,struct intel_dpll_hw_state *pll_state) { -struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev); +struct drm_i915_private *dev_priv =to_i915 (crtc_state->uapi.crtc->dev);int refclk_khz = dev_priv->cdclk.hw.ref;int clock = crtc_state->port_clock;u32 dco_khz, m1div, m2div_int, m2div_rem, m2div_frac;
drivers/gpu/drm/i915/display/intel_dvo.c +7 -7
@@ -178,9 +178,9 @@ static void intel_dvo_get_config(struct intel_encoder *encoder,else flags |=DRM_MODE_FLAG_NVSYNC ; - pipe_config->base.adjusted_mode.flags |= flags; + pipe_config->hw.adjusted_mode.flags |= flags; - pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; + pipe_config->hw.adjusted_mode.crtc_clock = pipe_config->port_clock; } static void intel_disable_dvo(struct intel_encoder *encoder,
@@ -207,8 +207,8 @@ static void intel_enable_dvo(struct intel_encoder *encoder,u32 temp =I915_READ (dvo_reg); intel_dvo->dev.dev_ops->mode_set (&intel_dvo->dev, - &pipe_config->base.mode, - &pipe_config->base.adjusted_mode); + &pipe_config->hw.mode, + &pipe_config->hw.adjusted_mode);I915_WRITE (dvo_reg, temp |DVO_ENABLE );I915_READ (dvo_reg);
@@ -253,7 +253,7 @@ static int intel_dvo_compute_config(struct intel_encoder *encoder,struct intel_dvo *intel_dvo =enc_to_dvo (encoder);const struct drm_display_mode *fixed_mode = intel_dvo->attached_connector->panel.fixed_mode; -struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; +struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;/* * If we have timings from the BIOS for the panel, put them in
@@ -277,8 +277,8 @@ static void intel_dvo_pre_enable(struct intel_encoder *encoder, const struct drm_connector_state *conn_state) {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev); -struct intel_crtc *crtc =to_intel_crtc (pipe_config->base.crtc); -const struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_fbc.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_hdmi.c +32 -32
64 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_lspcon.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_lvds.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_panel.c +7 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_pipe_crc.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_psr.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_sdvo.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_sprite.c +13 -12
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_tv.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/intel_vdsc.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/display/vlv_dsi.c +10 -10
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/i915/intel_pm.c +89 -91
180 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Part of the diff is not shown here. View the raw message.
PATCH 2/4 drm/i915: Handle a few more cases for hw/sw split
We are still looking at drm_crtc_state in a few places, convert those to use intel_crtc_state instead. Look at uapi/hw where appropriate.
--- drivers/gpu/drm/i915/display/intel_display.c | 14 +++++++------- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- drivers/gpu/drm/i915/display/intel_psr.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +7 -7
@@ -16134,8 +16134,8 @@ static int intel_initial_commit(struct drm_device *dev) {struct drm_atomic_state *state =NULL ;struct drm_modeset_acquire_ctx ctx; -struct drm_crtc *crtc; -struct drm_crtc_state *crtc_state; +struct intel_crtc *crtc; +struct intel_crtc_state *crtc_state;int ret =0 ; state =drm_atomic_state_alloc (dev);
@@ -16147,15 +16147,15 @@ static int intel_initial_commit(struct drm_device *dev) retry: state->acquire_ctx = &ctx; -drm_for_each_crtc (crtc, dev) { - crtc_state =drm_atomic_get_crtc_state (state, crtc); +for_each_intel_crtc (dev, crtc) { + crtc_state =intel_atomic_get_crtc_state (state, crtc);if (IS_ERR (crtc_state)) { ret =PTR_ERR (crtc_state); goto out; } -if (crtc_state->active) { - ret =drm_atomic_add_affected_planes (state, crtc); +if (crtc_state->hw.active) { + ret =drm_atomic_add_affected_planes (state, &crtc->base);if (ret) goto out;
@@ -16165,7 +16165,7 @@ static int intel_initial_commit(struct drm_device *dev)* having a proper LUT loaded. Remove once we * have readout for pipe gamma enable. */ - crtc_state->color_mgmt_changed = true; + crtc_state->uapi.color_mgmt_changed = true; } }
drivers/gpu/drm/i915/display/intel_dp_mst.c +1 -1
@@ -187,7 +187,7 @@ intel_dp_mst_atomic_check(struct drm_connector *connector,if (!crtc_state || !drm_atomic_crtc_needs_modeset (crtc_state) || - crtc_state->enable) +to_intel_crtc_state (crtc_state)->hw.enable)return 0 ; }
drivers/gpu/drm/i915/display/intel_psr.c +2 -2
@@ -1068,9 +1068,9 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) intel_crtc_state =to_intel_crtc_state (crtc_state); -if (crtc_state->active && intel_crtc_state->has_psr) { +if (intel_crtc_state->hw.active && intel_crtc_state->has_psr) {/* Mark mode as changed to trigger a pipe->update() */ - crtc_state->mode_changed = true; + intel_crtc_state->uapi.mode_changed = true;break ; } }
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 drm/i915: Complete sw/hw split, v2.
In reply to Maarten LankhorstNow that we separated everything into uapi and hw, it's time to make the split definitive. Remove the union and make a copy of the hw state on modeset and fastset.
Color blobs are copied in crtc atomic_check(), right before color management is checked.
Changes since v1:
- Copy all blobs immediately after drm_atomic_helper_check_modeset().
- Clear crtc_state->hw on disable, instead of using clear_intel_crtc_state().
--- drivers/gpu/drm/i915/display/intel_atomic.c | 44 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_atomic.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 44 ++++++++++++++++--- .../drm/i915/display/intel_display_types.h | 8 ++-- 4 files changed, 89 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_atomic.c +44 -0
@@ -195,6 +195,14 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); +/* copy color blobs */ +if (crtc_state->hw.degamma_lut) +drm_property_blob_get (crtc_state->hw.degamma_lut); +if (crtc_state->hw.ctm) +drm_property_blob_get (crtc_state->hw.ctm); +if (crtc_state->hw.gamma_lut) +drm_property_blob_get (crtc_state->hw.gamma_lut); + crtc_state->update_pipe = false; crtc_state->disable_lp_wm = false; crtc_state->disable_cxsr = false;
@@ -208,6 +216,41 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)return &crtc_state->uapi; } +static void intel_crtc_put_color_blobs (struct intel_crtc_state *crtc_state) +{ +drm_property_blob_put (crtc_state->hw.degamma_lut); +drm_property_blob_put (crtc_state->hw.gamma_lut); +drm_property_blob_put (crtc_state->hw.ctm); +} + +void intel_crtc_free_hw_state (struct intel_crtc_state *crtc_state) +{ +intel_crtc_put_color_blobs (crtc_state); +} + +void intel_crtc_copy_color_blobs (struct intel_crtc_state *crtc_state) +{ +intel_crtc_put_color_blobs (crtc_state); + +if (crtc_state->uapi.degamma_lut) + crtc_state->hw.degamma_lut = +drm_property_blob_get (crtc_state->uapi.degamma_lut); +else + crtc_state->hw.degamma_lut =NULL ; + +if (crtc_state->uapi.gamma_lut) + crtc_state->hw.gamma_lut = +drm_property_blob_get (crtc_state->uapi.gamma_lut); +else + crtc_state->hw.gamma_lut =NULL ; + +if (crtc_state->uapi.ctm) + crtc_state->hw.ctm = +drm_property_blob_get (crtc_state->uapi.ctm); +else + crtc_state->hw.ctm =NULL ; +} +/** * intel_crtc_destroy_state - destroy crtc state * @crtc: drm crtc
@@ -223,6 +266,7 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,struct intel_crtc_state *crtc_state =to_intel_crtc_state (state);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi); +intel_crtc_free_hw_state (crtc_state);kfree (crtc_state); }
drivers/gpu/drm/i915/display/intel_atomic.h +2 -0
@@ -35,6 +35,8 @@ intel_digital_connector_duplicate_state(struct drm_connector *connector);struct drm_crtc_state *intel_crtc_duplicate_state (struct drm_crtc *crtc);void intel_crtc_destroy_state (struct drm_crtc *crtc,struct drm_crtc_state *state); +void intel_crtc_free_hw_state (struct intel_crtc_state *crtc_state); +void intel_crtc_copy_color_blobs (struct intel_crtc_state *crtc_state);struct drm_atomic_state *intel_atomic_state_alloc (struct drm_device *dev);void intel_atomic_state_clear (struct drm_atomic_state *state);
drivers/gpu/drm/i915/display/intel_display.c +38 -6
114 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_display_types.h +5 -3
@@ -749,7 +749,6 @@ enum intel_output_format { };struct intel_crtc_state { -union {/* * uapi (drm) state. This is the software state shown to userspace. * In particular, the following members are used for bookkeeping:
@@ -772,8 +771,11 @@ struct intel_crtc_state {* * During initial hw readout, they need to be copied to uapi. */ -struct drm_crtc_state hw; - }; +struct { +bool active, enable; +struct drm_property_blob *degamma_lut, *gamma_lut, *ctm; +struct drm_display_mode mode, adjusted_mode; + } hw;/** * quirks - bitfield with hw state readout quirks
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/4] drm/i915: Complete sw/hw split, v2.
Quoted 4 lines · Maarten Lankhorst
Now that we separated everything into uapi and hw, it's time to make the split definitive. Remove the union and make a copy of the hw state on modeset and fastset.
Quoted 8 lines
Color blobs are copied in crtc
atomic_check(), right before color management is checked.Changes since v1:
- Copy all blobs immediately afterdrm_atomic_helper_check_modeset().
- Clearcrtc_state->hwon disable, instead of usingclear_intel_crtc_state().Signed-off-by Maarten Lankhorst <[email protected]>
Really clearing crtc_state->hw (rather than using clear_intel_crtc_state() which would just restore it back at the end) solves my main concern with v1. However I think Ville was suggesting a different overall organization in the other thread, so you'll probably want to discuss that further with him.
Matt
Quoted 250 lines
--- drivers/gpu/drm/i915/display/intel_atomic.c | 44 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_atomic.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 44 ++++++++++++++++--- .../drm/i915/display/intel_display_types.h | 8 ++-- 4 files changed, 89 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/display/intel_atomic.c +44
-0@@ -195,6 +195,14 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_duplicate_state (crtc, &crtc_state->uapi); +/* copy color blobs */ +if (crtc_state->hw.degamma_lut) +drm_property_blob_get (crtc_state->hw.degamma_lut); +if (crtc_state->hw.ctm) +drm_property_blob_get (crtc_state->hw.ctm); +if (crtc_state->hw.gamma_lut) +drm_property_blob_get (crtc_state->hw.gamma_lut); + crtc_state->update_pipe = false; crtc_state->disable_lp_wm = false; crtc_state->disable_cxsr = false;@@ -208,6 +216,41 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)return &crtc_state->uapi; } +static void intel_crtc_put_color_blobs (struct intel_crtc_state *crtc_state) +{ +drm_property_blob_put (crtc_state->hw.degamma_lut); +drm_property_blob_put (crtc_state->hw.gamma_lut); +drm_property_blob_put (crtc_state->hw.ctm); +} + +void intel_crtc_free_hw_state (struct intel_crtc_state *crtc_state) +{ +intel_crtc_put_color_blobs (crtc_state); +} + +void intel_crtc_copy_color_blobs (struct intel_crtc_state *crtc_state) +{ +intel_crtc_put_color_blobs (crtc_state); + +if (crtc_state->uapi.degamma_lut) + crtc_state->hw.degamma_lut = +drm_property_blob_get (crtc_state->uapi.degamma_lut); +else + crtc_state->hw.degamma_lut =NULL ; + +if (crtc_state->uapi.gamma_lut) + crtc_state->hw.gamma_lut = +drm_property_blob_get (crtc_state->uapi.gamma_lut); +else + crtc_state->hw.gamma_lut =NULL ; + +if (crtc_state->uapi.ctm) + crtc_state->hw.ctm = +drm_property_blob_get (crtc_state->uapi.ctm); +else + crtc_state->hw.ctm =NULL ; +} +/** * intel_crtc_destroy_state - destroy crtc state * @crtc: drm crtc @@ -223,6 +266,7 @@ intel_crtc_destroy_state(struct drm_crtc *crtc,struct intel_crtc_state *crtc_state =to_intel_crtc_state (state);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi); +intel_crtc_free_hw_state (crtc_state);kfree (crtc_state); }drivers/gpu/drm/i915/display/intel_atomic.h +2
-0@@ -35,6 +35,8 @@ intel_digital_connector_duplicate_state(struct drm_connector *connector);struct drm_crtc_state *intel_crtc_duplicate_state (struct drm_crtc *crtc);void intel_crtc_destroy_state (struct drm_crtc *crtc,struct drm_crtc_state *state); +void intel_crtc_free_hw_state (struct intel_crtc_state *crtc_state); +void intel_crtc_copy_color_blobs (struct intel_crtc_state *crtc_state);struct drm_atomic_state *intel_atomic_state_alloc (struct drm_device *dev);void intel_atomic_state_clear (struct drm_atomic_state *state);drivers/gpu/drm/i915/display/intel_display.c +38
-6@@ -114,6 +114,7 @@ static const u64 cursor_format_modifiers[] = {DRM_FORMAT_MOD_INVALID }; +static void copy_uapi_to_hw_state (struct intel_crtc_state *crtc_state);static void i9xx_crtc_clock_get (struct intel_crtc *crtc,struct intel_crtc_state *pipe_config); static void ironlake_pch_clock_get(struct intel_crtc *crtc,@@ -7097,6 +7098,7 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc, crtc->enabled = false; crtc->state->connector_mask =0 ; crtc->state->encoder_mask =0 ; +copy_uapi_to_hw_state (to_intel_crtc_state (crtc->state));for_each_encoder_on_crtc (crtc->dev, crtc, encoder) encoder->base.crtc =NULL ;@@ -12306,6 +12308,23 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)return ret; } +static void copy_uapi_to_hw_state (struct intel_crtc_state *crtc_state) +{ + crtc_state->hw.enable = crtc_state->uapi.enable; + crtc_state->hw.active = crtc_state->uapi.active; + crtc_state->hw.mode = crtc_state->uapi.mode; + crtc_state->hw.adjusted_mode = crtc_state->uapi.adjusted_mode; +intel_crtc_copy_color_blobs (crtc_state); +} + +static void copy_hw_to_uapi_state (struct intel_crtc_state *crtc_state) +{ + crtc_state->uapi.enable = crtc_state->hw.enable; + crtc_state->uapi.active = crtc_state->hw.active; + crtc_state->uapi.mode = crtc_state->hw.mode; + crtc_state->uapi.adjusted_mode = crtc_state->hw.adjusted_mode; +} +static int clear_intel_crtc_state (struct intel_crtc_state *crtc_state) {@@ -12322,6 +12341,7 @@ clear_intel_crtc_state(struct intel_crtc_state *crtc_state)* fixed, so that the crtc_state can be safely duplicated. For now, * only fields that are know to not cause problems are preserved. */ + saved_state->uapi = crtc_state->uapi; saved_state->scaler_state = crtc_state->scaler_state; saved_state->shared_dpll = crtc_state->shared_dpll; saved_state->dpll_hw_state = crtc_state->dpll_hw_state;@@ -12332,11 +12352,9 @@ clear_intel_crtc_state(struct intel_crtc_state *crtc_state) IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) saved_state->wm = crtc_state->wm; -/* Keep base drm_crtc_state intact, only clear our extended struct */ -BUILD_BUG_ON (offsetof(struct intel_crtc_state , uapi)); -BUILD_BUG_ON (offsetof(struct intel_crtc_state , hw)); -memcpy (&crtc_state->uapi +1 , &saved_state->uapi +1 , -sizeof (*crtc_state) -sizeof (crtc_state->uapi)); +intel_crtc_free_hw_state (crtc_state); +memcpy (crtc_state, saved_state,sizeof (*crtc_state)); +copy_uapi_to_hw_state (crtc_state);kfree (saved_state);return 0 ;@@ -12476,6 +12494,9 @@ intel_modeset_pipe_config(struct intel_crtc_state *pipe_config)DRM_DEBUG_KMS ("hw max bpp: %i, pipe bpp: %i, dithering: %i\n" , base_bpp, pipe_config->pipe_bpp, pipe_config->dither); +/* uapi wants a copy of the adjusted_mode for vblank bookkeeping */ + pipe_config->uapi.adjusted_mode = pipe_config->hw.adjusted_mode; +return 0 ; }@@ -13197,6 +13218,8 @@ verify_crtc_state(struct intel_crtc *crtc, state = old_crtc_state->uapi.state;__drm_atomic_helper_crtc_destroy_state (&old_crtc_state->uapi); +intel_crtc_free_hw_state (old_crtc_state); + pipe_config = old_crtc_state;memset (pipe_config,0 ,sizeof (*pipe_config)); pipe_config->uapi.crtc = &crtc->base;@@ -13618,11 +13641,17 @@ static int intel_atomic_check(struct drm_device *dev,for_each_oldnew_intel_crtc_in_state (state, crtc, old_crtc_state, new_crtc_state, i) { -if (!needs_modeset (new_crtc_state)) +if (!needs_modeset (new_crtc_state)) { +if (new_crtc_state->uapi.color_mgmt_changed) +intel_crtc_copy_color_blobs (new_crtc_state);continue ; + }if (!new_crtc_state->uapi.enable) { any_ms = true; +intel_crtc_free_hw_state (new_crtc_state); +memset (&new_crtc_state->hw,0 , +sizeof (new_crtc_state->hw));continue ; }@@ -16729,6 +16758,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)to_intel_crtc_state (crtc->base.state);__drm_atomic_helper_crtc_destroy_state (&crtc_state->uapi); +intel_crtc_free_hw_state (crtc_state);memset (crtc_state,0 ,sizeof (*crtc_state));__drm_atomic_helper_crtc_reset (&crtc->base, &crtc_state->uapi);@@ -16845,6 +16875,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) crtc->base.mode.vdisplay = crtc_state->pipe_src_h;intel_mode_from_pipe_config (&crtc_state->hw.adjusted_mode, crtc_state); + crtc_state->hw.mode = crtc->base.mode;WARN_ON (drm_atomic_set_mode_for_crtc (crtc->base.state, &crtc->base.mode));/* @@ -16890,6 +16921,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)intel_bw_crtc_update (bw_state, crtc_state); +copy_hw_to_uapi_state (crtc_state);intel_pipe_config_sanity_check (dev_priv, crtc_state); } }drivers/gpu/drm/i915/display/intel_display_types.h +5
-3@@ -749,7 +749,6 @@ enum intel_output_format { };struct intel_crtc_state { -union {/* * uapi (drm) state. This is the software state shown to userspace. * In particular, the following members are used for bookkeeping: @@ -772,8 +771,11 @@ struct intel_crtc_state {* * During initial hw readout, they need to be copied to uapi. */ -struct drm_crtc_state hw; - }; +struct { +bool active, enable; +struct drm_property_blob *degamma_lut, *gamma_lut, *ctm; +struct drm_display_mode mode, adjusted_mode; + } hw;/** * quirks - bitfield with hw state readout quirks Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915: Remove begin/finish_crtc_commit, v2.
In reply to Maarten LankhorstThis can all be done from the intel_update_crtc function. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.
Changes since v1:
- Inline intel_update_pipe_config()
--- drivers/gpu/drm/i915/display/intel_display.c | 197 ++++++++----------- 1 file changed, 86 insertions(+), 111 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +86 -111
@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);
@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;
@@ -13739,13 +13698,88 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (!modeset) { +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->update_pipe) { +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is +* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ + +I915_WRITE (PIPESRC (crtc->pipe), + ((new_crtc_state->pipe_src_w -1 ) <<16 ) | + (new_crtc_state->pipe_src_h -1 )); + +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 ) +icl_set_pipe_chicken (crtc); + } + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + } + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state); +} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,
@@ -13769,14 +13803,21 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )skl_update_planes_on_crtc (state, crtc);else i9xx_update_planes_on_crtc (state, crtc); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); } static void intel_old_crtc_state_disables(struct intel_atomic_state *state,
@@ -14573,72 +14614,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/4] drm/i915: Remove begin/finish_crtc_commit, v2.
Quoted 140 lines · Maarten Lankhorst
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 197 ++++++++----------- 1 file changed, 86 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +64
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,88 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (!modeset) { +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->update_pipe) { +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is +* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ + +I915_WRITE (PIPESRC (crtc->pipe), + ((new_crtc_state->pipe_src_w -1 ) <<16 ) | + (new_crtc_state->pipe_src_h -1 )); + +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 )
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13774
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+icl_set_pipe_chicken (crtc); + } + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + } + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);
Feels like bunch of pointless nesting. We could just do
if (!modeset)
commit_pipe_thing(); if (wm) update_wm();
in the caller, or something.
Quoted 117 lines
drivers/gpu/drm/i915/display/intel_display.c +12
-70+} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13803,21 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )skl_update_planes_on_crtc (state, crtc);else i9xx_update_planes_on_crtc (state, crtc); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); } static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14614,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/4] drm/i915: Remove begin/finish_crtc_commit, v2.
In reply to Maarten LankhorstQuoted 114 lines · Maarten Lankhorst
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 197 ++++++++----------- 1 file changed, 86 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +38
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,88 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (!modeset) { +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->update_pipe) { +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13748
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ + +I915_WRITE (PIPESRC (crtc->pipe), + ((new_crtc_state->pipe_src_w -1 ) <<16 ) | + (new_crtc_state->pipe_src_h -1 ));
intel_set_pipe_src_size(new_crtc_state);
to be more future-proof in case the register changes in the future.
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_display.c +16
-0+ +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 )
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13774
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+icl_set_pipe_chicken (crtc); + } + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + } + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);
It might make sense to move the watermark update out to the caller. The watermark registers themselves are plane-based, so dealing with them in the commit_pipe_config function is already slightly non-intuitive. Plus that will let us just do a
/*
* During modesets pipe configuration was programmed as the
* CRTC was enabled.
*/
if (!modeset)
return;and drop a level of nesting for the rest of this function.
Quoted 24 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-3+} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13803,21 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )
drivers/gpu/drm/i915/display/intel_display.c static void intel_update_crtc(struct intel_crtc *crtc, · line 13820
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-1skl_update_planes_on_crtc (state, crtc); elsei9xx_update_planes_on_crtc (state ,crtc ); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state);
It might be worth adding a comment to this block. I always have to go dig back through git history to remind myself we this is needed. Maybe something like:
/*
* We usually enable FIFO underrun interrupts as part of the
* CRTC enable sequence during modesets. But when we inherit a
* valid pipe configuration from the BIOS we need to take care
* of enabling them on the CRTC's first fastset.
*/
Matt
Quoted 83 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-66} static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14614,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/4] drm/i915: Remove begin/finish_crtc_commit, v2.
Op 25-09-2019 om 23:42 schreef Matt Roper:
Quoted 151 lines · Maarten Lankhorst
Quoted 114 lines
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 197 ++++++++----------- 1 file changed, 86 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +38
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,88 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (!modeset) { +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->update_pipe) { +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13748
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ + +I915_WRITE (PIPESRC (crtc->pipe), + ((new_crtc_state->pipe_src_w -1 ) <<16 ) | + (new_crtc_state->pipe_src_h -1 ));
intel_set_pipe_src_size(new_crtc_state);to be more future-proof in case the register changes in the future.
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +22
-0+ +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 ) +icl_set_pipe_chicken (crtc); + } + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + }
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13774
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+ +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);It might make sense to move the watermark update out to the caller. The watermark registers themselves are plane-based, so dealing with them in the
commit_pipe_configfunction is already slightly non-intuitive. Plus that will let us just do a
atomic_update_watermarks just sets linetime on skl+. :)
Per plane watermarks are done in skl_write_plane_wm, called from skl_program_plane.
Quoted 9 lines
/* * During modesets pipe configuration was programmed as the * CRTC was enabled. */ if (!modeset) return;and drop a level of nesting for the rest of this function.
Yeah can drop even more with a check for update_pipe.
Quoted 128 lines
Quoted 25 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-3+} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13803,21 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )drivers/gpu/drm/i915/display/intel_display.c static void intel_update_crtc(struct intel_crtc *crtc, · line 13820
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-1skl_update_planes_on_crtc (state, crtc); elsei9xx_update_planes_on_crtc (state ,crtc ); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state);It might be worth adding a comment to this block. I always have to go dig back through git history to remind myself we this is needed. Maybe something like:
/*
* We usually enable FIFO underrun interrupts as part of the
* CRTC enable sequence during modesets. But when we inherit a
* valid pipe configuration from the BIOS we need to take care
* of enabling them on the CRTC's first fastset.
*/Matt
Quoted 79 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-66} static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14614,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 1 line
2.20.1
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/4] drm/i915: Remove begin/finish_crtc_commit, v2.
In reply to Matt RoperOp 25-09-2019 om 23:42 schreef Matt Roper:
Quoted 127 lines · Maarten Lankhorst
Quoted 114 lines
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 197 ++++++++----------- 1 file changed, 86 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +38
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,88 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (!modeset) { +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->update_pipe) { +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13748
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ + +I915_WRITE (PIPESRC (crtc->pipe), + ((new_crtc_state->pipe_src_w -1 ) <<16 ) | + (new_crtc_state->pipe_src_h -1 ));
intel_set_pipe_src_size(new_crtc_state);
Quoted 1 line
to be more future-proof in case the register changes in the future.
Yeah, this line probably predates atomic, with the old fastboot hack in the setcrtc call.
Good to get rid of it. :)
Quoted 168 lines
Quoted 16 lines
drivers/gpu/drm/i915/display/intel_display.c +16
-0+ +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 )drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13774
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+icl_set_pipe_chicken (crtc); + } + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + } + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);It might make sense to move the watermark update out to the caller. The watermark registers themselves are plane-based, so dealing with them in the
commit_pipe_configfunction is already slightly non-intuitive. Plus that will let us just do a/* * During modesets pipe configuration was programmed as the * CRTC was enabled. */ if (!modeset) return;and drop a level of nesting for the rest of this function.
Quoted 24 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-3+} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13803,21 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )drivers/gpu/drm/i915/display/intel_display.c static void intel_update_crtc(struct intel_crtc *crtc, · line 13820
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-1skl_update_planes_on_crtc (state, crtc); elsei9xx_update_planes_on_crtc (state ,crtc ); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state);It might be worth adding a comment to this block. I always have to go dig back through git history to remind myself we this is needed. Maybe something like:
/*
* We usually enable FIFO underrun interrupts as part of the
* CRTC enable sequence during modesets. But when we inherit a
* valid pipe configuration from the BIOS we need to take care
* of enabling them on the CRTC's first fastset.
*/Matt
Quoted 79 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-66} static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14614,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 1 line
2.20.1
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Remove begin/finish_crtc_commit, v3.
In reply to Matt RoperThis can all be done from the intel_update_crtc function. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.
Changes since v1:
- Inline intel_update_pipe_config()
Changes since v2:
- Add comments suggested by matt.
- Reorder commit_pipe_config() to remove all nesting. (Ville, Matt)
- Use intel_set_pipe_src_size((). (Matt)
--- drivers/gpu/drm/i915/display/intel_display.c | 206 +++++++++---------- 1 file changed, 95 insertions(+), 111 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +95 -111
@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);
@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;
@@ -13739,13 +13698,91 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state); + +/* +* During modesets pipe configuration was programmed as the +* CRTC was enabled. +*/ +if (modeset) +return ; + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + +if (!new_crtc_state->update_pipe) +return ; + +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is +* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ +intel_set_pipe_src_size (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 ) +icl_set_pipe_chicken (crtc); +} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,
@@ -13769,14 +13806,27 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )skl_update_planes_on_crtc (state, crtc);else i9xx_update_planes_on_crtc (state, crtc); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +/* +* We usually enable FIFO underrun interrupts as part of the +* CRTC enable sequence during modesets. But when we inherit a +* valid pipe configuration from the BIOS we need to take care +* of enabling them on the CRTC's first fastset. +*/ +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); } static void intel_old_crtc_state_disables(struct intel_atomic_state *state,
@@ -14573,72 +14623,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: Remove begin/finish_crtc_commit, v3.
Quoted 97 lines · Maarten Lankhorst
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()
Changes since v2:
- Add comments suggested by matt.
- Reordercommit_pipe_config()to remove all nesting. (Ville, Matt)
- Use intel_set_pipe_src_size((). (Matt)Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 206 +++++++++---------- 1 file changed, 95 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +17
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,91 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config(struct intel_atomic_state *state,
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13727
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+struct intel_crtc_state *old_crtc_state, + struct intel_crtc_state *new_crtc_state) +{ + struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);
Moving this here widens the gap between programming the FIFO split and programming the planes on VLV/CHV. I'd prefer to keep this at the end to keep it as close to the plane programming as possible.
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13737
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+ +/* +* During modesets pipe configuration was programmed as the +* CRTC was enabled. +*/ +if (modeset) +return ; + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state);
Similarly I'd move this downwards past the next two things to get it a bit closer to the pfit/plane programming.
Quoted 158 lines
drivers/gpu/drm/i915/display/intel_display.c +58
-70+ +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + +if (!new_crtc_state->update_pipe) +return ; + +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is +* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ +intel_set_pipe_src_size (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 ) +icl_set_pipe_chicken (crtc); +} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13806,27 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )skl_update_planes_on_crtc (state, crtc);else i9xx_update_planes_on_crtc (state, crtc); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +/* +* We usually enable FIFO underrun interrupts as part of the +* CRTC enable sequence during modesets. But when we inherit a +* valid pipe configuration from the BIOS we need to take care +* of enabling them on the CRTC's first fastset. +*/ +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); } static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14623,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 1 line
2.20.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: Remove begin/finish_crtc_commit, v3.
Op 26-09-2019 om 18:22 schreef Ville Syrjälä:
Quoted 103 lines · Maarten Lankhorst
Quoted 102 lines
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()
Changes since v2:
- Add comments suggested by matt.
- Reordercommit_pipe_config()to remove all nesting. (Ville, Matt)
- Use intel_set_pipe_src_size((). (Matt)Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 206 +++++++++---------- 1 file changed, 95 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +22
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,91 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13727
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-0+bool modeset =needs_modeset (new_crtc_state); + +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);Moving this here widens the gap between programming the FIFO split and programming the planes on VLV/CHV. I'd prefer to keep this at the end to keep it as close to the plane programming as possible.
It wouldn't, only on fastset and color updates.
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+ +/* +* During modesets pipe configuration was programmed as the +* CRTC was enabled.
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13737
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_display.c +6
-0+*/ +if (modeset) +return ; + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state);Similarly I'd move this downwards past the next two things to get it a bit closer to the pfit/plane programming.
Sigh!
Quoted 150 lines
Quoted 150 lines
drivers/gpu/drm/i915/display/intel_display.c +58
-67+ +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + +if (!new_crtc_state->update_pipe) +return ; + +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is +* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ +intel_set_pipe_src_size (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 ) +icl_set_pipe_chicken (crtc); +} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13806,27 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )skl_update_planes_on_crtc (state, crtc);else i9xx_update_planes_on_crtc (state, crtc); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +/* +* We usually enable FIFO underrun interrupts as part of the +* CRTC enable sequence during modesets. But when we inherit a +* valid pipe configuration from the BIOS we need to take care +* of enabling them on the CRTC's first fastset. +*/ +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); } static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14623,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED )
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-3-intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 1 line
2.20.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/4] drm/i915: Remove begin/finish_crtc_commit, v2.
In reply to Matt RoperQuoted 152 lines · Matt Roper
Quoted 114 lines · Maarten Lankhorst
This can all be done from the
intel_update_crtcfunction. Split out the pipe update into a separate function, just like is done for the planes. Pull in all the changes done during fastset as well. It makes no sense for it to still exist as a separate function.Changes since v1:
- Inlineintel_update_pipe_config()Signed-off-by Maarten Lankhorst <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 197 ++++++++----------- 1 file changed, 86 insertions(+), 111 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +38
-41@@ -136,8 +136,6 @@ static void vlv_prepare_pll(struct intel_crtc *crtc, const struct intel_crtc_state *pipe_config);static void chv_prepare_pll (struct intel_crtc *crtc,const struct intel_crtc_state *pipe_config); -static void intel_begin_crtc_commit (struct intel_atomic_state *,struct intel_crtc *); -static void intel_finish_crtc_commit (struct intel_atomic_state *,struct intel_crtc *);static void intel_crtc_init_scalers (struct intel_crtc *crtc,struct intel_crtc_state *crtc_state);static void skylake_pfit_enable (const struct intel_crtc_state *crtc_state);@@ -4409,45 +4407,6 @@ static void icl_set_pipe_chicken(struct intel_crtc *crtc)I915_WRITE (PIPE_CHICKEN (pipe), tmp); } -static void intel_update_pipe_config (const struct intel_crtc_state *old_crtc_state, -const struct intel_crtc_state *new_crtc_state) -{ -struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ - crtc->base.mode = new_crtc_state->uapi.mode; - -/* -* Update pipe size and adjust fitter if needed: the reason for this is -* that in compute_mode_changes we check the native mode (not the pfit -* mode) to see if we can flip rather than do a full mode set. In the -* fastboot case, we'll flip, but if we don't update the pipesrc and -* pfit state, we'll end up with a big fb scanned out into the wrong -* sized surface. -*/ - -I915_WRITE (PIPESRC (crtc->pipe), - ((new_crtc_state->pipe_src_w -1 ) <<16 ) | - (new_crtc_state->pipe_src_h -1 )); - -/* on skylake this is done by detaching scalers */ -if (INTEL_GEN (dev_priv) >=9 ) { -skl_detach_scalers (new_crtc_state); - -if (new_crtc_state->pch_pfit.enabled) -skylake_pfit_enable (new_crtc_state); - }else if (HAS_PCH_SPLIT (dev_priv)) { -if (new_crtc_state->pch_pfit.enabled) -ironlake_pfit_enable (new_crtc_state); -else if (old_crtc_state->pch_pfit.enabled) -ironlake_pfit_disable (old_crtc_state); - } - -if (INTEL_GEN (dev_priv) >=11 ) -icl_set_pipe_chicken (crtc); -} -static void intel_fdi_normal_train (struct intel_crtc *crtc) {struct drm_device *dev = crtc->base.dev;@@ -13739,13 +13698,88 @@ u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc)return crtc->base.funcs->get_vblank_counter (&crtc->base); } +void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, +struct intel_crtc_state *crtc_state) +{ +struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); + +if (!IS_GEN (dev_priv,2 )) +intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); + +if (crtc_state->has_pch_encoder) { +enum pipe pch_transcoder = +intel_crtc_pch_transcoder (crtc); + +intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); + } +} + +static void commit_pipe_config (struct intel_atomic_state *state, +struct intel_crtc_state *old_crtc_state, +struct intel_crtc_state *new_crtc_state) +{ +struct intel_crtc *crtc =to_intel_crtc (new_crtc_state->uapi.crtc); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev); +bool modeset =needs_modeset (new_crtc_state); + +if (!modeset) { +if (new_crtc_state->uapi.color_mgmt_changed || + new_crtc_state->update_pipe) +intel_color_commit (new_crtc_state); + +if (INTEL_GEN (dev_priv) >=9 ) +skl_detach_scalers (new_crtc_state); + +if (new_crtc_state->update_pipe) { +/* drm_atomic_helper_update_legacy_modeset_state might not be called. */ + crtc->base.mode = new_crtc_state->uapi.mode; + +/* +* Update pipe size and adjust fitter if needed: the reason for this is drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13748
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +10
-0+* that in compute_mode_changes we check the native mode (not the pfit +* mode) to see if we can flip rather than do a full mode set. In the +* fastboot case, we'll flip, but if we don't update the pipesrc and +* pfit state, we'll end up with a big fb scanned out into the wrong +* sized surface. +*/ + +I915_WRITE (PIPESRC (crtc->pipe), + ((new_crtc_state->pipe_src_w -1 ) <<16 ) | + (new_crtc_state->pipe_src_h -1 ));
intel_set_pipe_src_size(new_crtc_state);to be more future-proof in case the register changes in the future.
Quoted 22 lines
drivers/gpu/drm/i915/display/intel_display.c +22
-0+ +if (INTEL_GEN (dev_priv) >=9 ) { +/* +* enable pipe scaler here if needed, if +* it's disabled, that's done by +* skl_detach_scalers() above. +*/ +skylake_pfit_enable (new_crtc_state); + }else if (HAS_PCH_SPLIT (dev_priv)) { +if (!new_crtc_state->pch_pfit.enabled) +ironlake_pfit_disable (old_crtc_state); +else +ironlake_pfit_enable (new_crtc_state); + } + +if (INTEL_GEN (dev_priv) >=11 ) +icl_set_pipe_chicken (crtc); + } + +if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) +bdw_set_pipemisc (new_crtc_state); + }
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_display.c u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc) · line 13774
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_display.c +4
-0+ +if (dev_priv->display.atomic_update_watermarks) + dev_priv->display.atomic_update_watermarks (state, + new_crtc_state);It might make sense to move the watermark update out to the caller. The watermark registers themselves are plane-based, so dealing with them in the
commit_pipe_configfunction is already slightly non-intuitive.
This one actually just does the linetime wm on skl+. We should probably just move that into some other place so we could get rid of this hook on those platforms.
Quoted 156 lines
Plus
that will let us just do a/* * During modesets pipe configuration was programmed as the * CRTC was enabled. */ if (!modeset) return;and drop a level of nesting for the rest of this function.
Quoted 24 lines
drivers/gpu/drm/i915/display/intel_display.c +7
-3+} +static void intel_update_crtc (struct intel_crtc *crtc,struct intel_atomic_state *state,struct intel_crtc_state *old_crtc_state,struct intel_crtc_state *new_crtc_state) { -struct drm_device *dev = state->base.dev; -struct drm_i915_private *dev_priv =to_i915 (dev); +struct drm_i915_private *dev_priv =to_i915 (state->base.dev);bool modeset =needs_modeset (new_crtc_state);struct intel_plane_state *new_plane_state = intel_atomic_get_new_plane_state(state,@@ -13769,14 +13803,21 @@ static void intel_update_crtc(struct intel_crtc *crtc,else if (new_plane_state)intel_fbc_enable (crtc, new_crtc_state, new_plane_state); -intel_begin_crtc_commit (state, crtc); +/* Perform vblank evasion around commit operation */ +intel_pipe_update_start (new_crtc_state); + +commit_pipe_config (state, old_crtc_state, new_crtc_state);if (INTEL_GEN (dev_priv) >=9 )drivers/gpu/drm/i915/display/intel_display.c static void intel_update_crtc(struct intel_crtc *crtc, · line 13820
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-1skl_update_planes_on_crtc (state, crtc); elsei9xx_update_planes_on_crtc (state ,crtc ); -intel_finish_crtc_commit (state, crtc); +intel_pipe_update_end (new_crtc_state); + +if (new_crtc_state->update_pipe && !modeset && + old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) +intel_crtc_arm_fifo_underrun (crtc, new_crtc_state);It might be worth adding a comment to this block. I always have to go dig back through git history to remind myself we this is needed. Maybe something like:
/*
* We usually enable FIFO underrun interrupts as part of the
* CRTC enable sequence during modesets. But when we inherit a
* valid pipe configuration from the BIOS we need to take care
* of enabling them on the CRTC's first fastset.
*/Matt
Quoted 83 lines
drivers/gpu/drm/i915/display/intel_display.c +0
-66} static void intel_old_crtc_state_disables(struct intel_atomic_state *state,@@ -14573,72 +14614,6 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,return max_scale; } -static void intel_begin_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); -bool modeset =needs_modeset (new_crtc_state); - -/* Perform vblank evasion around commit operation */ -intel_pipe_update_start (new_crtc_state); - -if (modeset) - goto out; - -if (new_crtc_state->uapi.color_mgmt_changed || - new_crtc_state->update_pipe) -intel_color_commit (new_crtc_state); - -if (new_crtc_state->update_pipe) -intel_update_pipe_config (old_crtc_state, new_crtc_state); -else if (INTEL_GEN (dev_priv) >=9 ) -skl_detach_scalers (new_crtc_state); - -if (INTEL_GEN (dev_priv) >=9 ||IS_BROADWELL (dev_priv)) -bdw_set_pipemisc (new_crtc_state); - -out: -if (dev_priv->display.atomic_update_watermarks) - dev_priv->display.atomic_update_watermarks (state, - new_crtc_state); -} - -void intel_crtc_arm_fifo_underrun (struct intel_crtc *crtc, -struct intel_crtc_state *crtc_state) -{ -struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev); - -if (!IS_GEN (dev_priv,2 )) -intel_set_cpu_fifo_underrun_reporting (dev_priv, crtc->pipe, true); - -if (crtc_state->has_pch_encoder) { -enum pipe pch_transcoder = -intel_crtc_pch_transcoder (crtc); - -intel_set_pch_fifo_underrun_reporting (dev_priv, pch_transcoder, true); - } -} - -static void intel_finish_crtc_commit (struct intel_atomic_state *state, -struct intel_crtc *crtc) -{ -struct intel_crtc_state *old_crtc_state = -intel_atomic_get_old_crtc_state (state, crtc); -struct intel_crtc_state *new_crtc_state = -intel_atomic_get_new_crtc_state (state, crtc); - -intel_pipe_update_end (new_crtc_state); - -if (new_crtc_state->update_pipe && - !needs_modeset (new_crtc_state) && - old_crtc_state->hw.mode.private_flags &I915_MODE_FLAG_INHERITED ) -intel_crtc_arm_fifo_underrun (crtc, new_crtc_state); -} -/** * intel_plane_destroy - destroy a plane * @plane: plane to destroy Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 9 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation (916) 356-2795 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state
URL : https://patchwork.freedesktop.org/series/67227/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 4cc35a6ea9c7 drm/i915: Prepare to split crtc state in uapi and hw state -:2130: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided #2130: FILE: drivers/gpu/drm/i915/display/intel_display.c:11264: + crtc_state->uapi.active = crtc_state->uapi.enable = true;
-:2837: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided #2837: FILE: drivers/gpu/drm/i915/display/intel_display.c:16735:
+ crtc_state->hw.active = crtc_state->hw.enable =
-:4001: ERROR:CODE_INDENT: code indent should use tabs where possible #4001: FILE: drivers/gpu/drm/i915/display/intel_sprite.c:211:
+^I^I^I^I new_crtc_state->uapi.event);$
-:4001: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #4001: FILE: drivers/gpu/drm/i915/display/intel_sprite.c:211:
+ drm_crtc_arm_vblank_event(&crtc->base,
+ new_crtc_state->uapi.event);
total: 1 errors, 0 warnings, 3 checks, 4371 lines checkedb6094973d8a5 drm/i915: Handle a few more cases for hw/sw split864203251a89 drm/i915: Complete sw/hw split, v2.
-:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #15:
- Clear crtc_state->hw on disable, instead of using clear_intel_crtc_state().
total: 0 errors, 1 warnings, 0 checks, 204 lines checked fd18dc2e2495 drm/i915: Remove begin/finish_crtc_commit, v2. -:125: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #125: FILE: drivers/gpu/drm/i915/display/intel_display.c:13747:
+ I915_WRITE(PIPESRC(crtc->pipe),
+ ((new_crtc_state->pipe_src_w - 1) << 16) |
total: 0 errors, 0 warnings, 1 checks, 238 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state
URL : https://patchwork.freedesktop.org/series/67227/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6956 -> Patchwork_14533
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/
Known issues
------------
Here are the changes found in Patchwork_14533 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850: [INCOMPLETE][1] ([fdo#107718]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/fi-blb-e6850/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/fi-blb-e6850/igt@[email protected]
* igt@kms_chamelium@hdmi-crc-fast:
- fi-kbl-7500u: [FAIL][3] ([fdo#109635 ]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/fi-kbl-7500u/igt@[email protected]
#### Warnings ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][5] ([fdo#111168 ]) -> [FAIL][6] ([fdo#111407])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/fi-kbl-7500u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/fi-kbl-7500u/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#111168 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111168
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736
Participating hosts (51 -> 44)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6956 -> Patchwork_14533
CI-20190529: 20190529
CI_DRM_6956: e514b64998c2845943242b1d4dc2e568b01fddcb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5202: 3499c5eb17054e2abd88023fe962768140d24302 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14533: fd18dc2e2495c7fafa84a53275d0111309484667 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
fd18dc2e2495 drm/i915: Remove begin/finish_crtc_commit, v2. 864203251a89 drm/i915: Complete sw/hw split, v2. b6094973d8a5 drm/i915: Handle a few more cases for hw/sw split 4cc35a6ea9c7 drm/i915: Prepare to split crtc state in uapi and hw state
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state
URL : https://patchwork.freedesktop.org/series/67227/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6956_full -> Patchwork_14533_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_14533_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-apl: [PASS][1] -> [DMESG-WARN][2] ([fdo#108566]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-apl5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-apl5/igt@[email protected]
* igt@gem_exec_schedule@independent-bsd2:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276]) +14 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#111325]) +7 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb2/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-render-xtiled:
- shard-skl: [PASS][7] -> [FAIL][8] ([fdo#103184] / [fdo#103232])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl7/igt@[email protected]
* igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
- shard-hsw: [PASS][9] -> [DMESG-FAIL][10] ([fdo#102614])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-hsw6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-hsw5/igt@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank:
- shard-hsw: [PASS][11] -> [INCOMPLETE][12] ([fdo#103540])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-hsw5/igt@kms_flip@basic-flip-vs-wf_vblank.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-hsw6/igt@kms_flip@basic-flip-vs-wf_vblank.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: [PASS][13] -> [FAIL][14] ([fdo#105363])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl9/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl10/igt@[email protected]
* igt@kms_flip@wf_vblank-ts-check-interruptible:
- shard-apl: [PASS][15] -> [INCOMPLETE][16] ([fdo#103927]) +4 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-apl4/igt@kms_flip@wf_vblank-ts-check-interruptible.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-apl4/igt@kms_flip@wf_vblank-ts-check-interruptible.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render:
- shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#103167]) +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-kbl4/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-kbl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][21] -> [FAIL][22] ([fdo#108145] / [fdo#110403])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl3/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl9/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109642] / [fdo#111068]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb4/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb5/igt@kms_psr@psr2_primary_page_flip.html
#### Possible fixes ####
* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][27] ([fdo#110854]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb7/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [SKIP][29] ([fdo#111325]) -> [PASS][30] +3 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [SKIP][31] ([fdo#109276]) -> [PASS][32] +16 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb8/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb1/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-size-change:
- shard-skl: [FAIL][33] ([fdo#103232]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl5/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl4/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-256x85-onscreen:
- shard-iclb: [INCOMPLETE][35] ([fdo#107713]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb7/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [FAIL][37] ([fdo#105363]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl8/igt@[email protected]
* igt@kms_flip@flip-vs-suspend:
- shard-skl: [INCOMPLETE][39] ([fdo#109507]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl3/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl9/igt@[email protected]
* igt@kms_flip@plain-flip-fb-recreate-interruptible:
- shard-skl: [FAIL][41] ([fdo#100368]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl4/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl8/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-iclb: [FAIL][43] ([fdo#103167]) -> [PASS][44] +6 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][45] ([fdo#108145] / [fdo#110403]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl7/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][47] ([fdo#103166]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb4/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb6/igt@[email protected]
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][49] ([fdo#109441]) -> [PASS][50] +3 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-iclb4/igt@kms_psr@psr2_sprite_plane_move.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_sequence@queue-idle:
- shard-hsw: [DMESG-WARN][51] ([fdo#102614]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-hsw5/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-hsw6/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: [DMESG-WARN][53] ([fdo#108566]) -> [PASS][54] +4 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-apl7/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-apl3/igt@[email protected]
* igt@perf@blocking:
- shard-skl: [FAIL][55] ([fdo#110728]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-skl1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-skl5/igt@[email protected]
#### Warnings ####
* igt@kms_content_protection@srm:
- shard-apl: [FAIL][57] ([fdo#110321]) -> [INCOMPLETE][58] ([fdo#103927])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6956/shard-apl8/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/shard-apl5/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
Participating hosts (15 -> 9)
------------------------------
Missing (6): shard-tglb1 shard-tglb2 shard-tglb3 shard-tglb4 shard-tglb5 shard-tglb6
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6956 -> Patchwork_14533
CI-20190529: 20190529
CI_DRM_6956: e514b64998c2845943242b1d4dc2e568b01fddcb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5202: 3499c5eb17054e2abd88023fe962768140d24302 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14533: fd18dc2e2495c7fafa84a53275d0111309484667 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14533/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state (rev2)
URL : https://patchwork.freedesktop.org/series/67227/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 1368d49f2ac9 drm/i915: Prepare to split crtc state in uapi and hw state -:2130: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided #2130: FILE: drivers/gpu/drm/i915/display/intel_display.c:11264: + crtc_state->uapi.active = crtc_state->uapi.enable = true;
-:2837: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided #2837: FILE: drivers/gpu/drm/i915/display/intel_display.c:16735:
+ crtc_state->hw.active = crtc_state->hw.enable =
-:4001: ERROR:CODE_INDENT: code indent should use tabs where possible #4001: FILE: drivers/gpu/drm/i915/display/intel_sprite.c:211:
+^I^I^I^I new_crtc_state->uapi.event);$
-:4001: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #4001: FILE: drivers/gpu/drm/i915/display/intel_sprite.c:211:
+ drm_crtc_arm_vblank_event(&crtc->base,
+ new_crtc_state->uapi.event);
total: 1 errors, 0 warnings, 3 checks, 4371 lines checkede3721d7eec35 drm/i915: Handle a few more cases for hw/sw split4e6a21fdedd8 drm/i915: Complete sw/hw split, v2.
-:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #15:
- Clear crtc_state->hw on disable, instead of using clear_intel_crtc_state().
total: 0 errors, 1 warnings, 0 checks, 204 lines checked a971c9fd2236 drm/i915: Remove begin/finish_crtc_commit, v3. -:191: ERROR:CODE_INDENT: code indent should use tabs where possible #191: FILE: drivers/gpu/drm/i915/display/intel_display.c:13821:
+ /*$
-:192: ERROR:CODE_INDENT: code indent should use tabs where possible #192: FILE: drivers/gpu/drm/i915/display/intel_display.c:13822:
+ * We usually enable FIFO underrun interrupts as part of the$
-:193: ERROR:CODE_INDENT: code indent should use tabs where possible #193: FILE: drivers/gpu/drm/i915/display/intel_display.c:13823:
+ * CRTC enable sequence during modesets. But when we inherit a$
-:194: ERROR:CODE_INDENT: code indent should use tabs where possible #194: FILE: drivers/gpu/drm/i915/display/intel_display.c:13824:
+ * valid pipe configuration from the BIOS we need to take care$
-:195: ERROR:CODE_INDENT: code indent should use tabs where possible #195: FILE: drivers/gpu/drm/i915/display/intel_display.c:13825:
+ * of enabling them on the CRTC's first fastset.$
-:196: ERROR:CODE_INDENT: code indent should use tabs where possible #196: FILE: drivers/gpu/drm/i915/display/intel_display.c:13826:
+ */$
total: 6 errors, 0 warnings, 0 checks, 247 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state (rev2)
URL : https://patchwork.freedesktop.org/series/67227/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6963 -> Patchwork_14549
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/
Known issues
------------
Here are the changes found in Patchwork_14549 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [FAIL][1] ([fdo#109483]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/fi-icl-u2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/fi-icl-u2/igt@[email protected]
- fi-kbl-7500u: [FAIL][3] ([fdo#111045] / [fdo#111096]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/fi-kbl-7500u/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
Participating hosts (50 -> 39)
------------------------------
Missing (11): fi-icl-u4 fi-bxt-dsi fi-ilk-m540 fi-tgl-u2 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6963 -> Patchwork_14549
CI-20190529: 20190529
CI_DRM_6963: 364bf33c246115063174fa2a07e9f5a6bddc9f72 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5203: 82326332f7af336d390e00ae87187bc207fd33dd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14549: a971c9fd223648f1e5c4a0da49926414d78429c3 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
a971c9fd2236 drm/i915: Remove begin/finish_crtc_commit, v3. 4e6a21fdedd8 drm/i915: Complete sw/hw split, v2. e3721d7eec35 drm/i915: Handle a few more cases for hw/sw split 1368d49f2ac9 drm/i915: Prepare to split crtc state in uapi and hw state
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state (rev2)
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: series starting with [1/4] drm/i915: Prepare to split crtc state in uapi and hw state (rev2)
URL : https://patchwork.freedesktop.org/series/67227/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6963_full -> Patchwork_14549_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_14549_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_schedule@out-order-bsd2:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#109276]) +12 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb7/igt@[email protected]
* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb4/igt@[email protected]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-apl6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-apl3/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-badstride:
- shard-iclb: [PASS][7] -> [FAIL][8] ([fdo#103167]) +6 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb5/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-iclb: [PASS][9] -> [INCOMPLETE][10] ([fdo#107713] / [fdo#110042])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][11] -> [FAIL][12] ([fdo#108145] / [fdo#110403])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-skl1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-skl7/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109441]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][15] -> [FAIL][16] ([fdo#99912])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-apl1/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-apl4/igt@[email protected]
* igt@perf@blocking:
- shard-skl: [PASS][17] -> [FAIL][18] ([fdo#110728])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-skl5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-skl6/igt@[email protected]
#### Possible fixes ####
* igt@drm_import_export@import-close-race-flink:
- shard-hsw: [INCOMPLETE][19] ([fdo#103540]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-hsw1/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-hsw1/igt@[email protected]
* igt@gem_ctx_isolation@bcs0-s3:
- shard-apl: [DMESG-WARN][21] ([fdo#108566]) -> [PASS][22] +8 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-apl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-apl2/igt@[email protected]
* {igt@gem_eio@kms}:
- shard-snb: [INCOMPLETE][23] ([fdo#105411]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-snb7/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-snb7/igt@[email protected]
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [SKIP][25] ([fdo#111325]) -> [PASS][26] +5 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb3/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-blt-untiled:
- shard-skl: [FAIL][27] ([fdo#103184] / [fdo#103232]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-skl2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-skl5/igt@[email protected]
* igt@kms_flip@dpms-vs-vblank-race:
- shard-apl: [FAIL][29] ([fdo#111609]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-apl7/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-apl2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [FAIL][31] ([fdo#103167]) -> [PASS][32] +3 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][33] ([fdo#109441]) -> [PASS][34] +3 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb5/igt@kms_psr@psr2_cursor_mmap_cpu.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
* igt@perf@polling:
- shard-skl: [FAIL][35] ([fdo#110728]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-skl4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-skl8/igt@[email protected]
* igt@perf@rc6-disable:
- shard-kbl: [FAIL][37] ([fdo#103179]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-kbl2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-kbl2/igt@[email protected]
* igt@perf_pmu@cpu-hotplug:
- shard-glk: [TIMEOUT][39] -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-glk5/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-glk5/igt@[email protected]
* igt@prime_busy@hang-bsd2:
- shard-iclb: [SKIP][41] ([fdo#109276]) -> [PASS][42] +15 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb8/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb1/igt@[email protected]
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][43] ([fdo#109276]) -> [FAIL][44] ([fdo#111329])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb5/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb1/igt@[email protected]
* igt@gem_mocs_settings@mocs-settings-bsd2:
- shard-iclb: [FAIL][45] ([fdo#111330]) -> [SKIP][46] ([fdo#109276]) +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb1/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb8/igt@[email protected]
* igt@kms_busy@extended-modeset-hang-newfb-render-d:
- shard-glk: [TIMEOUT][47] -> [SKIP][48] ([fdo#109271] / [fdo#109278])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-glk5/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-glk5/igt@[email protected]
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [DMESG-WARN][49] ([fdo#107724]) -> [SKIP][50] ([fdo#109349])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6963/shard-iclb2/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/shard-iclb3/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103179]: https://bugs.freedesktop.org/show_bug.cgi?id=103179
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110042]: https://bugs.freedesktop.org/show_bug.cgi?id=110042
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111609]: https://bugs.freedesktop.org/show_bug.cgi?id=111609
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (16 -> 10)
------------------------------
Missing (6): shard-tglb1 shard-tglb2 shard-tglb3 shard-tglb4 shard-tglb5 shard-tglb6
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6963 -> Patchwork_14549
CI-20190529: 20190529
CI_DRM_6963: 364bf33c246115063174fa2a07e9f5a6bddc9f72 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5203: 82326332f7af336d390e00ae87187bc207fd33dd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14549: a971c9fd223648f1e5c4a0da49926414d78429c3 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14549/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx