Simplify uncore register updates
Subsystems (3)
v2 cover Simplify uncore register updates
This patchset should not modify behaviour of the code (except patch 3). It just replaces sequence of uncore read/modify/write with single call. Moreover it replaces nested pointers with alias if there is one. All patches except 3rd, were generated using coccinelle (quite ugly) and adjusted in some cases by hand.
v2:
- addressed comments by Andi, Jani and lkp,
- despite Jani objections Ive left 1st patch with hope he will change his mind, if not it can be safely ignored :),
- converted few more read/modifiy/write sequences in last patch,
- style adjustements to make checkpatch happy.
Regards
Andrzej
Andrzej Hajda (4):
drm/i915/display: Use drm_device alias if defined drm/i915/display: Use intel_uncore alias if defined drm/i915: make intel_uncore_rmw() write unconditionally drm/i915: use proper helper for register updates
drivers/gpu/drm/i915/display/icl_dsi.c | 4 +- drivers/gpu/drm/i915/display/intel_display.c | 3 +- .../drm/i915/display/intel_display_debugfs.c | 2 +- drivers/gpu/drm/i915/display/intel_hotplug.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 13 +- drivers/gpu/drm/i915/display/intel_opregion.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 9 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 237 +++++++----------- drivers/gpu/drm/i915/intel_pm.c | 60 ++--- drivers/gpu/drm/i915/intel_uncore.h | 8 +- drivers/gpu/drm/i915/vlv_suspend.c | 28 +-- 12 files changed, 133 insertions(+), 237 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/4 drm/i915/display: Use drm_device alias if defined
Alias is shorter and more readable.
--- drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display.c | 3 +-- .../gpu/drm/i915/display/intel_display_debugfs.c | 2 +- drivers/gpu/drm/i915/display/intel_hotplug.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 13 +++++-------- drivers/gpu/drm/i915/display/intel_opregion.c | 2 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- 7 files changed, 12 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +2 -2
@@ -2050,7 +2050,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)mutex_unlock (&dev->mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { -drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" ); +drm_err (dev,"DSI fixed mode info missing\n" ); goto err; }
@@ -2063,7 +2063,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)else intel_dsi->ports =BIT (port); -if (drm_WARN_ON (&dev_priv->drm, intel_connector->panel.vbt.dsi.bl_ports & ~intel_dsi->ports)) +if (drm_WARN_ON (dev, intel_connector->panel.vbt.dsi.bl_ports & ~intel_dsi->ports)) intel_connector->panel.vbt.dsi.bl_ports &= intel_dsi->ports;if (drm_WARN_ON (&dev_priv->drm, intel_connector->panel.vbt.dsi.cabc_ports & ~intel_dsi->ports))
drivers/gpu/drm/i915/display/intel_display.c +1 -2
@@ -8726,8 +8726,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)intel_gmbus_setup (i915); -drm_dbg_kms (&i915->drm,"%d display pipe%s available.\n" , -INTEL_NUM_PIPES (i915), +drm_dbg_kms (dev,"%d display pipe%s available.\n" ,INTEL_NUM_PIPES (i915),INTEL_NUM_PIPES (i915) >1 ?"s" :"" );for_each_pipe (i915, pipe) {
drivers/gpu/drm/i915/display/intel_display_debugfs.c +1 -1
@@ -998,7 +998,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" ); -for_each_intel_crtc (&dev_priv->drm, crtc) { +for_each_intel_crtc (dev, crtc) {struct intel_crtc_state *crtc_state =to_intel_crtc_state (crtc->base.state);enum pipe pipe = crtc->pipe;
drivers/gpu/drm/i915/display/intel_hotplug.c +1 -1
@@ -378,7 +378,7 @@ static void i915_hotplug_work_func(struct work_struct *work)u32 hpd_retry_bits;mutex_lock (&dev->mode_config.mutex); -drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" ); +drm_dbg_kms (dev,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);
drivers/gpu/drm/i915/display/intel_lvds.c +5 -8
@@ -847,8 +847,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) }if (!dev_priv->display.vbt.int_lvds_support) { -drm_dbg_kms (&dev_priv->drm, -"Internal LVDS support disabled by VBT\n" ); +drm_dbg_kms (dev,"Internal LVDS support disabled by VBT\n" );return ; }
@@ -867,12 +866,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) pin =GMBUS_PIN_PANEL ;if (!intel_bios_is_lvds_present (dev_priv, &pin)) {if ((lvds &LVDS_PORT_EN ) ==0 ) { -drm_dbg_kms (&dev_priv->drm, -"LVDS is not present in VBT\n" ); +drm_dbg_kms (dev,"LVDS is not present in VBT\n" );return ; } -drm_dbg_kms (&dev_priv->drm, -"LVDS is not present in VBT, but enabled anyway\n" ); +drm_dbg_kms (dev,"LVDS is not present in VBT, but enabled anyway\n" ); } lvds_encoder =kzalloc (sizeof (*lvds_encoder),GFP_KERNEL );
@@ -993,7 +990,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)intel_backlight_setup (intel_connector,INVALID_PIPE ); lvds_encoder->is_dual_link =compute_is_dual_link_lvds (lvds_encoder); -drm_dbg_kms (&dev_priv->drm,"detected %s-link lvds configuration\n" , +drm_dbg_kms (dev,"detected %s-link lvds configuration\n" , lvds_encoder->is_dual_link ?"dual" :"single" ); lvds_encoder->a3_power = lvds &LVDS_A3_POWER_MASK ;
@@ -1001,7 +998,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ; failed: -drm_dbg_kms (&dev_priv->drm,"No LVDS modes found, disabling.\n" ); +drm_dbg_kms (dev,"No LVDS modes found, disabling.\n" );drm_connector_cleanup (connector);drm_encoder_cleanup (encoder);kfree (lvds_encoder);
drivers/gpu/drm/i915/display/intel_opregion.c +1 -1
@@ -465,7 +465,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct opregion_asle *asle = dev_priv->display.opregion.asle;struct drm_device *dev = &dev_priv->drm; -drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp); +drm_dbg (dev,"bclp = 0x%08x\n" , bclp);if (acpi_video_get_backlight_type () == acpi_backlight_native) { drm_dbg_kms(&dev_priv->drm,
drivers/gpu/drm/i915/display/vlv_dsi.c +1 -1
@@ -1855,7 +1855,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)enum port port;enum pipe pipe; -drm_dbg_kms (&dev_priv->drm,"\n" ); +drm_dbg_kms (dev,"\n" );/* There is no detection method for MIPI so rely on VBT */ if (!intel_bios_is_dsi_present (dev_priv, &port))
Signature · 1 line
2.34.1
Re: [Intel-gfx] [PATCH v2 1/4] drm/i915/display: Use drm_device alias if defined
Quoted 1 line · Andrzej Hajda
Alias is shorter and more readable.
NAK. We want to get rid of these extra 'dev' pointers.
Quoted 150 lines
Signed-off-by Andrzej Hajda <[email protected]>Reviewed-by Andi Shyti <[email protected]>--- drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++-- drivers/gpu/drm/i915/display/intel_display.c | 3 +-- .../gpu/drm/i915/display/intel_display_debugfs.c | 2 +- drivers/gpu/drm/i915/display/intel_hotplug.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 13 +++++-------- drivers/gpu/drm/i915/display/intel_opregion.c | 2 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- 7 files changed, 12 insertions(+), 16 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +2
-2@@ -2050,7 +2050,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)mutex_unlock (&dev->mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { -drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" ); +drm_err (dev,"DSI fixed mode info missing\n" ); goto err; }@@ -2063,7 +2063,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)else intel_dsi->ports =BIT (port); -if (drm_WARN_ON (&dev_priv->drm, intel_connector->panel.vbt.dsi.bl_ports & ~intel_dsi->ports)) +if (drm_WARN_ON (dev, intel_connector->panel.vbt.dsi.bl_ports & ~intel_dsi->ports)) intel_connector->panel.vbt.dsi.bl_ports &= intel_dsi->ports;if (drm_WARN_ON (&dev_priv->drm, intel_connector->panel.vbt.dsi.cabc_ports & ~intel_dsi->ports))drivers/gpu/drm/i915/display/intel_display.c +1
-2@@ -8726,8 +8726,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)intel_gmbus_setup (i915); -drm_dbg_kms (&i915->drm,"%d display pipe%s available.\n" , -INTEL_NUM_PIPES (i915), +drm_dbg_kms (dev,"%d display pipe%s available.\n" ,INTEL_NUM_PIPES (i915),INTEL_NUM_PIPES (i915) >1 ?"s" :"" );for_each_pipe (i915, pipe) {drivers/gpu/drm/i915/display/intel_display_debugfs.c +1
-1@@ -998,7 +998,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" ); -for_each_intel_crtc (&dev_priv->drm, crtc) { +for_each_intel_crtc (dev, crtc) {struct intel_crtc_state *crtc_state =to_intel_crtc_state (crtc->base.state);enum pipe pipe = crtc->pipe;drivers/gpu/drm/i915/display/intel_hotplug.c +1
-1@@ -378,7 +378,7 @@ static void i915_hotplug_work_func(struct work_struct *work)u32 hpd_retry_bits;mutex_lock (&dev->mode_config.mutex); -drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" ); +drm_dbg_kms (dev,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);drivers/gpu/drm/i915/display/intel_lvds.c +5
-8@@ -847,8 +847,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) }if (!dev_priv->display.vbt.int_lvds_support) { -drm_dbg_kms (&dev_priv->drm, -"Internal LVDS support disabled by VBT\n" ); +drm_dbg_kms (dev,"Internal LVDS support disabled by VBT\n" );return ; }@@ -867,12 +866,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) pin =GMBUS_PIN_PANEL ;if (!intel_bios_is_lvds_present (dev_priv, &pin)) {if ((lvds &LVDS_PORT_EN ) ==0 ) { -drm_dbg_kms (&dev_priv->drm, -"LVDS is not present in VBT\n" ); +drm_dbg_kms (dev,"LVDS is not present in VBT\n" );return ; } -drm_dbg_kms (&dev_priv->drm, -"LVDS is not present in VBT, but enabled anyway\n" ); +drm_dbg_kms (dev,"LVDS is not present in VBT, but enabled anyway\n" ); } lvds_encoder =kzalloc (sizeof (*lvds_encoder),GFP_KERNEL );@@ -993,7 +990,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)intel_backlight_setup (intel_connector,INVALID_PIPE ); lvds_encoder->is_dual_link =compute_is_dual_link_lvds (lvds_encoder); -drm_dbg_kms (&dev_priv->drm,"detected %s-link lvds configuration\n" , +drm_dbg_kms (dev,"detected %s-link lvds configuration\n" , lvds_encoder->is_dual_link ?"dual" :"single" ); lvds_encoder->a3_power = lvds &LVDS_A3_POWER_MASK ;@@ -1001,7 +998,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)return ; failed: -drm_dbg_kms (&dev_priv->drm,"No LVDS modes found, disabling.\n" ); +drm_dbg_kms (dev,"No LVDS modes found, disabling.\n" );drm_connector_cleanup (connector);drm_encoder_cleanup (encoder);kfree (lvds_encoder);drivers/gpu/drm/i915/display/intel_opregion.c +1
-1@@ -465,7 +465,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct opregion_asle *asle = dev_priv->display.opregion.asle;struct drm_device *dev = &dev_priv->drm; -drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp); +drm_dbg (dev,"bclp = 0x%08x\n" , bclp);if (acpi_video_get_backlight_type () == acpi_backlight_native) { drm_dbg_kms(&dev_priv->drm,drivers/gpu/drm/i915/display/vlv_dsi.c +1
-1@@ -1855,7 +1855,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)enum port port;enum pipe pipe; -drm_dbg_kms (&dev_priv->drm,"\n" ); +drm_dbg_kms (dev,"\n" );/* There is no detection method for MIPI so rely on VBT */ if (!intel_bios_is_dsi_present (dev_priv, &port))Signature · 1 line
2.34.1
Signature · 2 lines
Ville Syrjälä Intel
PATCH v3 1/4 drm/i915/display: remove drm_device aliases
drm_device pointers are unwelcome.
--- drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../drm/i915/display/intel_display_debugfs.c | 51 ++++++++----------- .../drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++----- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_lvds.c | 11 ++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_tv.c | 5 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 17 +++---- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 104 deletions(-)
drivers/gpu/drm/i915/display/icl_dsi.c +4 -5
@@ -1985,7 +1985,6 @@ static void icl_dsi_add_properties(struct intel_connector *connector)void icl_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *encoder;struct intel_connector *intel_connector;
@@ -2010,7 +2009,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base;/* register DSI encoder with DRM subsystem */ -drm_encoder_init (dev, &encoder->base, &gen11_dsi_encoder_funcs, +drm_encoder_init (&dev_priv->drm, &encoder->base, &gen11_dsi_encoder_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;
@@ -2034,7 +2033,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;/* register DSI connector with DRM subsystem */ -drm_connector_init (dev, connector, &gen11_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &gen11_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &gen11_dsi_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB;
@@ -2045,9 +2044,9 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)intel_bios_init_panel (dev_priv, &intel_connector->panel,NULL ,NULL ); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" );
drivers/gpu/drm/i915/display/intel_display.c +4 -5
@@ -878,7 +878,6 @@ static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)void intel_display_prepare_reset (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx *ctx = &dev_priv->reset_ctx;struct drm_atomic_state *state;int ret;
@@ -906,10 +905,10 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Need mode_config.mutex so that we don't * trample ongoing ->detect() and whatnot. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_modeset_acquire_init (ctx,0 );while (1 ) { - ret =drm_modeset_lock_all_ctx (dev, ctx); + ret =drm_modeset_lock_all_ctx (&dev_priv->drm, ctx);if (ret != -EDEADLK )break ;
@@ -919,7 +918,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Disabling the crtcs gracefully seems nicer. Also the * g33 docs say we should at least disable all the planes. */ - state =drm_atomic_helper_duplicate_state (dev, ctx); + state =drm_atomic_helper_duplicate_state (&dev_priv->drm, ctx);if (IS_ERR (state)) { ret =PTR_ERR (state); drm_err(&dev_priv->drm, "Duplicating state failed with %i\n",
@@ -927,7 +926,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)return ; } - ret =drm_atomic_helper_disable_all (dev, ctx); + ret =drm_atomic_helper_disable_all (&dev_priv->drm, ctx);if (ret) {drm_err (&dev_priv->drm,"Suspending crtc's failed with %i\n" , ret);
drivers/gpu/drm/i915/display/intel_display_debugfs.c +20 -31
212 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_display_power.c +1 -2
@@ -1148,10 +1148,9 @@ static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)static void assert_can_disable_lcpll (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc; -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)I915_STATE_WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));
drivers/gpu/drm/i915/display/intel_dp.c +3 -4
@@ -5229,7 +5229,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct intel_connector *intel_connector) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector = &intel_connector->base;struct drm_display_mode *fixed_mode;struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;
@@ -5246,7 +5245,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,* with an already powered-on LVDS power sequencer. */ if (intel_get_lvds_encoder (dev_priv)) { -drm_WARN_ON (dev, +drm_WARN_ON (&dev_priv->drm, !(HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)));drm_info (&dev_priv->drm,"LVDS was detected, not registering eDP\n" );
@@ -5267,7 +5266,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, goto out_vdd_off; } -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); edid =drm_get_edid (connector, &intel_dp->aux.ddc);if (!edid) {/* Fallback to EDID from ACPI OpRegion, if any */
@@ -5305,7 +5304,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { drm_info(&dev_priv->drm,
drivers/gpu/drm/i915/display/intel_hotplug.c +12 -16
@@ -178,14 +178,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,static void intel_hpd_irq_storm_switch_to_polling (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool hpd_disabled = false;lockdep_assert_held (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;
@@ -211,7 +210,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)/* Enable polling and queue hotplug re-enabling. */ if (hpd_disabled) { -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm);mod_delayed_work (system_wq, &dev_priv->display.hotplug.reenable_work,msecs_to_jiffies (HPD_STORM_REENABLE_DELAY )); }
@@ -222,7 +221,6 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)struct drm_i915_private *dev_priv =container_of (work,typeof (*dev_priv), display.hotplug.reenable_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;intel_wakeref_t wakeref;
@@ -232,7 +230,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) { pin =intel_connector_hpd_pin (connector); if (pin == HPD_NONE ||
@@ -370,14 +368,13 @@ static void i915_hotplug_work_func(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.hotplug_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;u32 changed =0 , retry =0 ;u32 hpd_event_bits;u32 hpd_retry_bits; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);
@@ -392,7 +389,7 @@ static void i915_hotplug_work_func(struct work_struct *work)spin_unlock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;u32 hpd_bit;
@@ -429,10 +426,10 @@ static void i915_hotplug_work_func(struct work_struct *work) } }drm_connector_list_iter_end (&conn_iter); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (changed) -drm_kms_helper_hotplug_event (dev); +drm_kms_helper_hotplug_event (&dev_priv->drm);/* Remove shared HPD pins that have changed */ retry &= ~changed;
@@ -615,16 +612,15 @@ static void i915_hpd_poll_init_work(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.poll_init_work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool enabled; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); enabled =READ_ONCE (dev_priv->display.hotplug.poll_enabled); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;
@@ -641,16 +637,16 @@ static void i915_hpd_poll_init_work(struct work_struct *work)drm_connector_list_iter_end (&conn_iter);if (enabled) -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* * We might have missed any hotplugs that happened while we were * in the middle of disabling polling */ if (!enabled) -drm_helper_hpd_irq_event (dev); +drm_helper_hpd_irq_event (&dev_priv->drm); }/**
drivers/gpu/drm/i915/display/intel_lpe_audio.c +2 -3
@@ -80,8 +80,7 @@static struct platform_device *lpe_audio_platdev_create (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm; -struct pci_dev *pdev =to_pci_dev (dev->dev); +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;
@@ -108,7 +107,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ; - pinfo.parent = dev->dev; + pinfo.parent = dev_priv->drm.dev; pinfo.name ="hdmi-lpe-audio" ; pinfo.id =-1 ; pinfo.res = rsc;
drivers/gpu/drm/i915/display/intel_lvds.c +5 -6
@@ -828,7 +828,6 @@ static void intel_lvds_add_properties(struct drm_connector *connector)*/ void intel_lvds_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_lvds_encoder *lvds_encoder;struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;
@@ -841,7 +840,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { -drm_WARN (dev, !dev_priv->display.vbt.int_lvds_support, +drm_WARN (&dev_priv->drm, !dev_priv->display.vbt.int_lvds_support,"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; }
@@ -890,10 +889,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) intel_encoder = &lvds_encoder->base; encoder = &intel_encoder->base; connector = &intel_connector->base; -drm_connector_init (dev, &intel_connector->base, &intel_lvds_connector_funcs, +drm_connector_init (&dev_priv->drm, &intel_connector->base, &intel_lvds_connector_funcs,DRM_MODE_CONNECTOR_LVDS ); -drm_encoder_init (dev, &intel_encoder->base, &intel_lvds_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_lvds_enc_funcs,DRM_MODE_ENCODER_LVDS ,"LVDS" ); intel_encoder->enable = intel_enable_lvds;
@@ -944,7 +943,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)* Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);if (vga_switcheroo_handler_flags () &VGA_SWITCHEROO_CAN_SWITCH_DDC ) edid =drm_get_edid_switcheroo (connector,intel_gmbus_get_adapter (dev_priv, pin));
@@ -982,7 +981,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_encoder_fixed_mode (intel_connector, intel_encoder); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* If we still don't have a mode after all that, give up. */ if (!intel_panel_preferred_fixed_mode (intel_connector))
drivers/gpu/drm/i915/display/intel_opregion.c +3 -4
@@ -463,7 +463,6 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct intel_connector *connector;struct drm_connector_list_iter conn_iter;struct opregion_asle *asle = dev_priv->display.opregion.asle; -struct drm_device *dev = &dev_priv->drm;drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp);
@@ -480,7 +479,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)if (bclp >255 )return ASLC_BACKLIGHT_FAILED ; -drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_modeset_lock (&dev_priv->drm.mode_config.connection_mutex,NULL );/* * Update backlight on all connectors that support backlight (usually
@@ -488,13 +487,13 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)*/ drm_dbg_kms (&dev_priv->drm,"updating opregion backlight %d/255\n" , bclp); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter)intel_backlight_set_acpi (connector->base.state, bclp,255 );drm_connector_list_iter_end (&conn_iter); asle->cblv =DIV_ROUND_UP (bclp *100 ,255 ) |ASLE_CBLV_VALID ; -drm_modeset_unlock (&dev->mode_config.connection_mutex); +drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex);return 0 ;
drivers/gpu/drm/i915/display/intel_pipe_crc.c +4 -5
@@ -75,7 +75,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,enum pipe pipe, enum intel_pipe_crc_source *source) { - struct drm_device *dev = &dev_priv->drm; struct intel_encoder *encoder;struct intel_crtc *crtc;struct intel_digital_port *dig_port;
@@ -83,8 +82,8 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_PIPE ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) { +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder) {if (!encoder->base.crtc)continue ;
@@ -111,7 +110,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_DP_D ;break ;default : -drm_WARN (dev,1 ,"nonexisting DP port %c\n" , +drm_WARN (&dev_priv->drm,1 ,"nonexisting DP port %c\n" ,port_name (dig_port->base.port));break ; }
@@ -120,7 +119,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,break ; } } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return ret; }
drivers/gpu/drm/i915/display/intel_psr.c +2 -3
@@ -2063,13 +2063,12 @@ static bool __psr_wait_for_idle_locked(struct intel_dp *intel_dp)static int intel_psr_fastset_force (struct drm_i915_private *dev_priv) {struct drm_connector_list_iter conn_iter; -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx ctx;struct drm_atomic_state *state;struct drm_connector *conn;int err =0 ; - state =drm_atomic_state_alloc (dev); + state =drm_atomic_state_alloc (&dev_priv->drm);if (!state)return -ENOMEM ;
@@ -2078,7 +2077,7 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) retry: -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (conn, &conn_iter) {struct drm_connector_state *conn_state;struct drm_crtc_state *crtc_state;
drivers/gpu/drm/i915/display/intel_tv.c +2 -3
@@ -1925,7 +1925,6 @@ static void intel_tv_add_properties(struct drm_connector *connector)void intel_tv_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct intel_tv *intel_tv;struct intel_encoder *intel_encoder;
@@ -1989,10 +1988,10 @@ intel_tv_init(struct drm_i915_private *dev_priv)*/ intel_connector->polled =DRM_CONNECTOR_POLL_CONNECT ; -drm_connector_init (dev, connector, &intel_tv_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_tv_connector_funcs,DRM_MODE_CONNECTOR_SVIDEO ); -drm_encoder_init (dev, &intel_encoder->base, &intel_tv_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_tv_enc_funcs,DRM_MODE_ENCODER_TVDAC ,"TV" ); intel_encoder->compute_config = intel_tv_compute_config;
drivers/gpu/drm/i915/display/vlv_dsi.c +4 -5
@@ -1845,7 +1845,6 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)void vlv_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *intel_encoder;struct drm_encoder *encoder;
@@ -1882,7 +1881,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base; -drm_encoder_init (dev, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI , +drm_encoder_init (&dev_priv->drm, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); intel_encoder->compute_config = intel_dsi_compute_config;
@@ -1965,7 +1964,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_dsi_vbt_gpio_init (intel_dsi,intel_dsi_get_hw_state (intel_encoder, &pipe)); -drm_connector_init (dev, connector, &intel_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &intel_dsi_connector_helper_funcs);
@@ -1974,9 +1973,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_connector_attach_encoder (intel_connector, intel_encoder); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_dbg_kms (&dev_priv->drm,"no fixed mode\n" );
drivers/gpu/drm/i915/i915_driver.c +7 -10
@@ -739,7 +739,6 @@ static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)*/ static void i915_driver_register (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_gt *gt;unsigned int i;
@@ -749,7 +748,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_vgpu_register (dev_priv);/* Reveal our presence to userspace */ -if (drm_dev_register (dev,0 )) { +if (drm_dev_register (&dev_priv->drm,0 )) {drm_err (&dev_priv->drm,"Failed to register driver for userspace access!\n" );return ;
@@ -1093,32 +1092,30 @@ static void i915_driver_postclose(struct drm_device *dev, struct drm_file *file)static void intel_suspend_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->suspend) encoder->suspend (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static void intel_shutdown_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->shutdown) encoder->shutdown (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }void i915_driver_shutdown (struct drm_i915_private *i915)
drivers/gpu/drm/i915/i915_irq.c +1 -2
@@ -4384,7 +4384,6 @@ void intel_hpd_irq_setup(struct drm_i915_private *i915)*/ void intel_irq_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;int i;INIT_WORK (&dev_priv->l3_parity.error_work, ivb_parity_work);
@@ -4402,7 +4401,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)intel_hpd_init_early (dev_priv); - dev->vblank_disable_immediate = true; + dev_priv->drm.vblank_disable_immediate = true;/* Most platforms treat the display irq block as an always-on * power domain. vlv/chv can disable it at runtime and need
Signature · 1 line
2.34.1
Re: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
Quoted 3 lines · Andrzej Hajda
drm_devicepointers are unwelcome.Signed-off-by Andrzej Hajda <[email protected]>
To me both versions were good...
Jani, Ville, could you please check on this patch?
Andi
Quoted 848 lines
--- drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../drm/i915/display/intel_display_debugfs.c | 51 ++++++++----------- .../drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++----- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_lvds.c | 11 ++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_tv.c | 5 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 17 +++---- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 104 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +4
-5@@ -1985,7 +1985,6 @@ static void icl_dsi_add_properties(struct intel_connector *connector)void icl_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *encoder;struct intel_connector *intel_connector;@@ -2010,7 +2009,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base;/* register DSI encoder with DRM subsystem */ -drm_encoder_init (dev, &encoder->base, &gen11_dsi_encoder_funcs, +drm_encoder_init (&dev_priv->drm, &encoder->base, &gen11_dsi_encoder_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;@@ -2034,7 +2033,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;/* register DSI connector with DRM subsystem */ -drm_connector_init (dev, connector, &gen11_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &gen11_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &gen11_dsi_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB;@@ -2045,9 +2044,9 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)intel_bios_init_panel (dev_priv, &intel_connector->panel,NULL ,NULL ); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" );drivers/gpu/drm/i915/display/intel_display.c +4
-5@@ -878,7 +878,6 @@ static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)void intel_display_prepare_reset (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx *ctx = &dev_priv->reset_ctx;struct drm_atomic_state *state;int ret;@@ -906,10 +905,10 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Need mode_config.mutex so that we don't * trample ongoing ->detect() and whatnot. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_modeset_acquire_init (ctx,0 );while (1 ) { - ret =drm_modeset_lock_all_ctx (dev, ctx); + ret =drm_modeset_lock_all_ctx (&dev_priv->drm, ctx);if (ret != -EDEADLK )break ;@@ -919,7 +918,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Disabling the crtcs gracefully seems nicer. Also the * g33 docs say we should at least disable all the planes. */ - state =drm_atomic_helper_duplicate_state (dev, ctx); + state =drm_atomic_helper_duplicate_state (&dev_priv->drm, ctx);if (IS_ERR (state)) { ret =PTR_ERR (state); drm_err(&dev_priv->drm, "Duplicating state failed with %i\n",@@ -927,7 +926,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)return ; } - ret =drm_atomic_helper_disable_all (dev, ctx); + ret =drm_atomic_helper_disable_all (&dev_priv->drm, ctx);if (ret) {drm_err (&dev_priv->drm,"Suspending crtc's failed with %i\n" , ret);drivers/gpu/drm/i915/display/intel_display_debugfs.c +20
-31@@ -128,7 +128,6 @@ static int i915_vbt(struct seq_file *m, void *unused)static int i915_gem_framebuffer_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_framebuffer *fbdev_fb =NULL ;struct drm_framebuffer *drm_fb;@@ -147,8 +146,8 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) }#endif -mutex_lock (&dev->mode_config.fb_lock); -drm_for_each_fb (drm_fb, dev) { +mutex_lock (&dev_priv->drm.mode_config.fb_lock); +drm_for_each_fb (drm_fb, &dev_priv->drm) {struct intel_framebuffer *fb =to_intel_framebuffer (drm_fb);if (fb == fbdev_fb)continue ;@@ -163,7 +162,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)i915_debugfs_describe_obj (m,intel_fb_obj (&fb->base));seq_putc (m,'\n' ); } -mutex_unlock (&dev->mode_config.fb_lock); +mutex_unlock (&dev_priv->drm.mode_config.fb_lock);return 0 ; }@@ -898,7 +897,6 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;@@ -906,22 +904,22 @@ static int i915_display_info(struct seq_file *m, void *unused) wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"CRTC info\n" );seq_printf (m,"---------\n" ); -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)intel_crtc_info (m, crtc);seq_printf (m,"\n" );seq_printf (m,"Connector info\n" );seq_printf (m,"--------------\n" ); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter)intel_connector_info (m, connector);drm_connector_list_iter_end (&conn_iter); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);@@ -931,10 +929,9 @@ static int i915_display_info(struct seq_file *m, void *unused)static int i915_shared_dplls_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;int i; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm); seq_printf(m, "PLL refclks: non-SSC: %d kHz, SSC: %d kHz\n", dev_priv->display.dpll.ref_clks.nssc,@@ -979,7 +976,7 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)seq_printf (m," mg_pll_tdc_coldst_bias: 0x%08x\n" , pll->state.hw_state.mg_pll_tdc_coldst_bias); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -987,14 +984,13 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)static int i915_ddb_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct skl_ddb_entry *entry;struct intel_crtc *crtc;if (DISPLAY_VER (dev_priv) <9 )return -ENODEV ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" );@@ -1018,7 +1014,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused) entry->end, skl_ddb_entry_size(entry)); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -1062,13 +1058,12 @@ static int i915_lpsp_status(struct seq_file *m, void *unused)static int i915_dp_mst_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *intel_encoder;struct intel_digital_port *dig_port;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)continue ;@@ -1155,12 +1150,11 @@ static ssize_t i915_displayport_test_active_write(struct file *file,static int i915_displayport_test_active_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1205,12 +1199,11 @@ static const struct file_operations i915_displayport_test_active_fops = {static int i915_displayport_test_data_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1259,12 +1252,11 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_data);static int i915_displayport_test_type_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1291,7 +1283,6 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_type);static void wm_latency_show (struct seq_file *m,const u16 wm[8 ]) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;int level;int num_levels;@@ -1304,7 +1295,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8])else num_levels =ilk_wm_max_level (dev_priv) +1 ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) {unsigned int latency = wm[level];@@ -1325,7 +1316,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8]) level, wm[level], latency / 10, latency % 10); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static int pri_wm_latency_show (struct seq_file *m,void *data)@@ -1408,7 +1399,6 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf, {struct seq_file *m = file->private_data;struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;u16 new[8 ] = {0 };int num_levels;int level;@@ -1438,12 +1428,12 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf,if (ret != num_levels)return -EINVAL ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) wm[level] = new[level]; -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return len; }@@ -1528,7 +1518,6 @@ i915_fifo_underrun_reset_write(struct file *filp, {struct drm_i915_private *dev_priv = filp->private_data;struct intel_crtc *crtc; -struct drm_device *dev = &dev_priv->drm;int ret;bool reset;@@ -1539,7 +1528,7 @@ i915_fifo_underrun_reset_write(struct file *filp,if (!reset)return cnt; -for_each_intel_crtc (dev, crtc) { +for_each_intel_crtc (&dev_priv->drm, crtc) {struct drm_crtc_commit *commit;struct intel_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_display_power.c +1
-2@@ -1148,10 +1148,9 @@ static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)static void assert_can_disable_lcpll (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc; -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)I915_STATE_WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));drivers/gpu/drm/i915/display/intel_dp.c +3
-4@@ -5229,7 +5229,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct intel_connector *intel_connector) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector = &intel_connector->base;struct drm_display_mode *fixed_mode;struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;@@ -5246,7 +5245,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,* with an already powered-on LVDS power sequencer. */ if (intel_get_lvds_encoder (dev_priv)) { -drm_WARN_ON (dev, +drm_WARN_ON (&dev_priv->drm, !(HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)));drm_info (&dev_priv->drm,"LVDS was detected, not registering eDP\n" );@@ -5267,7 +5266,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, goto out_vdd_off; } -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); edid =drm_get_edid (connector, &intel_dp->aux.ddc);if (!edid) {/* Fallback to EDID from ACPI OpRegion, if any */ @@ -5305,7 +5304,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { drm_info(&dev_priv->drm,drivers/gpu/drm/i915/display/intel_hotplug.c +12
-16@@ -178,14 +178,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,static void intel_hpd_irq_storm_switch_to_polling (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool hpd_disabled = false;lockdep_assert_held (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -211,7 +210,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)/* Enable polling and queue hotplug re-enabling. */ if (hpd_disabled) { -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm);mod_delayed_work (system_wq, &dev_priv->display.hotplug.reenable_work,msecs_to_jiffies (HPD_STORM_REENABLE_DELAY )); }@@ -222,7 +221,6 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)struct drm_i915_private *dev_priv =container_of (work,typeof (*dev_priv), display.hotplug.reenable_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;intel_wakeref_t wakeref;@@ -232,7 +230,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) { pin =intel_connector_hpd_pin (connector); if (pin == HPD_NONE ||@@ -370,14 +368,13 @@ static void i915_hotplug_work_func(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.hotplug_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;u32 changed =0 , retry =0 ;u32 hpd_event_bits;u32 hpd_retry_bits; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);@@ -392,7 +389,7 @@ static void i915_hotplug_work_func(struct work_struct *work)spin_unlock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;u32 hpd_bit;@@ -429,10 +426,10 @@ static void i915_hotplug_work_func(struct work_struct *work) } }drm_connector_list_iter_end (&conn_iter); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (changed) -drm_kms_helper_hotplug_event (dev); +drm_kms_helper_hotplug_event (&dev_priv->drm);/* Remove shared HPD pins that have changed */ retry &= ~changed;@@ -615,16 +612,15 @@ static void i915_hpd_poll_init_work(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.poll_init_work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool enabled; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); enabled =READ_ONCE (dev_priv->display.hotplug.poll_enabled); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -641,16 +637,16 @@ static void i915_hpd_poll_init_work(struct work_struct *work)drm_connector_list_iter_end (&conn_iter);if (enabled) -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* * We might have missed any hotplugs that happened while we were * in the middle of disabling polling */ if (!enabled) -drm_helper_hpd_irq_event (dev); +drm_helper_hpd_irq_event (&dev_priv->drm); }/** drivers/gpu/drm/i915/display/intel_lpe_audio.c +2
-3@@ -80,8 +80,7 @@static struct platform_device *lpe_audio_platdev_create (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm; -struct pci_dev *pdev =to_pci_dev (dev->dev); +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -108,7 +107,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ; - pinfo.parent = dev->dev; + pinfo.parent = dev_priv->drm.dev; pinfo.name ="hdmi-lpe-audio" ; pinfo.id =-1 ; pinfo.res = rsc;drivers/gpu/drm/i915/display/intel_lvds.c +5
-6@@ -828,7 +828,6 @@ static void intel_lvds_add_properties(struct drm_connector *connector)*/ void intel_lvds_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_lvds_encoder *lvds_encoder;struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;@@ -841,7 +840,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { -drm_WARN (dev, !dev_priv->display.vbt.int_lvds_support, +drm_WARN (&dev_priv->drm, !dev_priv->display.vbt.int_lvds_support,"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; }@@ -890,10 +889,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) intel_encoder = &lvds_encoder->base; encoder = &intel_encoder->base; connector = &intel_connector->base; -drm_connector_init (dev, &intel_connector->base, &intel_lvds_connector_funcs, +drm_connector_init (&dev_priv->drm, &intel_connector->base, &intel_lvds_connector_funcs,DRM_MODE_CONNECTOR_LVDS ); -drm_encoder_init (dev, &intel_encoder->base, &intel_lvds_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_lvds_enc_funcs,DRM_MODE_ENCODER_LVDS ,"LVDS" ); intel_encoder->enable = intel_enable_lvds;@@ -944,7 +943,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)* Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);if (vga_switcheroo_handler_flags () &VGA_SWITCHEROO_CAN_SWITCH_DDC ) edid =drm_get_edid_switcheroo (connector,intel_gmbus_get_adapter (dev_priv, pin));@@ -982,7 +981,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_encoder_fixed_mode (intel_connector, intel_encoder); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* If we still don't have a mode after all that, give up. */ if (!intel_panel_preferred_fixed_mode (intel_connector))drivers/gpu/drm/i915/display/intel_opregion.c +3
-4@@ -463,7 +463,6 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct intel_connector *connector;struct drm_connector_list_iter conn_iter;struct opregion_asle *asle = dev_priv->display.opregion.asle; -struct drm_device *dev = &dev_priv->drm;drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp);@@ -480,7 +479,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)if (bclp >255 )return ASLC_BACKLIGHT_FAILED ; -drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_modeset_lock (&dev_priv->drm.mode_config.connection_mutex,NULL );/* * Update backlight on all connectors that support backlight (usually @@ -488,13 +487,13 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)*/ drm_dbg_kms (&dev_priv->drm,"updating opregion backlight %d/255\n" , bclp); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter)intel_backlight_set_acpi (connector->base.state, bclp,255 );drm_connector_list_iter_end (&conn_iter); asle->cblv =DIV_ROUND_UP (bclp *100 ,255 ) |ASLE_CBLV_VALID ; -drm_modeset_unlock (&dev->mode_config.connection_mutex); +drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex);return 0 ;drivers/gpu/drm/i915/display/intel_pipe_crc.c +4
-5@@ -75,7 +75,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,enum pipe pipe, enum intel_pipe_crc_source *source) { - struct drm_device *dev = &dev_priv->drm; struct intel_encoder *encoder;struct intel_crtc *crtc;struct intel_digital_port *dig_port;@@ -83,8 +82,8 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_PIPE ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) { +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder) {if (!encoder->base.crtc)continue ;@@ -111,7 +110,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_DP_D ;break ;default : -drm_WARN (dev,1 ,"nonexisting DP port %c\n" , +drm_WARN (&dev_priv->drm,1 ,"nonexisting DP port %c\n" ,port_name (dig_port->base.port));break ; }@@ -120,7 +119,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,break ; } } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return ret; }drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -2063,13 +2063,12 @@ static bool __psr_wait_for_idle_locked(struct intel_dp *intel_dp)static int intel_psr_fastset_force (struct drm_i915_private *dev_priv) {struct drm_connector_list_iter conn_iter; -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx ctx;struct drm_atomic_state *state;struct drm_connector *conn;int err =0 ; - state =drm_atomic_state_alloc (dev); + state =drm_atomic_state_alloc (&dev_priv->drm);if (!state)return -ENOMEM ;@@ -2078,7 +2077,7 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) retry: -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (conn, &conn_iter) {struct drm_connector_state *conn_state;struct drm_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_tv.c +2
-3@@ -1925,7 +1925,6 @@ static void intel_tv_add_properties(struct drm_connector *connector)void intel_tv_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct intel_tv *intel_tv;struct intel_encoder *intel_encoder;@@ -1989,10 +1988,10 @@ intel_tv_init(struct drm_i915_private *dev_priv)*/ intel_connector->polled =DRM_CONNECTOR_POLL_CONNECT ; -drm_connector_init (dev, connector, &intel_tv_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_tv_connector_funcs,DRM_MODE_CONNECTOR_SVIDEO ); -drm_encoder_init (dev, &intel_encoder->base, &intel_tv_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_tv_enc_funcs,DRM_MODE_ENCODER_TVDAC ,"TV" ); intel_encoder->compute_config = intel_tv_compute_config;drivers/gpu/drm/i915/display/vlv_dsi.c +4
-5@@ -1845,7 +1845,6 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)void vlv_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *intel_encoder;struct drm_encoder *encoder;@@ -1882,7 +1881,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base; -drm_encoder_init (dev, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI , +drm_encoder_init (&dev_priv->drm, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); intel_encoder->compute_config = intel_dsi_compute_config;@@ -1965,7 +1964,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_dsi_vbt_gpio_init (intel_dsi,intel_dsi_get_hw_state (intel_encoder, &pipe)); -drm_connector_init (dev, connector, &intel_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &intel_dsi_connector_helper_funcs);@@ -1974,9 +1973,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_connector_attach_encoder (intel_connector, intel_encoder); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_dbg_kms (&dev_priv->drm,"no fixed mode\n" );drivers/gpu/drm/i915/i915_driver.c +7
-10@@ -739,7 +739,6 @@ static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)*/ static void i915_driver_register (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_gt *gt;unsigned int i;@@ -749,7 +748,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_vgpu_register (dev_priv);/* Reveal our presence to userspace */ -if (drm_dev_register (dev,0 )) { +if (drm_dev_register (&dev_priv->drm,0 )) {drm_err (&dev_priv->drm,"Failed to register driver for userspace access!\n" );return ;@@ -1093,32 +1092,30 @@ static void i915_driver_postclose(struct drm_device *dev, struct drm_file *file)static void intel_suspend_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->suspend) encoder->suspend (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static void intel_shutdown_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->shutdown) encoder->shutdown (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }void i915_driver_shutdown (struct drm_i915_private *i915)drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -4384,7 +4384,6 @@ void intel_hpd_irq_setup(struct drm_i915_private *i915)*/ void intel_irq_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;int i;INIT_WORK (&dev_priv->l3_parity.error_work, ivb_parity_work);@@ -4402,7 +4401,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)intel_hpd_init_early (dev_priv); - dev->vblank_disable_immediate = true; + dev_priv->drm.vblank_disable_immediate = true;/* Most platforms treat the display irq block as an always-on * power domain. vlv/chv can disable it at runtime and need Signature · 1 line
2.34.1
Jani Nikula
Acked-byRe: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
Quoted 10 lines · Andi Shyti
Quoted 3 lines · Andrzej Hajda
drm_devicepointers are unwelcome.Signed-off-by Andrzej Hajda <[email protected]>Acked-by Andi Shyti <[email protected]>To me both versions were good...
Jani, Ville, could you please check on this patch?
Quoted 851 lines
Andi
Quoted 848 lines
--- drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../drm/i915/display/intel_display_debugfs.c | 51 ++++++++----------- .../drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++----- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_lvds.c | 11 ++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_tv.c | 5 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 17 +++---- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 104 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +4
-5@@ -1985,7 +1985,6 @@ static void icl_dsi_add_properties(struct intel_connector *connector)void icl_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *encoder;struct intel_connector *intel_connector;@@ -2010,7 +2009,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base;/* register DSI encoder with DRM subsystem */ -drm_encoder_init (dev, &encoder->base, &gen11_dsi_encoder_funcs, +drm_encoder_init (&dev_priv->drm, &encoder->base, &gen11_dsi_encoder_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;@@ -2034,7 +2033,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;/* register DSI connector with DRM subsystem */ -drm_connector_init (dev, connector, &gen11_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &gen11_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &gen11_dsi_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB;@@ -2045,9 +2044,9 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)intel_bios_init_panel (dev_priv, &intel_connector->panel,NULL ,NULL ); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" );drivers/gpu/drm/i915/display/intel_display.c +4
-5@@ -878,7 +878,6 @@ static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)void intel_display_prepare_reset (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx *ctx = &dev_priv->reset_ctx;struct drm_atomic_state *state;int ret;@@ -906,10 +905,10 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Need mode_config.mutex so that we don't * trample ongoing ->detect() and whatnot. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_modeset_acquire_init (ctx,0 );while (1 ) { - ret =drm_modeset_lock_all_ctx (dev, ctx); + ret =drm_modeset_lock_all_ctx (&dev_priv->drm, ctx);if (ret != -EDEADLK )break ;@@ -919,7 +918,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Disabling the crtcs gracefully seems nicer. Also the * g33 docs say we should at least disable all the planes. */ - state =drm_atomic_helper_duplicate_state (dev, ctx); + state =drm_atomic_helper_duplicate_state (&dev_priv->drm, ctx);if (IS_ERR (state)) { ret =PTR_ERR (state); drm_err(&dev_priv->drm, "Duplicating state failed with %i\n",@@ -927,7 +926,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)return ; } - ret =drm_atomic_helper_disable_all (dev, ctx); + ret =drm_atomic_helper_disable_all (&dev_priv->drm, ctx);if (ret) {drm_err (&dev_priv->drm,"Suspending crtc's failed with %i\n" , ret);drivers/gpu/drm/i915/display/intel_display_debugfs.c +20
-31@@ -128,7 +128,6 @@ static int i915_vbt(struct seq_file *m, void *unused)static int i915_gem_framebuffer_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_framebuffer *fbdev_fb =NULL ;struct drm_framebuffer *drm_fb;@@ -147,8 +146,8 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) }#endif -mutex_lock (&dev->mode_config.fb_lock); -drm_for_each_fb (drm_fb, dev) { +mutex_lock (&dev_priv->drm.mode_config.fb_lock); +drm_for_each_fb (drm_fb, &dev_priv->drm) {struct intel_framebuffer *fb =to_intel_framebuffer (drm_fb);if (fb == fbdev_fb)continue ;@@ -163,7 +162,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)i915_debugfs_describe_obj (m,intel_fb_obj (&fb->base));seq_putc (m,'\n' ); } -mutex_unlock (&dev->mode_config.fb_lock); +mutex_unlock (&dev_priv->drm.mode_config.fb_lock);return 0 ; }@@ -898,7 +897,6 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;@@ -906,22 +904,22 @@ static int i915_display_info(struct seq_file *m, void *unused) wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"CRTC info\n" );seq_printf (m,"---------\n" ); -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)intel_crtc_info (m, crtc);seq_printf (m,"\n" );seq_printf (m,"Connector info\n" );seq_printf (m,"--------------\n" ); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter)intel_connector_info (m, connector);drm_connector_list_iter_end (&conn_iter); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);@@ -931,10 +929,9 @@ static int i915_display_info(struct seq_file *m, void *unused)static int i915_shared_dplls_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;int i; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm); seq_printf(m, "PLL refclks: non-SSC: %d kHz, SSC: %d kHz\n", dev_priv->display.dpll.ref_clks.nssc,@@ -979,7 +976,7 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)seq_printf (m," mg_pll_tdc_coldst_bias: 0x%08x\n" , pll->state.hw_state.mg_pll_tdc_coldst_bias); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -987,14 +984,13 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)static int i915_ddb_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct skl_ddb_entry *entry;struct intel_crtc *crtc;if (DISPLAY_VER (dev_priv) <9 )return -ENODEV ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" );@@ -1018,7 +1014,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused) entry->end, skl_ddb_entry_size(entry)); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -1062,13 +1058,12 @@ static int i915_lpsp_status(struct seq_file *m, void *unused)static int i915_dp_mst_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *intel_encoder;struct intel_digital_port *dig_port;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)continue ;@@ -1155,12 +1150,11 @@ static ssize_t i915_displayport_test_active_write(struct file *file,static int i915_displayport_test_active_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1205,12 +1199,11 @@ static const struct file_operations i915_displayport_test_active_fops = {static int i915_displayport_test_data_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1259,12 +1252,11 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_data);static int i915_displayport_test_type_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1291,7 +1283,6 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_type);static void wm_latency_show (struct seq_file *m,const u16 wm[8 ]) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;int level;int num_levels;@@ -1304,7 +1295,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8])else num_levels =ilk_wm_max_level (dev_priv) +1 ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) {unsigned int latency = wm[level];@@ -1325,7 +1316,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8]) level, wm[level], latency / 10, latency % 10); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static int pri_wm_latency_show (struct seq_file *m,void *data)@@ -1408,7 +1399,6 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf, {struct seq_file *m = file->private_data;struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;u16 new[8 ] = {0 };int num_levels;int level;@@ -1438,12 +1428,12 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf,if (ret != num_levels)return -EINVAL ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) wm[level] = new[level]; -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return len; }@@ -1528,7 +1518,6 @@ i915_fifo_underrun_reset_write(struct file *filp, {struct drm_i915_private *dev_priv = filp->private_data;struct intel_crtc *crtc; -struct drm_device *dev = &dev_priv->drm;int ret;bool reset;@@ -1539,7 +1528,7 @@ i915_fifo_underrun_reset_write(struct file *filp,if (!reset)return cnt; -for_each_intel_crtc (dev, crtc) { +for_each_intel_crtc (&dev_priv->drm, crtc) {struct drm_crtc_commit *commit;struct intel_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_display_power.c +1
-2@@ -1148,10 +1148,9 @@ static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)static void assert_can_disable_lcpll (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc; -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)I915_STATE_WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));drivers/gpu/drm/i915/display/intel_dp.c +3
-4@@ -5229,7 +5229,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct intel_connector *intel_connector) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector = &intel_connector->base;struct drm_display_mode *fixed_mode;struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;@@ -5246,7 +5245,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,* with an already powered-on LVDS power sequencer. */ if (intel_get_lvds_encoder (dev_priv)) { -drm_WARN_ON (dev, +drm_WARN_ON (&dev_priv->drm, !(HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)));drm_info (&dev_priv->drm,"LVDS was detected, not registering eDP\n" );@@ -5267,7 +5266,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, goto out_vdd_off; } -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); edid =drm_get_edid (connector, &intel_dp->aux.ddc);if (!edid) {/* Fallback to EDID from ACPI OpRegion, if any */ @@ -5305,7 +5304,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { drm_info(&dev_priv->drm,drivers/gpu/drm/i915/display/intel_hotplug.c +12
-16@@ -178,14 +178,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,static void intel_hpd_irq_storm_switch_to_polling (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool hpd_disabled = false;lockdep_assert_held (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -211,7 +210,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)/* Enable polling and queue hotplug re-enabling. */ if (hpd_disabled) { -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm);mod_delayed_work (system_wq, &dev_priv->display.hotplug.reenable_work,msecs_to_jiffies (HPD_STORM_REENABLE_DELAY )); }@@ -222,7 +221,6 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)struct drm_i915_private *dev_priv =container_of (work,typeof (*dev_priv), display.hotplug.reenable_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;intel_wakeref_t wakeref;@@ -232,7 +230,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) { pin =intel_connector_hpd_pin (connector); if (pin == HPD_NONE ||@@ -370,14 +368,13 @@ static void i915_hotplug_work_func(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.hotplug_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;u32 changed =0 , retry =0 ;u32 hpd_event_bits;u32 hpd_retry_bits; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);@@ -392,7 +389,7 @@ static void i915_hotplug_work_func(struct work_struct *work)spin_unlock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;u32 hpd_bit;@@ -429,10 +426,10 @@ static void i915_hotplug_work_func(struct work_struct *work) } }drm_connector_list_iter_end (&conn_iter); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (changed) -drm_kms_helper_hotplug_event (dev); +drm_kms_helper_hotplug_event (&dev_priv->drm);/* Remove shared HPD pins that have changed */ retry &= ~changed;@@ -615,16 +612,15 @@ static void i915_hpd_poll_init_work(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.poll_init_work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool enabled; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); enabled =READ_ONCE (dev_priv->display.hotplug.poll_enabled); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -641,16 +637,16 @@ static void i915_hpd_poll_init_work(struct work_struct *work)drm_connector_list_iter_end (&conn_iter);if (enabled) -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* * We might have missed any hotplugs that happened while we were * in the middle of disabling polling */ if (!enabled) -drm_helper_hpd_irq_event (dev); +drm_helper_hpd_irq_event (&dev_priv->drm); }/** drivers/gpu/drm/i915/display/intel_lpe_audio.c +2
-3@@ -80,8 +80,7 @@static struct platform_device *lpe_audio_platdev_create (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm; -struct pci_dev *pdev =to_pci_dev (dev->dev); +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -108,7 +107,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ; - pinfo.parent = dev->dev; + pinfo.parent = dev_priv->drm.dev; pinfo.name ="hdmi-lpe-audio" ; pinfo.id =-1 ; pinfo.res = rsc;drivers/gpu/drm/i915/display/intel_lvds.c +5
-6@@ -828,7 +828,6 @@ static void intel_lvds_add_properties(struct drm_connector *connector)*/ void intel_lvds_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_lvds_encoder *lvds_encoder;struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;@@ -841,7 +840,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { -drm_WARN (dev, !dev_priv->display.vbt.int_lvds_support, +drm_WARN (&dev_priv->drm, !dev_priv->display.vbt.int_lvds_support,"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; }@@ -890,10 +889,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) intel_encoder = &lvds_encoder->base; encoder = &intel_encoder->base; connector = &intel_connector->base; -drm_connector_init (dev, &intel_connector->base, &intel_lvds_connector_funcs, +drm_connector_init (&dev_priv->drm, &intel_connector->base, &intel_lvds_connector_funcs,DRM_MODE_CONNECTOR_LVDS ); -drm_encoder_init (dev, &intel_encoder->base, &intel_lvds_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_lvds_enc_funcs,DRM_MODE_ENCODER_LVDS ,"LVDS" ); intel_encoder->enable = intel_enable_lvds;@@ -944,7 +943,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)* Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);if (vga_switcheroo_handler_flags () &VGA_SWITCHEROO_CAN_SWITCH_DDC ) edid =drm_get_edid_switcheroo (connector,intel_gmbus_get_adapter (dev_priv, pin));@@ -982,7 +981,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_encoder_fixed_mode (intel_connector, intel_encoder); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* If we still don't have a mode after all that, give up. */ if (!intel_panel_preferred_fixed_mode (intel_connector))drivers/gpu/drm/i915/display/intel_opregion.c +3
-4@@ -463,7 +463,6 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct intel_connector *connector;struct drm_connector_list_iter conn_iter;struct opregion_asle *asle = dev_priv->display.opregion.asle; -struct drm_device *dev = &dev_priv->drm;drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp);@@ -480,7 +479,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)if (bclp >255 )return ASLC_BACKLIGHT_FAILED ; -drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_modeset_lock (&dev_priv->drm.mode_config.connection_mutex,NULL );/* * Update backlight on all connectors that support backlight (usually @@ -488,13 +487,13 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)*/ drm_dbg_kms (&dev_priv->drm,"updating opregion backlight %d/255\n" , bclp); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter)intel_backlight_set_acpi (connector->base.state, bclp,255 );drm_connector_list_iter_end (&conn_iter); asle->cblv =DIV_ROUND_UP (bclp *100 ,255 ) |ASLE_CBLV_VALID ; -drm_modeset_unlock (&dev->mode_config.connection_mutex); +drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex);return 0 ;drivers/gpu/drm/i915/display/intel_pipe_crc.c +4
-5@@ -75,7 +75,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,enum pipe pipe, enum intel_pipe_crc_source *source) { - struct drm_device *dev = &dev_priv->drm; struct intel_encoder *encoder;struct intel_crtc *crtc;struct intel_digital_port *dig_port;@@ -83,8 +82,8 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_PIPE ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) { +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder) {if (!encoder->base.crtc)continue ;@@ -111,7 +110,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_DP_D ;break ;default : -drm_WARN (dev,1 ,"nonexisting DP port %c\n" , +drm_WARN (&dev_priv->drm,1 ,"nonexisting DP port %c\n" ,port_name (dig_port->base.port));break ; }@@ -120,7 +119,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,break ; } } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return ret; }drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -2063,13 +2063,12 @@ static bool __psr_wait_for_idle_locked(struct intel_dp *intel_dp)static int intel_psr_fastset_force (struct drm_i915_private *dev_priv) {struct drm_connector_list_iter conn_iter; -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx ctx;struct drm_atomic_state *state;struct drm_connector *conn;int err =0 ; - state =drm_atomic_state_alloc (dev); + state =drm_atomic_state_alloc (&dev_priv->drm);if (!state)return -ENOMEM ;@@ -2078,7 +2077,7 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) retry: -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (conn, &conn_iter) {struct drm_connector_state *conn_state;struct drm_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_tv.c +2
-3@@ -1925,7 +1925,6 @@ static void intel_tv_add_properties(struct drm_connector *connector)void intel_tv_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct intel_tv *intel_tv;struct intel_encoder *intel_encoder;@@ -1989,10 +1988,10 @@ intel_tv_init(struct drm_i915_private *dev_priv)*/ intel_connector->polled =DRM_CONNECTOR_POLL_CONNECT ; -drm_connector_init (dev, connector, &intel_tv_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_tv_connector_funcs,DRM_MODE_CONNECTOR_SVIDEO ); -drm_encoder_init (dev, &intel_encoder->base, &intel_tv_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_tv_enc_funcs,DRM_MODE_ENCODER_TVDAC ,"TV" ); intel_encoder->compute_config = intel_tv_compute_config;drivers/gpu/drm/i915/display/vlv_dsi.c +4
-5@@ -1845,7 +1845,6 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)void vlv_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *intel_encoder;struct drm_encoder *encoder;@@ -1882,7 +1881,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base; -drm_encoder_init (dev, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI , +drm_encoder_init (&dev_priv->drm, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); intel_encoder->compute_config = intel_dsi_compute_config;@@ -1965,7 +1964,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_dsi_vbt_gpio_init (intel_dsi,intel_dsi_get_hw_state (intel_encoder, &pipe)); -drm_connector_init (dev, connector, &intel_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &intel_dsi_connector_helper_funcs);@@ -1974,9 +1973,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_connector_attach_encoder (intel_connector, intel_encoder); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_dbg_kms (&dev_priv->drm,"no fixed mode\n" );drivers/gpu/drm/i915/i915_driver.c +7
-10@@ -739,7 +739,6 @@ static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)*/ static void i915_driver_register (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_gt *gt;unsigned int i;@@ -749,7 +748,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_vgpu_register (dev_priv);/* Reveal our presence to userspace */ -if (drm_dev_register (dev,0 )) { +if (drm_dev_register (&dev_priv->drm,0 )) {drm_err (&dev_priv->drm,"Failed to register driver for userspace access!\n" );return ;@@ -1093,32 +1092,30 @@ static void i915_driver_postclose(struct drm_device *dev, struct drm_file *file)static void intel_suspend_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->suspend) encoder->suspend (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static void intel_shutdown_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->shutdown) encoder->shutdown (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }void i915_driver_shutdown (struct drm_i915_private *i915)drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -4384,7 +4384,6 @@ void intel_hpd_irq_setup(struct drm_i915_private *i915)*/ void intel_irq_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;int i;INIT_WORK (&dev_priv->l3_parity.error_work, ivb_parity_work);@@ -4402,7 +4401,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)intel_hpd_init_early (dev_priv); - dev->vblank_disable_immediate = true; + dev_priv->drm.vblank_disable_immediate = true;/* Most platforms treat the display irq block as an always-on * power domain. vlv/chv can disable it at runtime and need Signature · 1 line
2.34.1
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Andi Shyti
Reviewed-byRe: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
In reply to Andi ShytiQuoted 6 lines · Andi Shyti
Quoted 3 lines · Andrzej Hajda
drm_devicepointers are unwelcome.Signed-off-by Andrzej Hajda <[email protected]>Acked-by Andi Shyti <[email protected]>
Only this first patch is strictly related to display, I'm taking the series in intel-gt-next. Anyone against?
Andi
Quoted 854 lines
To me both versions were good...
Jani, Ville, could you please check on this patch?
Andi
Quoted 848 lines
--- drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../drm/i915/display/intel_display_debugfs.c | 51 ++++++++----------- .../drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++----- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_lvds.c | 11 ++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_tv.c | 5 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 17 +++---- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 104 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +4
-5@@ -1985,7 +1985,6 @@ static void icl_dsi_add_properties(struct intel_connector *connector)void icl_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *encoder;struct intel_connector *intel_connector;@@ -2010,7 +2009,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base;/* register DSI encoder with DRM subsystem */ -drm_encoder_init (dev, &encoder->base, &gen11_dsi_encoder_funcs, +drm_encoder_init (&dev_priv->drm, &encoder->base, &gen11_dsi_encoder_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;@@ -2034,7 +2033,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;/* register DSI connector with DRM subsystem */ -drm_connector_init (dev, connector, &gen11_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &gen11_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &gen11_dsi_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB;@@ -2045,9 +2044,9 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)intel_bios_init_panel (dev_priv, &intel_connector->panel,NULL ,NULL ); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" );drivers/gpu/drm/i915/display/intel_display.c +4
-5@@ -878,7 +878,6 @@ static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)void intel_display_prepare_reset (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx *ctx = &dev_priv->reset_ctx;struct drm_atomic_state *state;int ret;@@ -906,10 +905,10 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Need mode_config.mutex so that we don't * trample ongoing ->detect() and whatnot. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_modeset_acquire_init (ctx,0 );while (1 ) { - ret =drm_modeset_lock_all_ctx (dev, ctx); + ret =drm_modeset_lock_all_ctx (&dev_priv->drm, ctx);if (ret != -EDEADLK )break ;@@ -919,7 +918,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Disabling the crtcs gracefully seems nicer. Also the * g33 docs say we should at least disable all the planes. */ - state =drm_atomic_helper_duplicate_state (dev, ctx); + state =drm_atomic_helper_duplicate_state (&dev_priv->drm, ctx);if (IS_ERR (state)) { ret =PTR_ERR (state); drm_err(&dev_priv->drm, "Duplicating state failed with %i\n",@@ -927,7 +926,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)return ; } - ret =drm_atomic_helper_disable_all (dev, ctx); + ret =drm_atomic_helper_disable_all (&dev_priv->drm, ctx);if (ret) {drm_err (&dev_priv->drm,"Suspending crtc's failed with %i\n" , ret);drivers/gpu/drm/i915/display/intel_display_debugfs.c +20
-31@@ -128,7 +128,6 @@ static int i915_vbt(struct seq_file *m, void *unused)static int i915_gem_framebuffer_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_framebuffer *fbdev_fb =NULL ;struct drm_framebuffer *drm_fb;@@ -147,8 +146,8 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) }#endif -mutex_lock (&dev->mode_config.fb_lock); -drm_for_each_fb (drm_fb, dev) { +mutex_lock (&dev_priv->drm.mode_config.fb_lock); +drm_for_each_fb (drm_fb, &dev_priv->drm) {struct intel_framebuffer *fb =to_intel_framebuffer (drm_fb);if (fb == fbdev_fb)continue ;@@ -163,7 +162,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)i915_debugfs_describe_obj (m,intel_fb_obj (&fb->base));seq_putc (m,'\n' ); } -mutex_unlock (&dev->mode_config.fb_lock); +mutex_unlock (&dev_priv->drm.mode_config.fb_lock);return 0 ; }@@ -898,7 +897,6 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;@@ -906,22 +904,22 @@ static int i915_display_info(struct seq_file *m, void *unused) wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"CRTC info\n" );seq_printf (m,"---------\n" ); -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)intel_crtc_info (m, crtc);seq_printf (m,"\n" );seq_printf (m,"Connector info\n" );seq_printf (m,"--------------\n" ); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter)intel_connector_info (m, connector);drm_connector_list_iter_end (&conn_iter); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);@@ -931,10 +929,9 @@ static int i915_display_info(struct seq_file *m, void *unused)static int i915_shared_dplls_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;int i; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm); seq_printf(m, "PLL refclks: non-SSC: %d kHz, SSC: %d kHz\n", dev_priv->display.dpll.ref_clks.nssc,@@ -979,7 +976,7 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)seq_printf (m," mg_pll_tdc_coldst_bias: 0x%08x\n" , pll->state.hw_state.mg_pll_tdc_coldst_bias); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -987,14 +984,13 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)static int i915_ddb_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct skl_ddb_entry *entry;struct intel_crtc *crtc;if (DISPLAY_VER (dev_priv) <9 )return -ENODEV ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" );@@ -1018,7 +1014,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused) entry->end, skl_ddb_entry_size(entry)); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -1062,13 +1058,12 @@ static int i915_lpsp_status(struct seq_file *m, void *unused)static int i915_dp_mst_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *intel_encoder;struct intel_digital_port *dig_port;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)continue ;@@ -1155,12 +1150,11 @@ static ssize_t i915_displayport_test_active_write(struct file *file,static int i915_displayport_test_active_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1205,12 +1199,11 @@ static const struct file_operations i915_displayport_test_active_fops = {static int i915_displayport_test_data_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1259,12 +1252,11 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_data);static int i915_displayport_test_type_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1291,7 +1283,6 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_type);static void wm_latency_show (struct seq_file *m,const u16 wm[8 ]) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;int level;int num_levels;@@ -1304,7 +1295,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8])else num_levels =ilk_wm_max_level (dev_priv) +1 ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) {unsigned int latency = wm[level];@@ -1325,7 +1316,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8]) level, wm[level], latency / 10, latency % 10); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static int pri_wm_latency_show (struct seq_file *m,void *data)@@ -1408,7 +1399,6 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf, {struct seq_file *m = file->private_data;struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;u16 new[8 ] = {0 };int num_levels;int level;@@ -1438,12 +1428,12 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf,if (ret != num_levels)return -EINVAL ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) wm[level] = new[level]; -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return len; }@@ -1528,7 +1518,6 @@ i915_fifo_underrun_reset_write(struct file *filp, {struct drm_i915_private *dev_priv = filp->private_data;struct intel_crtc *crtc; -struct drm_device *dev = &dev_priv->drm;int ret;bool reset;@@ -1539,7 +1528,7 @@ i915_fifo_underrun_reset_write(struct file *filp,if (!reset)return cnt; -for_each_intel_crtc (dev, crtc) { +for_each_intel_crtc (&dev_priv->drm, crtc) {struct drm_crtc_commit *commit;struct intel_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_display_power.c +1
-2@@ -1148,10 +1148,9 @@ static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)static void assert_can_disable_lcpll (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc; -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)I915_STATE_WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));drivers/gpu/drm/i915/display/intel_dp.c +3
-4@@ -5229,7 +5229,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct intel_connector *intel_connector) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector = &intel_connector->base;struct drm_display_mode *fixed_mode;struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;@@ -5246,7 +5245,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,* with an already powered-on LVDS power sequencer. */ if (intel_get_lvds_encoder (dev_priv)) { -drm_WARN_ON (dev, +drm_WARN_ON (&dev_priv->drm, !(HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)));drm_info (&dev_priv->drm,"LVDS was detected, not registering eDP\n" );@@ -5267,7 +5266,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, goto out_vdd_off; } -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); edid =drm_get_edid (connector, &intel_dp->aux.ddc);if (!edid) {/* Fallback to EDID from ACPI OpRegion, if any */ @@ -5305,7 +5304,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { drm_info(&dev_priv->drm,drivers/gpu/drm/i915/display/intel_hotplug.c +12
-16@@ -178,14 +178,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,static void intel_hpd_irq_storm_switch_to_polling (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool hpd_disabled = false;lockdep_assert_held (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -211,7 +210,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)/* Enable polling and queue hotplug re-enabling. */ if (hpd_disabled) { -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm);mod_delayed_work (system_wq, &dev_priv->display.hotplug.reenable_work,msecs_to_jiffies (HPD_STORM_REENABLE_DELAY )); }@@ -222,7 +221,6 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)struct drm_i915_private *dev_priv =container_of (work,typeof (*dev_priv), display.hotplug.reenable_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;intel_wakeref_t wakeref;@@ -232,7 +230,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) { pin =intel_connector_hpd_pin (connector); if (pin == HPD_NONE ||@@ -370,14 +368,13 @@ static void i915_hotplug_work_func(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.hotplug_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;u32 changed =0 , retry =0 ;u32 hpd_event_bits;u32 hpd_retry_bits; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);@@ -392,7 +389,7 @@ static void i915_hotplug_work_func(struct work_struct *work)spin_unlock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;u32 hpd_bit;@@ -429,10 +426,10 @@ static void i915_hotplug_work_func(struct work_struct *work) } }drm_connector_list_iter_end (&conn_iter); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (changed) -drm_kms_helper_hotplug_event (dev); +drm_kms_helper_hotplug_event (&dev_priv->drm);/* Remove shared HPD pins that have changed */ retry &= ~changed;@@ -615,16 +612,15 @@ static void i915_hpd_poll_init_work(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.poll_init_work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool enabled; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); enabled =READ_ONCE (dev_priv->display.hotplug.poll_enabled); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -641,16 +637,16 @@ static void i915_hpd_poll_init_work(struct work_struct *work)drm_connector_list_iter_end (&conn_iter);if (enabled) -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* * We might have missed any hotplugs that happened while we were * in the middle of disabling polling */ if (!enabled) -drm_helper_hpd_irq_event (dev); +drm_helper_hpd_irq_event (&dev_priv->drm); }/** drivers/gpu/drm/i915/display/intel_lpe_audio.c +2
-3@@ -80,8 +80,7 @@static struct platform_device *lpe_audio_platdev_create (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm; -struct pci_dev *pdev =to_pci_dev (dev->dev); +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -108,7 +107,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ; - pinfo.parent = dev->dev; + pinfo.parent = dev_priv->drm.dev; pinfo.name ="hdmi-lpe-audio" ; pinfo.id =-1 ; pinfo.res = rsc;drivers/gpu/drm/i915/display/intel_lvds.c +5
-6@@ -828,7 +828,6 @@ static void intel_lvds_add_properties(struct drm_connector *connector)*/ void intel_lvds_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_lvds_encoder *lvds_encoder;struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;@@ -841,7 +840,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { -drm_WARN (dev, !dev_priv->display.vbt.int_lvds_support, +drm_WARN (&dev_priv->drm, !dev_priv->display.vbt.int_lvds_support,"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; }@@ -890,10 +889,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) intel_encoder = &lvds_encoder->base; encoder = &intel_encoder->base; connector = &intel_connector->base; -drm_connector_init (dev, &intel_connector->base, &intel_lvds_connector_funcs, +drm_connector_init (&dev_priv->drm, &intel_connector->base, &intel_lvds_connector_funcs,DRM_MODE_CONNECTOR_LVDS ); -drm_encoder_init (dev, &intel_encoder->base, &intel_lvds_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_lvds_enc_funcs,DRM_MODE_ENCODER_LVDS ,"LVDS" ); intel_encoder->enable = intel_enable_lvds;@@ -944,7 +943,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)* Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);if (vga_switcheroo_handler_flags () &VGA_SWITCHEROO_CAN_SWITCH_DDC ) edid =drm_get_edid_switcheroo (connector,intel_gmbus_get_adapter (dev_priv, pin));@@ -982,7 +981,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_encoder_fixed_mode (intel_connector, intel_encoder); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* If we still don't have a mode after all that, give up. */ if (!intel_panel_preferred_fixed_mode (intel_connector))drivers/gpu/drm/i915/display/intel_opregion.c +3
-4@@ -463,7 +463,6 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct intel_connector *connector;struct drm_connector_list_iter conn_iter;struct opregion_asle *asle = dev_priv->display.opregion.asle; -struct drm_device *dev = &dev_priv->drm;drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp);@@ -480,7 +479,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)if (bclp >255 )return ASLC_BACKLIGHT_FAILED ; -drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_modeset_lock (&dev_priv->drm.mode_config.connection_mutex,NULL );/* * Update backlight on all connectors that support backlight (usually @@ -488,13 +487,13 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)*/ drm_dbg_kms (&dev_priv->drm,"updating opregion backlight %d/255\n" , bclp); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter)intel_backlight_set_acpi (connector->base.state, bclp,255 );drm_connector_list_iter_end (&conn_iter); asle->cblv =DIV_ROUND_UP (bclp *100 ,255 ) |ASLE_CBLV_VALID ; -drm_modeset_unlock (&dev->mode_config.connection_mutex); +drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex);return 0 ;drivers/gpu/drm/i915/display/intel_pipe_crc.c +4
-5@@ -75,7 +75,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,enum pipe pipe, enum intel_pipe_crc_source *source) { - struct drm_device *dev = &dev_priv->drm; struct intel_encoder *encoder;struct intel_crtc *crtc;struct intel_digital_port *dig_port;@@ -83,8 +82,8 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_PIPE ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) { +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder) {if (!encoder->base.crtc)continue ;@@ -111,7 +110,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_DP_D ;break ;default : -drm_WARN (dev,1 ,"nonexisting DP port %c\n" , +drm_WARN (&dev_priv->drm,1 ,"nonexisting DP port %c\n" ,port_name (dig_port->base.port));break ; }@@ -120,7 +119,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,break ; } } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return ret; }drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -2063,13 +2063,12 @@ static bool __psr_wait_for_idle_locked(struct intel_dp *intel_dp)static int intel_psr_fastset_force (struct drm_i915_private *dev_priv) {struct drm_connector_list_iter conn_iter; -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx ctx;struct drm_atomic_state *state;struct drm_connector *conn;int err =0 ; - state =drm_atomic_state_alloc (dev); + state =drm_atomic_state_alloc (&dev_priv->drm);if (!state)return -ENOMEM ;@@ -2078,7 +2077,7 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) retry: -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (conn, &conn_iter) {struct drm_connector_state *conn_state;struct drm_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_tv.c +2
-3@@ -1925,7 +1925,6 @@ static void intel_tv_add_properties(struct drm_connector *connector)void intel_tv_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct intel_tv *intel_tv;struct intel_encoder *intel_encoder;@@ -1989,10 +1988,10 @@ intel_tv_init(struct drm_i915_private *dev_priv)*/ intel_connector->polled =DRM_CONNECTOR_POLL_CONNECT ; -drm_connector_init (dev, connector, &intel_tv_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_tv_connector_funcs,DRM_MODE_CONNECTOR_SVIDEO ); -drm_encoder_init (dev, &intel_encoder->base, &intel_tv_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_tv_enc_funcs,DRM_MODE_ENCODER_TVDAC ,"TV" ); intel_encoder->compute_config = intel_tv_compute_config;drivers/gpu/drm/i915/display/vlv_dsi.c +4
-5@@ -1845,7 +1845,6 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)void vlv_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *intel_encoder;struct drm_encoder *encoder;@@ -1882,7 +1881,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base; -drm_encoder_init (dev, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI , +drm_encoder_init (&dev_priv->drm, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); intel_encoder->compute_config = intel_dsi_compute_config;@@ -1965,7 +1964,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_dsi_vbt_gpio_init (intel_dsi,intel_dsi_get_hw_state (intel_encoder, &pipe)); -drm_connector_init (dev, connector, &intel_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &intel_dsi_connector_helper_funcs);@@ -1974,9 +1973,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_connector_attach_encoder (intel_connector, intel_encoder); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_dbg_kms (&dev_priv->drm,"no fixed mode\n" );drivers/gpu/drm/i915/i915_driver.c +7
-10@@ -739,7 +739,6 @@ static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)*/ static void i915_driver_register (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_gt *gt;unsigned int i;@@ -749,7 +748,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_vgpu_register (dev_priv);/* Reveal our presence to userspace */ -if (drm_dev_register (dev,0 )) { +if (drm_dev_register (&dev_priv->drm,0 )) {drm_err (&dev_priv->drm,"Failed to register driver for userspace access!\n" );return ;@@ -1093,32 +1092,30 @@ static void i915_driver_postclose(struct drm_device *dev, struct drm_file *file)static void intel_suspend_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->suspend) encoder->suspend (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static void intel_shutdown_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->shutdown) encoder->shutdown (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }void i915_driver_shutdown (struct drm_i915_private *i915)drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -4384,7 +4384,6 @@ void intel_hpd_irq_setup(struct drm_i915_private *i915)*/ void intel_irq_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;int i;INIT_WORK (&dev_priv->l3_parity.error_work, ivb_parity_work);@@ -4402,7 +4401,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)intel_hpd_init_early (dev_priv); - dev->vblank_disable_immediate = true; + dev_priv->drm.vblank_disable_immediate = true;/* Most platforms treat the display irq block as an always-on * power domain. vlv/chv can disable it at runtime and need Signature · 1 line
2.34.1
Re: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
Quoted 4 lines · Andi Shyti
Quoted 3 lines · Andi Shyti
Quoted 2 lines · Andrzej Hajda
drm_devicepointers are unwelcome.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Andrzej Hajda <[email protected]>Acked-by Andi Shyti <[email protected]>Reviewed-by Andi Shyti <[email protected]>Only this first patch is strictly related to display, I'm taking the series in intel-gt-next. Anyone against?
Absolutely against. That logic is backwards.
drm-intel-gt-next is for stuff that's strictly about gt/gem. Everything else, especially stuff touching common code, needs to go through drm-intel-next.
There's nothing here that's gt/gem specific.
BR,
Jani.
Quoted 857 lines
Andi
Quoted 854 lines
To me both versions were good...
Jani, Ville, could you please check on this patch?
Andi
Quoted 848 lines
--- drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../drm/i915/display/intel_display_debugfs.c | 51 ++++++++----------- .../drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++----- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_lvds.c | 11 ++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_tv.c | 5 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 17 +++---- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 104 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +4
-5@@ -1985,7 +1985,6 @@ static void icl_dsi_add_properties(struct intel_connector *connector)void icl_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *encoder;struct intel_connector *intel_connector;@@ -2010,7 +2009,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base;/* register DSI encoder with DRM subsystem */ -drm_encoder_init (dev, &encoder->base, &gen11_dsi_encoder_funcs, +drm_encoder_init (&dev_priv->drm, &encoder->base, &gen11_dsi_encoder_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;@@ -2034,7 +2033,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;/* register DSI connector with DRM subsystem */ -drm_connector_init (dev, connector, &gen11_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &gen11_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &gen11_dsi_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB;@@ -2045,9 +2044,9 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)intel_bios_init_panel (dev_priv, &intel_connector->panel,NULL ,NULL ); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" );drivers/gpu/drm/i915/display/intel_display.c +4
-5@@ -878,7 +878,6 @@ static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)void intel_display_prepare_reset (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx *ctx = &dev_priv->reset_ctx;struct drm_atomic_state *state;int ret;@@ -906,10 +905,10 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Need mode_config.mutex so that we don't * trample ongoing ->detect() and whatnot. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_modeset_acquire_init (ctx,0 );while (1 ) { - ret =drm_modeset_lock_all_ctx (dev, ctx); + ret =drm_modeset_lock_all_ctx (&dev_priv->drm, ctx);if (ret != -EDEADLK )break ;@@ -919,7 +918,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Disabling the crtcs gracefully seems nicer. Also the * g33 docs say we should at least disable all the planes. */ - state =drm_atomic_helper_duplicate_state (dev, ctx); + state =drm_atomic_helper_duplicate_state (&dev_priv->drm, ctx);if (IS_ERR (state)) { ret =PTR_ERR (state); drm_err(&dev_priv->drm, "Duplicating state failed with %i\n",@@ -927,7 +926,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)return ; } - ret =drm_atomic_helper_disable_all (dev, ctx); + ret =drm_atomic_helper_disable_all (&dev_priv->drm, ctx);if (ret) {drm_err (&dev_priv->drm,"Suspending crtc's failed with %i\n" , ret);drivers/gpu/drm/i915/display/intel_display_debugfs.c +20
-31@@ -128,7 +128,6 @@ static int i915_vbt(struct seq_file *m, void *unused)static int i915_gem_framebuffer_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_framebuffer *fbdev_fb =NULL ;struct drm_framebuffer *drm_fb;@@ -147,8 +146,8 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) }#endif -mutex_lock (&dev->mode_config.fb_lock); -drm_for_each_fb (drm_fb, dev) { +mutex_lock (&dev_priv->drm.mode_config.fb_lock); +drm_for_each_fb (drm_fb, &dev_priv->drm) {struct intel_framebuffer *fb =to_intel_framebuffer (drm_fb);if (fb == fbdev_fb)continue ;@@ -163,7 +162,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)i915_debugfs_describe_obj (m,intel_fb_obj (&fb->base));seq_putc (m,'\n' ); } -mutex_unlock (&dev->mode_config.fb_lock); +mutex_unlock (&dev_priv->drm.mode_config.fb_lock);return 0 ; }@@ -898,7 +897,6 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;@@ -906,22 +904,22 @@ static int i915_display_info(struct seq_file *m, void *unused) wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"CRTC info\n" );seq_printf (m,"---------\n" ); -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)intel_crtc_info (m, crtc);seq_printf (m,"\n" );seq_printf (m,"Connector info\n" );seq_printf (m,"--------------\n" ); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter)intel_connector_info (m, connector);drm_connector_list_iter_end (&conn_iter); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);@@ -931,10 +929,9 @@ static int i915_display_info(struct seq_file *m, void *unused)static int i915_shared_dplls_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;int i; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm); seq_printf(m, "PLL refclks: non-SSC: %d kHz, SSC: %d kHz\n", dev_priv->display.dpll.ref_clks.nssc,@@ -979,7 +976,7 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)seq_printf (m," mg_pll_tdc_coldst_bias: 0x%08x\n" , pll->state.hw_state.mg_pll_tdc_coldst_bias); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -987,14 +984,13 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)static int i915_ddb_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct skl_ddb_entry *entry;struct intel_crtc *crtc;if (DISPLAY_VER (dev_priv) <9 )return -ENODEV ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" );@@ -1018,7 +1014,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused) entry->end, skl_ddb_entry_size(entry)); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -1062,13 +1058,12 @@ static int i915_lpsp_status(struct seq_file *m, void *unused)static int i915_dp_mst_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *intel_encoder;struct intel_digital_port *dig_port;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)continue ;@@ -1155,12 +1150,11 @@ static ssize_t i915_displayport_test_active_write(struct file *file,static int i915_displayport_test_active_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1205,12 +1199,11 @@ static const struct file_operations i915_displayport_test_active_fops = {static int i915_displayport_test_data_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1259,12 +1252,11 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_data);static int i915_displayport_test_type_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1291,7 +1283,6 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_type);static void wm_latency_show (struct seq_file *m,const u16 wm[8 ]) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;int level;int num_levels;@@ -1304,7 +1295,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8])else num_levels =ilk_wm_max_level (dev_priv) +1 ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) {unsigned int latency = wm[level];@@ -1325,7 +1316,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8]) level, wm[level], latency / 10, latency % 10); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static int pri_wm_latency_show (struct seq_file *m,void *data)@@ -1408,7 +1399,6 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf, {struct seq_file *m = file->private_data;struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;u16 new[8 ] = {0 };int num_levels;int level;@@ -1438,12 +1428,12 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf,if (ret != num_levels)return -EINVAL ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) wm[level] = new[level]; -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return len; }@@ -1528,7 +1518,6 @@ i915_fifo_underrun_reset_write(struct file *filp, {struct drm_i915_private *dev_priv = filp->private_data;struct intel_crtc *crtc; -struct drm_device *dev = &dev_priv->drm;int ret;bool reset;@@ -1539,7 +1528,7 @@ i915_fifo_underrun_reset_write(struct file *filp,if (!reset)return cnt; -for_each_intel_crtc (dev, crtc) { +for_each_intel_crtc (&dev_priv->drm, crtc) {struct drm_crtc_commit *commit;struct intel_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_display_power.c +1
-2@@ -1148,10 +1148,9 @@ static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)static void assert_can_disable_lcpll (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc; -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)I915_STATE_WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));drivers/gpu/drm/i915/display/intel_dp.c +3
-4@@ -5229,7 +5229,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct intel_connector *intel_connector) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector = &intel_connector->base;struct drm_display_mode *fixed_mode;struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;@@ -5246,7 +5245,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,* with an already powered-on LVDS power sequencer. */ if (intel_get_lvds_encoder (dev_priv)) { -drm_WARN_ON (dev, +drm_WARN_ON (&dev_priv->drm, !(HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)));drm_info (&dev_priv->drm,"LVDS was detected, not registering eDP\n" );@@ -5267,7 +5266,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, goto out_vdd_off; } -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); edid =drm_get_edid (connector, &intel_dp->aux.ddc);if (!edid) {/* Fallback to EDID from ACPI OpRegion, if any */ @@ -5305,7 +5304,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { drm_info(&dev_priv->drm,drivers/gpu/drm/i915/display/intel_hotplug.c +12
-16@@ -178,14 +178,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,static void intel_hpd_irq_storm_switch_to_polling (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool hpd_disabled = false;lockdep_assert_held (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -211,7 +210,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)/* Enable polling and queue hotplug re-enabling. */ if (hpd_disabled) { -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm);mod_delayed_work (system_wq, &dev_priv->display.hotplug.reenable_work,msecs_to_jiffies (HPD_STORM_REENABLE_DELAY )); }@@ -222,7 +221,6 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)struct drm_i915_private *dev_priv =container_of (work,typeof (*dev_priv), display.hotplug.reenable_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;intel_wakeref_t wakeref;@@ -232,7 +230,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) { pin =intel_connector_hpd_pin (connector); if (pin == HPD_NONE ||@@ -370,14 +368,13 @@ static void i915_hotplug_work_func(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.hotplug_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;u32 changed =0 , retry =0 ;u32 hpd_event_bits;u32 hpd_retry_bits; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);@@ -392,7 +389,7 @@ static void i915_hotplug_work_func(struct work_struct *work)spin_unlock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;u32 hpd_bit;@@ -429,10 +426,10 @@ static void i915_hotplug_work_func(struct work_struct *work) } }drm_connector_list_iter_end (&conn_iter); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (changed) -drm_kms_helper_hotplug_event (dev); +drm_kms_helper_hotplug_event (&dev_priv->drm);/* Remove shared HPD pins that have changed */ retry &= ~changed;@@ -615,16 +612,15 @@ static void i915_hpd_poll_init_work(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.poll_init_work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool enabled; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); enabled =READ_ONCE (dev_priv->display.hotplug.poll_enabled); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -641,16 +637,16 @@ static void i915_hpd_poll_init_work(struct work_struct *work)drm_connector_list_iter_end (&conn_iter);if (enabled) -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* * We might have missed any hotplugs that happened while we were * in the middle of disabling polling */ if (!enabled) -drm_helper_hpd_irq_event (dev); +drm_helper_hpd_irq_event (&dev_priv->drm); }/** drivers/gpu/drm/i915/display/intel_lpe_audio.c +2
-3@@ -80,8 +80,7 @@static struct platform_device *lpe_audio_platdev_create (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm; -struct pci_dev *pdev =to_pci_dev (dev->dev); +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -108,7 +107,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ; - pinfo.parent = dev->dev; + pinfo.parent = dev_priv->drm.dev; pinfo.name ="hdmi-lpe-audio" ; pinfo.id =-1 ; pinfo.res = rsc;drivers/gpu/drm/i915/display/intel_lvds.c +5
-6@@ -828,7 +828,6 @@ static void intel_lvds_add_properties(struct drm_connector *connector)*/ void intel_lvds_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_lvds_encoder *lvds_encoder;struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;@@ -841,7 +840,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { -drm_WARN (dev, !dev_priv->display.vbt.int_lvds_support, +drm_WARN (&dev_priv->drm, !dev_priv->display.vbt.int_lvds_support,"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; }@@ -890,10 +889,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) intel_encoder = &lvds_encoder->base; encoder = &intel_encoder->base; connector = &intel_connector->base; -drm_connector_init (dev, &intel_connector->base, &intel_lvds_connector_funcs, +drm_connector_init (&dev_priv->drm, &intel_connector->base, &intel_lvds_connector_funcs,DRM_MODE_CONNECTOR_LVDS ); -drm_encoder_init (dev, &intel_encoder->base, &intel_lvds_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_lvds_enc_funcs,DRM_MODE_ENCODER_LVDS ,"LVDS" ); intel_encoder->enable = intel_enable_lvds;@@ -944,7 +943,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)* Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);if (vga_switcheroo_handler_flags () &VGA_SWITCHEROO_CAN_SWITCH_DDC ) edid =drm_get_edid_switcheroo (connector,intel_gmbus_get_adapter (dev_priv, pin));@@ -982,7 +981,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_encoder_fixed_mode (intel_connector, intel_encoder); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* If we still don't have a mode after all that, give up. */ if (!intel_panel_preferred_fixed_mode (intel_connector))drivers/gpu/drm/i915/display/intel_opregion.c +3
-4@@ -463,7 +463,6 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct intel_connector *connector;struct drm_connector_list_iter conn_iter;struct opregion_asle *asle = dev_priv->display.opregion.asle; -struct drm_device *dev = &dev_priv->drm;drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp);@@ -480,7 +479,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)if (bclp >255 )return ASLC_BACKLIGHT_FAILED ; -drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_modeset_lock (&dev_priv->drm.mode_config.connection_mutex,NULL );/* * Update backlight on all connectors that support backlight (usually @@ -488,13 +487,13 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)*/ drm_dbg_kms (&dev_priv->drm,"updating opregion backlight %d/255\n" , bclp); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter)intel_backlight_set_acpi (connector->base.state, bclp,255 );drm_connector_list_iter_end (&conn_iter); asle->cblv =DIV_ROUND_UP (bclp *100 ,255 ) |ASLE_CBLV_VALID ; -drm_modeset_unlock (&dev->mode_config.connection_mutex); +drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex);return 0 ;drivers/gpu/drm/i915/display/intel_pipe_crc.c +4
-5@@ -75,7 +75,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,enum pipe pipe, enum intel_pipe_crc_source *source) { - struct drm_device *dev = &dev_priv->drm; struct intel_encoder *encoder;struct intel_crtc *crtc;struct intel_digital_port *dig_port;@@ -83,8 +82,8 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_PIPE ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) { +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder) {if (!encoder->base.crtc)continue ;@@ -111,7 +110,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_DP_D ;break ;default : -drm_WARN (dev,1 ,"nonexisting DP port %c\n" , +drm_WARN (&dev_priv->drm,1 ,"nonexisting DP port %c\n" ,port_name (dig_port->base.port));break ; }@@ -120,7 +119,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,break ; } } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return ret; }drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -2063,13 +2063,12 @@ static bool __psr_wait_for_idle_locked(struct intel_dp *intel_dp)static int intel_psr_fastset_force (struct drm_i915_private *dev_priv) {struct drm_connector_list_iter conn_iter; -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx ctx;struct drm_atomic_state *state;struct drm_connector *conn;int err =0 ; - state =drm_atomic_state_alloc (dev); + state =drm_atomic_state_alloc (&dev_priv->drm);if (!state)return -ENOMEM ;@@ -2078,7 +2077,7 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) retry: -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (conn, &conn_iter) {struct drm_connector_state *conn_state;struct drm_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_tv.c +2
-3@@ -1925,7 +1925,6 @@ static void intel_tv_add_properties(struct drm_connector *connector)void intel_tv_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct intel_tv *intel_tv;struct intel_encoder *intel_encoder;@@ -1989,10 +1988,10 @@ intel_tv_init(struct drm_i915_private *dev_priv)*/ intel_connector->polled =DRM_CONNECTOR_POLL_CONNECT ; -drm_connector_init (dev, connector, &intel_tv_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_tv_connector_funcs,DRM_MODE_CONNECTOR_SVIDEO ); -drm_encoder_init (dev, &intel_encoder->base, &intel_tv_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_tv_enc_funcs,DRM_MODE_ENCODER_TVDAC ,"TV" ); intel_encoder->compute_config = intel_tv_compute_config;drivers/gpu/drm/i915/display/vlv_dsi.c +4
-5@@ -1845,7 +1845,6 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)void vlv_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *intel_encoder;struct drm_encoder *encoder;@@ -1882,7 +1881,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base; -drm_encoder_init (dev, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI , +drm_encoder_init (&dev_priv->drm, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); intel_encoder->compute_config = intel_dsi_compute_config;@@ -1965,7 +1964,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_dsi_vbt_gpio_init (intel_dsi,intel_dsi_get_hw_state (intel_encoder, &pipe)); -drm_connector_init (dev, connector, &intel_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &intel_dsi_connector_helper_funcs);@@ -1974,9 +1973,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_connector_attach_encoder (intel_connector, intel_encoder); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_dbg_kms (&dev_priv->drm,"no fixed mode\n" );drivers/gpu/drm/i915/i915_driver.c +7
-10@@ -739,7 +739,6 @@ static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)*/ static void i915_driver_register (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_gt *gt;unsigned int i;@@ -749,7 +748,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_vgpu_register (dev_priv);/* Reveal our presence to userspace */ -if (drm_dev_register (dev,0 )) { +if (drm_dev_register (&dev_priv->drm,0 )) {drm_err (&dev_priv->drm,"Failed to register driver for userspace access!\n" );return ;@@ -1093,32 +1092,30 @@ static void i915_driver_postclose(struct drm_device *dev, struct drm_file *file)static void intel_suspend_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->suspend) encoder->suspend (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static void intel_shutdown_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->shutdown) encoder->shutdown (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }void i915_driver_shutdown (struct drm_i915_private *i915)drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -4384,7 +4384,6 @@ void intel_hpd_irq_setup(struct drm_i915_private *i915)*/ void intel_irq_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;int i;INIT_WORK (&dev_priv->l3_parity.error_work, ivb_parity_work);@@ -4402,7 +4401,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)intel_hpd_init_early (dev_priv); - dev->vblank_disable_immediate = true; + dev_priv->drm.vblank_disable_immediate = true;/* Most platforms treat the display irq block as an always-on * power domain. vlv/chv can disable it at runtime and need Signature · 1 line
2.34.1
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
Quoted 14 lines · Jani Nikula
Quoted 4 lines · Andi Shyti
Quoted 3 lines · Andi Shyti
Quoted 2 lines · Andrzej Hajda
drm_devicepointers are unwelcome.Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Andrzej Hajda <[email protected]>Acked-by Andi Shyti <[email protected]>Reviewed-by Andi Shyti <[email protected]>Only this first patch is strictly related to display, I'm taking the series in intel-gt-next. Anyone against?
Quoted 7 lines
Absolutely against. That logic is backwards.
drm-intel-gt-next is for stuff that's strictly about gt/gem. Everything else, especially stuff touching common code, needs to go through drm-intel-next.
There's nothing here that's gt/gem specific.
To elaborate on this, we can do drm-intel-next -> drm-intel-gt-next cross-merges. Not vice versa.
If you merge code to drm-intel-gt-next that other work in drm-intel-next depends on, we'll need a drm-intel-gt-next pull request to drm-next and a backmerge from drm-next to drm-intel-next. And that creates a dependency outside of drm-intel.git, as well as potentially several weeks' delay when drm-next is not open for pull requests.
BR,
Jani.
Quoted 862 lines
BR,
Jani.Quoted 857 lines
Andi
Quoted 854 lines
To me both versions were good...
Jani, Ville, could you please check on this patch?
Andi
Quoted 848 lines
--- drivers/gpu/drm/i915/display/icl_dsi.c | 9 ++-- drivers/gpu/drm/i915/display/intel_display.c | 9 ++-- .../drm/i915/display/intel_display_debugfs.c | 51 ++++++++----------- .../drm/i915/display/intel_display_power.c | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++- drivers/gpu/drm/i915/display/intel_hotplug.c | 28 +++++----- .../gpu/drm/i915/display/intel_lpe_audio.c | 5 +- drivers/gpu/drm/i915/display/intel_lvds.c | 11 ++-- drivers/gpu/drm/i915/display/intel_opregion.c | 7 ++- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 9 ++-- drivers/gpu/drm/i915/display/intel_psr.c | 5 +- drivers/gpu/drm/i915/display/intel_tv.c | 5 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 9 ++-- drivers/gpu/drm/i915/i915_driver.c | 17 +++---- drivers/gpu/drm/i915/i915_irq.c | 3 +- 15 files changed, 74 insertions(+), 104 deletions(-)drivers/gpu/drm/i915/display/icl_dsi.c +4
-5@@ -1985,7 +1985,6 @@ static void icl_dsi_add_properties(struct intel_connector *connector)void icl_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *encoder;struct intel_connector *intel_connector;@@ -2010,7 +2009,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base;/* register DSI encoder with DRM subsystem */ -drm_encoder_init (dev, &encoder->base, &gen11_dsi_encoder_funcs, +drm_encoder_init (&dev_priv->drm, &encoder->base, &gen11_dsi_encoder_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); encoder->pre_pll_enable = gen11_dsi_pre_pll_enable;@@ -2034,7 +2033,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv) encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;/* register DSI connector with DRM subsystem */ -drm_connector_init (dev, connector, &gen11_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &gen11_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &gen11_dsi_connector_helper_funcs); connector->display_info.subpixel_order = SubPixelHorizontalRGB;@@ -2045,9 +2044,9 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)intel_bios_init_panel (dev_priv, &intel_connector->panel,NULL ,NULL ); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_err (&dev_priv->drm,"DSI fixed mode info missing\n" );drivers/gpu/drm/i915/display/intel_display.c +4
-5@@ -878,7 +878,6 @@ static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)void intel_display_prepare_reset (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx *ctx = &dev_priv->reset_ctx;struct drm_atomic_state *state;int ret;@@ -906,10 +905,10 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Need mode_config.mutex so that we don't * trample ongoing ->detect() and whatnot. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_modeset_acquire_init (ctx,0 );while (1 ) { - ret =drm_modeset_lock_all_ctx (dev, ctx); + ret =drm_modeset_lock_all_ctx (&dev_priv->drm, ctx);if (ret != -EDEADLK )break ;@@ -919,7 +918,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)* Disabling the crtcs gracefully seems nicer. Also the * g33 docs say we should at least disable all the planes. */ - state =drm_atomic_helper_duplicate_state (dev, ctx); + state =drm_atomic_helper_duplicate_state (&dev_priv->drm, ctx);if (IS_ERR (state)) { ret =PTR_ERR (state); drm_err(&dev_priv->drm, "Duplicating state failed with %i\n",@@ -927,7 +926,7 @@ void intel_display_prepare_reset(struct drm_i915_private *dev_priv)return ; } - ret =drm_atomic_helper_disable_all (dev, ctx); + ret =drm_atomic_helper_disable_all (&dev_priv->drm, ctx);if (ret) {drm_err (&dev_priv->drm,"Suspending crtc's failed with %i\n" , ret);drivers/gpu/drm/i915/display/intel_display_debugfs.c +20
-31@@ -128,7 +128,6 @@ static int i915_vbt(struct seq_file *m, void *unused)static int i915_gem_framebuffer_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_framebuffer *fbdev_fb =NULL ;struct drm_framebuffer *drm_fb;@@ -147,8 +146,8 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) }#endif -mutex_lock (&dev->mode_config.fb_lock); -drm_for_each_fb (drm_fb, dev) { +mutex_lock (&dev_priv->drm.mode_config.fb_lock); +drm_for_each_fb (drm_fb, &dev_priv->drm) {struct intel_framebuffer *fb =to_intel_framebuffer (drm_fb);if (fb == fbdev_fb)continue ;@@ -163,7 +162,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)i915_debugfs_describe_obj (m,intel_fb_obj (&fb->base));seq_putc (m,'\n' ); } -mutex_unlock (&dev->mode_config.fb_lock); +mutex_unlock (&dev_priv->drm.mode_config.fb_lock);return 0 ; }@@ -898,7 +897,6 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)static int i915_display_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;@@ -906,22 +904,22 @@ static int i915_display_info(struct seq_file *m, void *unused) wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"CRTC info\n" );seq_printf (m,"---------\n" ); -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)intel_crtc_info (m, crtc);seq_printf (m,"\n" );seq_printf (m,"Connector info\n" );seq_printf (m,"--------------\n" ); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter)intel_connector_info (m, connector);drm_connector_list_iter_end (&conn_iter); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);@@ -931,10 +929,9 @@ static int i915_display_info(struct seq_file *m, void *unused)static int i915_shared_dplls_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;int i; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm); seq_printf(m, "PLL refclks: non-SSC: %d kHz, SSC: %d kHz\n", dev_priv->display.dpll.ref_clks.nssc,@@ -979,7 +976,7 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)seq_printf (m," mg_pll_tdc_coldst_bias: 0x%08x\n" , pll->state.hw_state.mg_pll_tdc_coldst_bias); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -987,14 +984,13 @@ static int i915_shared_dplls_info(struct seq_file *m, void *unused)static int i915_ddb_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct skl_ddb_entry *entry;struct intel_crtc *crtc;if (DISPLAY_VER (dev_priv) <9 )return -ENODEV ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);seq_printf (m,"%-15s%8s%8s%8s\n" ,"" ,"Start" ,"End" ,"Size" );@@ -1018,7 +1014,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused) entry->end, skl_ddb_entry_size(entry)); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return 0 ; }@@ -1062,13 +1058,12 @@ static int i915_lpsp_status(struct seq_file *m, void *unused)static int i915_dp_mst_info (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *intel_encoder;struct intel_digital_port *dig_port;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)continue ;@@ -1155,12 +1150,11 @@ static ssize_t i915_displayport_test_active_write(struct file *file,static int i915_displayport_test_active_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1205,12 +1199,11 @@ static const struct file_operations i915_displayport_test_active_fops = {static int i915_displayport_test_data_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1259,12 +1252,11 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_data);static int i915_displayport_test_type_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct drm_connector_list_iter conn_iter;struct intel_dp *intel_dp; -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) {struct intel_encoder *encoder;@@ -1291,7 +1283,6 @@ DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_type);static void wm_latency_show (struct seq_file *m,const u16 wm[8 ]) {struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;int level;int num_levels;@@ -1304,7 +1295,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8])else num_levels =ilk_wm_max_level (dev_priv) +1 ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) {unsigned int latency = wm[level];@@ -1325,7 +1316,7 @@ static void wm_latency_show(struct seq_file *m, const u16 wm[8]) level, wm[level], latency / 10, latency % 10); } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static int pri_wm_latency_show (struct seq_file *m,void *data)@@ -1408,7 +1399,6 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf, {struct seq_file *m = file->private_data;struct drm_i915_private *dev_priv = m->private; -struct drm_device *dev = &dev_priv->drm;u16 new[8 ] = {0 };int num_levels;int level;@@ -1438,12 +1428,12 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf,if (ret != num_levels)return -EINVAL ; -drm_modeset_lock_all (dev); +drm_modeset_lock_all (&dev_priv->drm);for (level =0 ; level < num_levels; level++) wm[level] = new[level]; -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return len; }@@ -1528,7 +1518,6 @@ i915_fifo_underrun_reset_write(struct file *filp, {struct drm_i915_private *dev_priv = filp->private_data;struct intel_crtc *crtc; -struct drm_device *dev = &dev_priv->drm;int ret;bool reset;@@ -1539,7 +1528,7 @@ i915_fifo_underrun_reset_write(struct file *filp,if (!reset)return cnt; -for_each_intel_crtc (dev, crtc) { +for_each_intel_crtc (&dev_priv->drm, crtc) {struct drm_crtc_commit *commit;struct intel_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_display_power.c +1
-2@@ -1148,10 +1148,9 @@ static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)static void assert_can_disable_lcpll (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_crtc *crtc; -for_each_intel_crtc (dev, crtc) +for_each_intel_crtc (&dev_priv->drm, crtc)I915_STATE_WARN (crtc->active,"CRTC for pipe %c enabled\n" ,pipe_name (crtc->pipe));drivers/gpu/drm/i915/display/intel_dp.c +3
-4@@ -5229,7 +5229,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct intel_connector *intel_connector) {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector = &intel_connector->base;struct drm_display_mode *fixed_mode;struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base;@@ -5246,7 +5245,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,* with an already powered-on LVDS power sequencer. */ if (intel_get_lvds_encoder (dev_priv)) { -drm_WARN_ON (dev, +drm_WARN_ON (&dev_priv->drm, !(HAS_PCH_IBX (dev_priv) ||HAS_PCH_CPT (dev_priv)));drm_info (&dev_priv->drm,"LVDS was detected, not registering eDP\n" );@@ -5267,7 +5266,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, goto out_vdd_off; } -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); edid =drm_get_edid (connector, &intel_dp->aux.ddc);if (!edid) {/* Fallback to EDID from ACPI OpRegion, if any */ @@ -5305,7 +5304,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) { drm_info(&dev_priv->drm,drivers/gpu/drm/i915/display/intel_hotplug.c +12
-16@@ -178,14 +178,13 @@ static bool intel_hpd_irq_storm_detect(struct drm_i915_private *dev_priv,static void intel_hpd_irq_storm_switch_to_polling (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool hpd_disabled = false;lockdep_assert_held (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -211,7 +210,7 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)/* Enable polling and queue hotplug re-enabling. */ if (hpd_disabled) { -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm);mod_delayed_work (system_wq, &dev_priv->display.hotplug.reenable_work,msecs_to_jiffies (HPD_STORM_REENABLE_DELAY )); }@@ -222,7 +221,6 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)struct drm_i915_private *dev_priv =container_of (work,typeof (*dev_priv), display.hotplug.reenable_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;intel_wakeref_t wakeref;@@ -232,7 +230,7 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) { pin =intel_connector_hpd_pin (connector); if (pin == HPD_NONE ||@@ -370,14 +368,13 @@ static void i915_hotplug_work_func(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.hotplug_work.work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;u32 changed =0 , retry =0 ;u32 hpd_event_bits;u32 hpd_retry_bits; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);drm_dbg_kms (&dev_priv->drm,"running encoder hotplug functions\n" );spin_lock_irq (&dev_priv->irq_lock);@@ -392,7 +389,7 @@ static void i915_hotplug_work_func(struct work_struct *work)spin_unlock_irq (&dev_priv->irq_lock); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;u32 hpd_bit;@@ -429,10 +426,10 @@ static void i915_hotplug_work_func(struct work_struct *work) } }drm_connector_list_iter_end (&conn_iter); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (changed) -drm_kms_helper_hotplug_event (dev); +drm_kms_helper_hotplug_event (&dev_priv->drm);/* Remove shared HPD pins that have changed */ retry &= ~changed;@@ -615,16 +612,15 @@ static void i915_hpd_poll_init_work(struct work_struct *work)struct drm_i915_private *dev_priv = container_of(work, struct drm_i915_private, display.hotplug.poll_init_work); -struct drm_device *dev = &dev_priv->drm;struct drm_connector_list_iter conn_iter;struct intel_connector *connector;bool enabled; -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex); enabled =READ_ONCE (dev_priv->display.hotplug.poll_enabled); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter) {enum hpd_pin pin;@@ -641,16 +637,16 @@ static void i915_hpd_poll_init_work(struct work_struct *work)drm_connector_list_iter_end (&conn_iter);if (enabled) -drm_kms_helper_poll_enable (dev); +drm_kms_helper_poll_enable (&dev_priv->drm); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* * We might have missed any hotplugs that happened while we were * in the middle of disabling polling */ if (!enabled) -drm_helper_hpd_irq_event (dev); +drm_helper_hpd_irq_event (&dev_priv->drm); }/** drivers/gpu/drm/i915/display/intel_lpe_audio.c +2
-3@@ -80,8 +80,7 @@static struct platform_device *lpe_audio_platdev_create (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm; -struct pci_dev *pdev =to_pci_dev (dev->dev); +struct pci_dev *pdev =to_pci_dev (dev_priv->drm.dev);struct platform_device_info pinfo = {};struct resource *rsc;struct platform_device *platdev;@@ -108,7 +107,7 @@ lpe_audio_platdev_create(struct drm_i915_private *dev_priv) rsc[1 ].flags =IORESOURCE_MEM ; rsc[1 ].name ="hdmi-lpe-audio-mmio" ; - pinfo.parent = dev->dev; + pinfo.parent = dev_priv->drm.dev; pinfo.name ="hdmi-lpe-audio" ; pinfo.id =-1 ; pinfo.res = rsc;drivers/gpu/drm/i915/display/intel_lvds.c +5
-6@@ -828,7 +828,6 @@ static void intel_lvds_add_properties(struct drm_connector *connector)*/ void intel_lvds_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_lvds_encoder *lvds_encoder;struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;@@ -841,7 +840,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)/* Skip init on machines we know falsely report LVDS */ if (dmi_check_system (intel_no_lvds)) { -drm_WARN (dev, !dev_priv->display.vbt.int_lvds_support, +drm_WARN (&dev_priv->drm, !dev_priv->display.vbt.int_lvds_support,"Useless DMI match. Internal LVDS support disabled by VBT\n" );return ; }@@ -890,10 +889,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) intel_encoder = &lvds_encoder->base; encoder = &intel_encoder->base; connector = &intel_connector->base; -drm_connector_init (dev, &intel_connector->base, &intel_lvds_connector_funcs, +drm_connector_init (&dev_priv->drm, &intel_connector->base, &intel_lvds_connector_funcs,DRM_MODE_CONNECTOR_LVDS ); -drm_encoder_init (dev, &intel_encoder->base, &intel_lvds_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_lvds_enc_funcs,DRM_MODE_ENCODER_LVDS ,"LVDS" ); intel_encoder->enable = intel_enable_lvds;@@ -944,7 +943,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)* Attempt to get the fixed panel mode from DDC. Assume that the * preferred mode is the right one. */ -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);if (vga_switcheroo_handler_flags () &VGA_SWITCHEROO_CAN_SWITCH_DDC ) edid =drm_get_edid_switcheroo (connector,intel_gmbus_get_adapter (dev_priv, pin));@@ -982,7 +981,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)if (!intel_panel_preferred_fixed_mode (intel_connector))intel_panel_add_encoder_fixed_mode (intel_connector, intel_encoder); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);/* If we still don't have a mode after all that, give up. */ if (!intel_panel_preferred_fixed_mode (intel_connector))drivers/gpu/drm/i915/display/intel_opregion.c +3
-4@@ -463,7 +463,6 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)struct intel_connector *connector;struct drm_connector_list_iter conn_iter;struct opregion_asle *asle = dev_priv->display.opregion.asle; -struct drm_device *dev = &dev_priv->drm;drm_dbg (&dev_priv->drm,"bclp = 0x%08x\n" , bclp);@@ -480,7 +479,7 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)if (bclp >255 )return ASLC_BACKLIGHT_FAILED ; -drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_modeset_lock (&dev_priv->drm.mode_config.connection_mutex,NULL );/* * Update backlight on all connectors that support backlight (usually @@ -488,13 +487,13 @@ static u32 asle_set_backlight(struct drm_i915_private *dev_priv, u32 bclp)*/ drm_dbg_kms (&dev_priv->drm,"updating opregion backlight %d/255\n" , bclp); -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);for_each_intel_connector_iter (connector, &conn_iter)intel_backlight_set_acpi (connector->base.state, bclp,255 );drm_connector_list_iter_end (&conn_iter); asle->cblv =DIV_ROUND_UP (bclp *100 ,255 ) |ASLE_CBLV_VALID ; -drm_modeset_unlock (&dev->mode_config.connection_mutex); +drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex);return 0 ;drivers/gpu/drm/i915/display/intel_pipe_crc.c +4
-5@@ -75,7 +75,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,enum pipe pipe, enum intel_pipe_crc_source *source) { - struct drm_device *dev = &dev_priv->drm; struct intel_encoder *encoder;struct intel_crtc *crtc;struct intel_digital_port *dig_port;@@ -83,8 +82,8 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_PIPE ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) { +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder) {if (!encoder->base.crtc)continue ;@@ -111,7 +110,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, *source =INTEL_PIPE_CRC_SOURCE_DP_D ;break ;default : -drm_WARN (dev,1 ,"nonexisting DP port %c\n" , +drm_WARN (&dev_priv->drm,1 ,"nonexisting DP port %c\n" ,port_name (dig_port->base.port));break ; }@@ -120,7 +119,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv,break ; } } -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm);return ret; }drivers/gpu/drm/i915/display/intel_psr.c +2
-3@@ -2063,13 +2063,12 @@ static bool __psr_wait_for_idle_locked(struct intel_dp *intel_dp)static int intel_psr_fastset_force (struct drm_i915_private *dev_priv) {struct drm_connector_list_iter conn_iter; -struct drm_device *dev = &dev_priv->drm;struct drm_modeset_acquire_ctx ctx;struct drm_atomic_state *state;struct drm_connector *conn;int err =0 ; - state =drm_atomic_state_alloc (dev); + state =drm_atomic_state_alloc (&dev_priv->drm);if (!state)return -ENOMEM ;@@ -2078,7 +2077,7 @@ static int intel_psr_fastset_force(struct drm_i915_private *dev_priv) retry: -drm_connector_list_iter_begin (dev, &conn_iter); +drm_connector_list_iter_begin (&dev_priv->drm, &conn_iter);drm_for_each_connector_iter (conn, &conn_iter) {struct drm_connector_state *conn_state;struct drm_crtc_state *crtc_state;drivers/gpu/drm/i915/display/intel_tv.c +2
-3@@ -1925,7 +1925,6 @@ static void intel_tv_add_properties(struct drm_connector *connector)void intel_tv_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct drm_connector *connector;struct intel_tv *intel_tv;struct intel_encoder *intel_encoder;@@ -1989,10 +1988,10 @@ intel_tv_init(struct drm_i915_private *dev_priv)*/ intel_connector->polled =DRM_CONNECTOR_POLL_CONNECT ; -drm_connector_init (dev, connector, &intel_tv_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_tv_connector_funcs,DRM_MODE_CONNECTOR_SVIDEO ); -drm_encoder_init (dev, &intel_encoder->base, &intel_tv_enc_funcs, +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_tv_enc_funcs,DRM_MODE_ENCODER_TVDAC ,"TV" ); intel_encoder->compute_config = intel_tv_compute_config;drivers/gpu/drm/i915/display/vlv_dsi.c +4
-5@@ -1845,7 +1845,6 @@ static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)void vlv_dsi_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_dsi *intel_dsi;struct intel_encoder *intel_encoder;struct drm_encoder *encoder;@@ -1882,7 +1881,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) connector = &intel_connector->base; -drm_encoder_init (dev, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI , +drm_encoder_init (&dev_priv->drm, encoder, &intel_dsi_funcs,DRM_MODE_ENCODER_DSI ,"DSI %c" ,port_name (port)); intel_encoder->compute_config = intel_dsi_compute_config;@@ -1965,7 +1964,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_dsi_vbt_gpio_init (intel_dsi,intel_dsi_get_hw_state (intel_encoder, &pipe)); -drm_connector_init (dev, connector, &intel_dsi_connector_funcs, +drm_connector_init (&dev_priv->drm, connector, &intel_dsi_connector_funcs,DRM_MODE_CONNECTOR_DSI );drm_connector_helper_add (connector, &intel_dsi_connector_helper_funcs);@@ -1974,9 +1973,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)intel_connector_attach_encoder (intel_connector, intel_encoder); -mutex_lock (&dev->mode_config.mutex); +mutex_lock (&dev_priv->drm.mode_config.mutex);intel_panel_add_vbt_lfp_fixed_mode (intel_connector); -mutex_unlock (&dev->mode_config.mutex); +mutex_unlock (&dev_priv->drm.mode_config.mutex);if (!intel_panel_preferred_fixed_mode (intel_connector)) {drm_dbg_kms (&dev_priv->drm,"no fixed mode\n" );drivers/gpu/drm/i915/i915_driver.c +7
-10@@ -739,7 +739,6 @@ static void i915_driver_hw_remove(struct drm_i915_private *dev_priv)*/ static void i915_driver_register (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_gt *gt;unsigned int i;@@ -749,7 +748,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_vgpu_register (dev_priv);/* Reveal our presence to userspace */ -if (drm_dev_register (dev,0 )) { +if (drm_dev_register (&dev_priv->drm,0 )) {drm_err (&dev_priv->drm,"Failed to register driver for userspace access!\n" );return ;@@ -1093,32 +1092,30 @@ static void i915_driver_postclose(struct drm_device *dev, struct drm_file *file)static void intel_suspend_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->suspend) encoder->suspend (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }static void intel_shutdown_encoders (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;struct intel_encoder *encoder;if (!HAS_DISPLAY (dev_priv))return ; -drm_modeset_lock_all (dev); -for_each_intel_encoder (dev, encoder) +drm_modeset_lock_all (&dev_priv->drm); +for_each_intel_encoder (&dev_priv->drm, encoder)if (encoder->shutdown) encoder->shutdown (encoder); -drm_modeset_unlock_all (dev); +drm_modeset_unlock_all (&dev_priv->drm); }void i915_driver_shutdown (struct drm_i915_private *i915)drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -4384,7 +4384,6 @@ void intel_hpd_irq_setup(struct drm_i915_private *i915)*/ void intel_irq_init (struct drm_i915_private *dev_priv) { -struct drm_device *dev = &dev_priv->drm;int i;INIT_WORK (&dev_priv->l3_parity.error_work, ivb_parity_work);@@ -4402,7 +4401,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)intel_hpd_init_early (dev_priv); - dev->vblank_disable_immediate = true; + dev_priv->drm.vblank_disable_immediate = true;/* Most platforms treat the display irq block as an always-on * power domain. vlv/chv can disable it at runtime and need Signature · 1 line
2.34.1
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
Hi Jani,
Quoted 23 lines · Jani Nikula
Quoted 14 lines · Jani Nikula
Quoted 4 lines · Andi Shyti
Quoted 3 lines · Andi Shyti
Quoted 2 lines · Andrzej Hajda
drm_devicepointers are unwelcome.Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Andrzej Hajda <[email protected]>Acked-by Andi Shyti <[email protected]>Reviewed-by Andi Shyti <[email protected]>Only this first patch is strictly related to display, I'm taking the series in intel-gt-next. Anyone against?
Quoted 7 lines
Absolutely against. That logic is backwards.
drm-intel-gt-next is for stuff that's strictly about gt/gem. Everything else, especially stuff touching common code, needs to go through drm-intel-next.
There's nothing here that's gt/gem specific.
Quoted 8 lines
To elaborate on this, we can do drm-intel-next -> drm-intel-gt-next cross-merges. Not vice versa.
If you merge code to drm-intel-gt-next that other work in drm-intel-next depends on, we'll need a drm-intel-gt-next pull request to drm-next and a backmerge from drm-next to drm-intel-next. And that creates a dependency outside of drm-intel.git, as well as potentially several weeks' delay when drm-next is not open for pull requests.
Thanks for the explanation... I'm still learning here :)
Will push in drm-intel-next, then.
Thanks,
Andi
Re: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove drm_device aliases
In reply to Jani NikulaQuoted 14 lines · Jani Nikula
Quoted 4 lines · Andi Shyti
Quoted 3 lines · Andi Shyti
Quoted 2 lines · Andrzej Hajda
drm_devicepointers are unwelcome.Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Andrzej Hajda <[email protected]>Acked-by Andi Shyti <[email protected]>Reviewed-by Andi Shyti <[email protected]>Only this first patch is strictly related to display, I'm taking the series in intel-gt-next. Anyone against?
Quoted 7 lines
Absolutely against. That logic is backwards.
drm-intel-gt-next is for stuff that's strictly about gt/gem. Everything else, especially stuff touching common code, needs to go through drm-intel-next.
There's nothing here that's gt/gem specific.
Glanced over the series and although there are a few bits which are not about display, it does seem majority is either display or common code so I agree it should all go in via drm-intel-next.
Regards,
Tvrtko
PATCH v2 2/4 drm/i915/display: Use intel_uncore alias if defined
In reply to Andrzej HajdaAlias is shorter and more readable.
--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +7 -7
@@ -3020,7 +3020,7 @@ static void vlv_display_irq_reset(struct drm_i915_private *dev_priv)intel_uncore_write (uncore,DPINVGTT ,DPINVGTT_STATUS_MASK_VLV );i915_hotplug_interrupt_update_locked (dev_priv,0xffffffff ,0 ); -intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (&dev_priv->uncore,PORT_HOTPLUG_STAT )); +intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (uncore,PORT_HOTPLUG_STAT ));i9xx_pipestat_irq_reset (dev_priv);
@@ -3118,7 +3118,7 @@ static void gen8_irq_reset(struct drm_i915_private *dev_priv) {struct intel_uncore *uncore = &dev_priv->uncore; -gen8_master_intr_disable (dev_priv->uncore.regs); +gen8_master_intr_disable (uncore->regs);gen8_gt_irq_reset (to_gt (dev_priv));gen8_display_irq_reset (dev_priv);
@@ -3250,7 +3250,7 @@ static void cherryview_irq_reset(struct drm_i915_private *dev_priv) {struct intel_uncore *uncore = &dev_priv->uncore; -intel_uncore_write (&dev_priv->uncore,GEN8_MASTER_IRQ ,0 ); +intel_uncore_write (uncore,GEN8_MASTER_IRQ ,0 );intel_uncore_posting_read (&dev_priv->uncore,GEN8_MASTER_IRQ );gen8_gt_irq_reset (to_gt (dev_priv));
@@ -4110,8 +4110,8 @@ static void i915_irq_postinstall(struct drm_i915_private *dev_priv)struct intel_uncore *uncore = &dev_priv->uncore;u32 enable_mask; -intel_uncore_write (&dev_priv->uncore,EMR , ~(I915_ERROR_PAGE_TABLE | -I915_ERROR_MEMORY_REFRESH )); +intel_uncore_write (uncore,EMR , ~(I915_ERROR_PAGE_TABLE | +I915_ERROR_MEMORY_REFRESH ));/* Unmask the interrupts that we always want on. */ dev_priv->irq_mask =
@@ -4206,7 +4206,7 @@ static void i965_irq_reset(struct drm_i915_private *dev_priv)struct intel_uncore *uncore = &dev_priv->uncore;i915_hotplug_interrupt_update (dev_priv,0xffffffff ,0 ); -intel_uncore_write (&dev_priv->uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (&dev_priv->uncore,PORT_HOTPLUG_STAT )); +intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (uncore,PORT_HOTPLUG_STAT ));i9xx_pipestat_irq_reset (dev_priv);
@@ -4233,7 +4233,7 @@ static void i965_irq_postinstall(struct drm_i915_private *dev_priv) error_mask = ~(I915_ERROR_PAGE_TABLE |I915_ERROR_MEMORY_REFRESH ); } -intel_uncore_write (&dev_priv->uncore,EMR , error_mask); +intel_uncore_write (uncore,EMR , error_mask);/* Unmask the interrupts that we always want on. */ dev_priv->irq_mask =
Signature · 1 line
2.34.1
PATCH v2 3/4 drm/i915: make intel_uncore_rmw() write unconditionally
In reply to Andrzej HajdaTwo small changes in intel_uncore_rmw will allow to use it more broadly:
- write register unconditionally, for use with latch registers,
- return old value of the register, IRQ cleanup and similar.
If we really want to keep write-only-if-changed feature maybe other helper will be more suitable for it, intel_uncore_rmw name suggests unconditional write.
--- drivers/gpu/drm/i915/intel_uncore.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_uncore.h +4 -4
@@ -433,15 +433,15 @@ intel_uncore_read64_2x32(struct intel_uncore *uncore,#define intel_uncore_write64_fw (...) __raw_uncore_write64(__VA_ARGS__)#define intel_uncore_posting_read_fw (...) ((void)intel_uncore_read_fw(__VA_ARGS__)) -static inline void intel_uncore_rmw (struct intel_uncore *uncore, -i915_reg_t reg,u32 clear,u32 set) +static inline u32 intel_uncore_rmw (struct intel_uncore *uncore, +i915_reg_t reg,u32 clear,u32 set) {u32 old, val; old =intel_uncore_read (uncore, reg); val = (old & ~clear) | set; -if (val != old) -intel_uncore_write (uncore, reg, val); +intel_uncore_write (uncore, reg, val); +return old; } static inline void intel_uncore_rmw_fw(struct intel_uncore *uncore,
Signature · 1 line
2.34.1
PATCH v2 4/4 drm/i915: use proper helper for register updates
In reply to Andrzej HajdaThere is special helper for register read/modify/write.
--- drivers/gpu/drm/i915/display/intel_tc.c | 9 +- drivers/gpu/drm/i915/i915_irq.c | 227 +++++++++--------------- drivers/gpu/drm/i915/intel_pm.c | 60 ++----- drivers/gpu/drm/i915/vlv_suspend.c | 28 +-- 4 files changed, 112 insertions(+), 212 deletions(-)
drivers/gpu/drm/i915/display/intel_tc.c +2 -7
@@ -408,14 +408,9 @@ static bool adl_tc_phy_take_ownership(struct intel_digital_port *dig_port,struct drm_i915_private *i915 =to_i915 (dig_port->base.base.dev);struct intel_uncore *uncore = &i915->uncore;enum port port = dig_port->base.port; -u32 val; - val =intel_uncore_read (uncore,DDI_BUF_CTL (port)); -if (take) - val |=DDI_BUF_CTL_TC_PHY_OWNERSHIP ; -else - val &= ~DDI_BUF_CTL_TC_PHY_OWNERSHIP ; -intel_uncore_write (uncore,DDI_BUF_CTL (port), val); +intel_uncore_rmw (uncore,DDI_BUF_CTL (port),DDI_BUF_CTL_TC_PHY_OWNERSHIP , + take ?DDI_BUF_CTL_TC_PHY_OWNERSHIP :0 );return true; }
drivers/gpu/drm/i915/i915_irq.c +83 -144
426 lines not on this page · raw message
drivers/gpu/drm/i915/intel_pm.c +19 -41
110 lines not on this page · raw message
drivers/gpu/drm/i915/vlv_suspend.c +8 -20
@@ -194,7 +194,6 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *i915) {struct vlv_s0ix_state *s = i915->vlv_s0ix_state;struct intel_uncore *uncore = &i915->uncore; -u32 val;int i;if (!s)
@@ -262,15 +261,11 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *i915)* be restored, as they are used to control the s0ix suspend/resume * sequence by the caller. */ - val =intel_uncore_read (uncore,VLV_GTLC_WAKE_CTRL ); - val &=VLV_GTLC_ALLOWWAKEREQ ; - val |= s->gtlc_wake_ctrl & ~VLV_GTLC_ALLOWWAKEREQ ; -intel_uncore_write (uncore,VLV_GTLC_WAKE_CTRL , val); +intel_uncore_rmw (uncore,VLV_GTLC_WAKE_CTRL , ~VLV_GTLC_ALLOWWAKEREQ , + s->gtlc_wake_ctrl & ~VLV_GTLC_ALLOWWAKEREQ ); - val =intel_uncore_read (uncore,VLV_GTLC_SURVIVABILITY_REG ); - val &=VLV_GFX_CLK_FORCE_ON_BIT ; - val |= s->gtlc_survive & ~VLV_GFX_CLK_FORCE_ON_BIT ; -intel_uncore_write (uncore,VLV_GTLC_SURVIVABILITY_REG , val); +intel_uncore_rmw (uncore,VLV_GTLC_SURVIVABILITY_REG , ~VLV_GFX_CLK_FORCE_ON_BIT , + s->gtlc_survive & ~VLV_GFX_CLK_FORCE_ON_BIT );intel_uncore_write (uncore,VLV_PMWGICZ , s->pmwgicz);
@@ -308,14 +303,10 @@ static int vlv_wait_for_pw_status(struct drm_i915_private *i915,static int vlv_force_gfx_clock (struct drm_i915_private *i915,bool force_on) {struct intel_uncore *uncore = &i915->uncore; -u32 val;int err; - val =intel_uncore_read (uncore,VLV_GTLC_SURVIVABILITY_REG ); - val &= ~VLV_GFX_CLK_FORCE_ON_BIT ; -if (force_on) - val |=VLV_GFX_CLK_FORCE_ON_BIT ; -intel_uncore_write (uncore,VLV_GTLC_SURVIVABILITY_REG , val); +intel_uncore_rmw (uncore,VLV_GTLC_SURVIVABILITY_REG ,VLV_GFX_CLK_FORCE_ON_BIT , + force_on ?VLV_GFX_CLK_FORCE_ON_BIT :0 );if (!force_on)return 0 ;
@@ -340,11 +331,8 @@ static int vlv_allow_gt_wake(struct drm_i915_private *i915, bool allow)u32 val;int err; - val =intel_uncore_read (uncore,VLV_GTLC_WAKE_CTRL ); - val &= ~VLV_GTLC_ALLOWWAKEREQ ; -if (allow) - val |=VLV_GTLC_ALLOWWAKEREQ ; -intel_uncore_write (uncore,VLV_GTLC_WAKE_CTRL , val); +intel_uncore_rmw (uncore,VLV_GTLC_WAKE_CTRL ,VLV_GTLC_ALLOWWAKEREQ , + allow ?VLV_GTLC_ALLOWWAKEREQ :0 );intel_uncore_posting_read (uncore,VLV_GTLC_WAKE_CTRL ); mask =VLV_GTLC_ALLOWWAKEACK ;
Signature · 1 line
2.34.1
Re: [Intel-gfx] [PATCH v2 4/4] drm/i915: use proper helper for register updates
Quoted 54 lines · Andrzej Hajda
There is special helper for register read/modify/write.
Signed-off-by Andrzej Hajda <[email protected]>Reviewed-by Andi Shyti <[email protected]>--- drivers/gpu/drm/i915/display/intel_tc.c | 9 +- drivers/gpu/drm/i915/i915_irq.c | 227 +++++++++--------------- drivers/gpu/drm/i915/intel_pm.c | 60 ++----- drivers/gpu/drm/i915/vlv_suspend.c | 28 +-- 4 files changed, 112 insertions(+), 212 deletions(-)drivers/gpu/drm/i915/display/intel_tc.c +2
-7@@ -408,14 +408,9 @@ static bool adl_tc_phy_take_ownership(struct intel_digital_port *dig_port,struct drm_i915_private *i915 =to_i915 (dig_port->base.base.dev);struct intel_uncore *uncore = &i915->uncore;enum port port = dig_port->base.port; -u32 val; - val =intel_uncore_read (uncore,DDI_BUF_CTL (port)); -if (take) - val |=DDI_BUF_CTL_TC_PHY_OWNERSHIP ; -else - val &= ~DDI_BUF_CTL_TC_PHY_OWNERSHIP ; -intel_uncore_write (uncore,DDI_BUF_CTL (port), val); +intel_uncore_rmw (uncore,DDI_BUF_CTL (port),DDI_BUF_CTL_TC_PHY_OWNERSHIP , + take ?DDI_BUF_CTL_TC_PHY_OWNERSHIP :0 );return true; }drivers/gpu/drm/i915/i915_irq.c +1
-6@@ -325,15 +325,10 @@ i915_hotplug_interrupt_update_locked(struct drm_i915_private *dev_priv, u32 mask, u32 bits) { -u32 val; -lockdep_assert_held (&dev_priv->irq_lock);drm_WARN_ON (&dev_priv->drm, bits & ~mask); - val =intel_uncore_read (&dev_priv->uncore,PORT_HOTPLUG_EN ); - val &= ~mask; - val |= bits; -intel_uncore_write (&dev_priv->uncore,PORT_HOTPLUG_EN , val); +intel_uncore_rmw (&dev_priv->uncore,PORT_HOTPLUG_EN , mask, bits); }/**
drivers/gpu/drm/i915/i915_irq.c static void ivb_parity_work(struct work_struct *work) · line 1056
Quoted 7 lines
drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -1057,8 +1052,8 @@ static void ivb_parity_work(struct work_struct *work)if (drm_WARN_ON (&dev_priv->drm, !dev_priv->l3_parity.which_slice)) goto out; - misccpctl =intel_uncore_read (&dev_priv->uncore,GEN7_MISCCPCTL ); -intel_uncore_write (&dev_priv->uncore,GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); + misccpctl =intel_uncore_rmw (&dev_priv->uncore,GEN7_MISCCPCTL , ~GEN7_DOP_CLOCK_GATE_ENABLE , +0 );
This doesn't look like the right transformation. The original code was clearing the GEN7_DOP_CLOCK_GATE_ENABLE bit and leaving all other bits the way they were. The new code is clearing all of the bits *except* GEN7_DOP_CLOCK_GATE_ENABLE. I think you need to drop the ~ here.
drivers/gpu/drm/i915/i915_irq.c static irqreturn_t valleyview_irq_handler(int irq, void *arg) · line 1687
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +1
-2intel_uncore_posting_read (&dev_priv->uncore,GEN7_MISCCPCTL );while ((slice =ffs (dev_priv->l3_parity.which_slice)) !=0 ) {@@ -1689,8 +1684,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)* bits this time around. */ intel_uncore_write (&dev_priv->uncore,VLV_MASTER_IER ,0 ); - ier =intel_uncore_read (&dev_priv->uncore,VLV_IER ); -intel_uncore_write (&dev_priv->uncore,VLV_IER ,0 ); + ier =intel_uncore_rmw (&dev_priv->uncore,VLV_IER , ~0 ,0 );
I'm not sure there's really benefit to the interrupt handlers like this one...the original code is doing a read, followed by a write to clear the register. There's no (m)odify step there, so converting this to a rmw makes it harder to read and understand what's going on.
If you really want to cut out the extra line of code, it would be better to create a 'read and clear' wrapper function for use in the interrupt handlers so it's at least more intuitive what's happening.
Quoted 14 lines
drivers/gpu/drm/i915/i915_irq.c +1
-2if (gt_iir)intel_uncore_write (&dev_priv->uncore,GTIIR , gt_iir);@@ -1775,8 +1769,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)* bits this time around. */ intel_uncore_write (&dev_priv->uncore,GEN8_MASTER_IRQ ,0 ); - ier =intel_uncore_read (&dev_priv->uncore,VLV_IER ); -intel_uncore_write (&dev_priv->uncore,VLV_IER ,0 ); + ier =intel_uncore_rmw (&dev_priv->uncore,VLV_IER , ~0 ,0 );gen8_gt_irq_handler (to_gt (dev_priv), master_ctl);
drivers/gpu/drm/i915/i915_irq.c static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir) · line 1977
Quoted 6 lines
drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -1981,8 +1974,7 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (ddi_hotplug_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_DDI ); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_DDI , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_DDI ,0 ,0 );
Similarly, a wrapper function for 'read and w1c' would make these a lot less confusing.
Matt
Quoted 585 lines
drivers/gpu/drm/i915/i915_irq.c +77
-130intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, ddi_hotplug_trigger, dig_hotplug_reg,@@ -1993,8 +1985,7 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (tc_hotplug_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_TC ); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_TC , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_TC ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, tc_hotplug_trigger, dig_hotplug_reg,@@ -2019,8 +2010,7 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (hotplug_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg,@@ -2031,8 +2021,7 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (hotplug2_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG2 , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug2_trigger, dig_hotplug_reg,@@ -2052,8 +2041,7 @@ static void ilk_hpd_irq_handler(struct drm_i915_private *dev_priv, {u32 dig_hotplug_reg, pin_mask =0 , long_mask =0 ; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL ); -intel_uncore_write (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg,@@ -2232,8 +2220,7 @@ static void bxt_hpd_irq_handler(struct drm_i915_private *dev_priv, {u32 dig_hotplug_reg, pin_mask =0 , long_mask =0 ; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg,@@ -2252,8 +2239,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)if (trigger_tc) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL ); -intel_uncore_write (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tc, dig_hotplug_reg,@@ -2264,8 +2250,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)if (trigger_tbt) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL ); -intel_uncore_write (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tbt, dig_hotplug_reg,@@ -2355,8 +2340,7 @@ gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)else iir_reg =EDP_PSR_IIR ; - psr_iir =intel_uncore_read (&dev_priv->uncore, iir_reg); -intel_uncore_write (&dev_priv->uncore, iir_reg, psr_iir); + psr_iir =intel_uncore_rmw (&dev_priv->uncore, iir_reg,0 ,0 );if (psr_iir) found = true;@@ -2426,8 +2410,7 @@ static void gen11_dsi_te_interrupt_handler(struct drm_i915_private *dev_priv,/* clear TE in dsi IIR */ port = (te_trigger &DSI1_TE ) ?PORT_B :PORT_A ; - tmp =intel_uncore_read (&dev_priv->uncore,DSI_INTR_IDENT_REG (port)); -intel_uncore_write (&dev_priv->uncore,DSI_INTR_IDENT_REG (port), tmp); + tmp =intel_uncore_rmw (&dev_priv->uncore,DSI_INTR_IDENT_REG (port),0 ,0 ); }static u32 gen8_de_pipe_flip_done_mask (struct drm_i915_private *i915)@@ -2884,7 +2867,6 @@ static bool gen11_dsi_configure_te(struct intel_crtc *intel_crtc, {struct drm_i915_private *dev_priv =to_i915 (intel_crtc->base.dev);enum port port; -u32 tmp;if (!(intel_crtc->mode_flags & (I915_MODE_FLAG_DSI_USE_TE1 |I915_MODE_FLAG_DSI_USE_TE0 )))@@ -2896,16 +2878,10 @@ static bool gen11_dsi_configure_te(struct intel_crtc *intel_crtc,else port =PORT_A ; - tmp =intel_uncore_read (&dev_priv->uncore,DSI_INTR_MASK_REG (port)); -if (enable) - tmp &= ~DSI_TE_EVENT ; -else - tmp |=DSI_TE_EVENT ; - -intel_uncore_write (&dev_priv->uncore,DSI_INTR_MASK_REG (port), tmp); +intel_uncore_rmw (&dev_priv->uncore,DSI_INTR_MASK_REG (port),DSI_TE_EVENT , + enable ?0 :DSI_TE_EVENT ); - tmp =intel_uncore_read (&dev_priv->uncore,DSI_INTR_IDENT_REG (port)); -intel_uncore_write (&dev_priv->uncore,DSI_INTR_IDENT_REG (port), tmp); +intel_uncore_rmw (&dev_priv->uncore,DSI_INTR_IDENT_REG (port),0 ,0 );return true; }@@ -3020,7 +2996,7 @@ static void vlv_display_irq_reset(struct drm_i915_private *dev_priv)intel_uncore_write (uncore,DPINVGTT ,DPINVGTT_STATUS_MASK_VLV );i915_hotplug_interrupt_update_locked (dev_priv,0xffffffff ,0 ); -intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (uncore,PORT_HOTPLUG_STAT )); +intel_uncore_rmw (uncore,PORT_HOTPLUG_STAT ,0 ,0 );i9xx_pipestat_irq_reset (dev_priv);@@ -3290,23 +3266,20 @@ static u32 ibx_hotplug_enables(struct drm_i915_private *i915,static void ibx_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; -/* * Enable digital hotplug on the PCH, and configure the DP short pulse * duration to 2ms (which is the minimum in the Display Port spec). * The pulse duration bits are reserved on LPT+. */ - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); - hotplug &= ~(PORTA_HOTPLUG_ENABLE | -PORTB_HOTPLUG_ENABLE | -PORTC_HOTPLUG_ENABLE | -PORTD_HOTPLUG_ENABLE | -PORTB_PULSE_DURATION_MASK | -PORTC_PULSE_DURATION_MASK | -PORTD_PULSE_DURATION_MASK ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, ibx_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG , +PORTA_HOTPLUG_ENABLE | +PORTB_HOTPLUG_ENABLE | +PORTC_HOTPLUG_ENABLE | +PORTD_HOTPLUG_ENABLE | +PORTB_PULSE_DURATION_MASK | +PORTC_PULSE_DURATION_MASK | +PORTD_PULSE_DURATION_MASK , +intel_hpd_hotplug_enables (dev_priv, ibx_hotplug_enables)); }static void ibx_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3353,30 +3326,24 @@ static u32 icp_tc_hotplug_enables(struct drm_i915_private *i915,static void icp_ddi_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_DDI ); - hotplug &= ~(SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_A ) | -SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_B ) | -SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_C ) | -SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_D )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, icp_ddi_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_DDI , hotplug); +intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_DDI , +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_A ) | +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_B ) | +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_C ) | +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_D ), +intel_hpd_hotplug_enables (dev_priv, icp_ddi_hotplug_enables)); }static void icp_tc_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_TC ); - hotplug &= ~(ICP_TC_HPD_ENABLE (HPD_PORT_TC1 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC2 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC3 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC4 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC5 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC6 )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, icp_tc_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_TC , hotplug); +intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_TC , +ICP_TC_HPD_ENABLE (HPD_PORT_TC1 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC2 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC3 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC4 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC5 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC6 ), +intel_hpd_hotplug_enables (dev_priv, icp_tc_hotplug_enables)); }static void icp_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3428,46 +3395,37 @@ static void dg1_hpd_irq_setup(struct drm_i915_private *dev_priv)static void gen11_tc_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL ); - hotplug &= ~(GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL , hotplug); +intel_uncore_rmw (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL , +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 ), +intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables)); }static void gen11_tbt_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL ); - hotplug &= ~(GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL , hotplug); +intel_uncore_rmw (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL , +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 ), +intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables)); }static void gen11_hpd_irq_setup (struct drm_i915_private *dev_priv) {u32 hotplug_irqs, enabled_irqs; -u32 val; enabled_irqs =intel_hpd_enabled_irqs (dev_priv, dev_priv->display.hotplug.hpd); hotplug_irqs =intel_hpd_hotplug_irqs (dev_priv, dev_priv->display.hotplug.hpd); - val =intel_uncore_read (&dev_priv->uncore,GEN11_DE_HPD_IMR ); - val &= ~hotplug_irqs; - val |= ~enabled_irqs & hotplug_irqs; -intel_uncore_write (&dev_priv->uncore,GEN11_DE_HPD_IMR , val); +intel_uncore_rmw (&dev_priv->uncore,GEN11_DE_HPD_IMR , hotplug_irqs, + ~enabled_irqs & hotplug_irqs);intel_uncore_posting_read (&dev_priv->uncore,GEN11_DE_HPD_IMR );gen11_tc_hpd_detection_setup (dev_priv);@@ -3507,29 +3465,22 @@ static u32 spt_hotplug2_enables(struct drm_i915_private *i915,static void spt_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 val, hotplug; -/* Display WA #1179 WaHardHangonHotPlug: cnp */ if (HAS_PCH_CNP (dev_priv)) { - val =intel_uncore_read (&dev_priv->uncore,SOUTH_CHICKEN1 ); - val &= ~CHASSIS_CLK_REQ_DURATION_MASK ; - val |=CHASSIS_CLK_REQ_DURATION (0xf ); -intel_uncore_write (&dev_priv->uncore,SOUTH_CHICKEN1 , val); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_CHICKEN1 ,CHASSIS_CLK_REQ_DURATION_MASK , +CHASSIS_CLK_REQ_DURATION (0xf )); }/* Enable digital hotplug on the PCH */ - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); - hotplug &= ~(PORTA_HOTPLUG_ENABLE | -PORTB_HOTPLUG_ENABLE | -PORTC_HOTPLUG_ENABLE | -PORTD_HOTPLUG_ENABLE ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, spt_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG , +PORTA_HOTPLUG_ENABLE | +PORTB_HOTPLUG_ENABLE | +PORTC_HOTPLUG_ENABLE | +PORTD_HOTPLUG_ENABLE , +intel_hpd_hotplug_enables (dev_priv, spt_hotplug_enables)); - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ); - hotplug &= ~PORTE_HOTPLUG_ENABLE ; - hotplug |=intel_hpd_hotplug_enables (dev_priv, spt_hotplug2_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG2 , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ,PORTE_HOTPLUG_ENABLE , +intel_hpd_hotplug_enables (dev_priv, spt_hotplug2_enables)); }static void spt_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3561,18 +3512,14 @@ static u32 ilk_hotplug_enables(struct drm_i915_private *i915,static void ilk_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; -/* * Enable digital hotplug on the CPU, and configure the DP short pulse * duration to 2ms (which is the minimum in the Display Port spec) * The pulse duration bits are reserved on HSW+. */ - hotplug =intel_uncore_read (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL ); - hotplug &= ~(DIGITAL_PORTA_HOTPLUG_ENABLE | -DIGITAL_PORTA_PULSE_DURATION_MASK ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, ilk_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL , hotplug); +intel_uncore_rmw (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL , +DIGITAL_PORTA_HOTPLUG_ENABLE |DIGITAL_PORTA_PULSE_DURATION_MASK , +intel_hpd_hotplug_enables (dev_priv, ilk_hotplug_enables)); }static void ilk_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3620,17 +3567,12 @@ static u32 bxt_hotplug_enables(struct drm_i915_private *i915,static void bxt_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); - hotplug &= ~(PORTA_HOTPLUG_ENABLE | -PORTB_HOTPLUG_ENABLE | -PORTC_HOTPLUG_ENABLE | -BXT_DDIA_HPD_INVERT | -BXT_DDIB_HPD_INVERT | -BXT_DDIC_HPD_INVERT ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, bxt_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG , +PORTA_HOTPLUG_ENABLE | +PORTB_HOTPLUG_ENABLE | +PORTC_HOTPLUG_ENABLE | +BXT_DDI_HPD_INVERT_MASK , +intel_hpd_hotplug_enables (dev_priv, bxt_hotplug_enables)); }static void bxt_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -4010,9 +3952,7 @@ static void i9xx_error_irq_ack(struct drm_i915_private *dev_priv, {u32 emr; - *eir =intel_uncore_read (&dev_priv->uncore,EIR ); - -intel_uncore_write (&dev_priv->uncore,EIR , *eir); + *eir =intel_uncore_rmw (&dev_priv->uncore,EIR ,0 ,0 ); *eir_stuck =intel_uncore_read (&dev_priv->uncore,EIR );if (*eir_stuck ==0 )@@ -4028,8 +3968,7 @@ static void i9xx_error_irq_ack(struct drm_i915_private *dev_priv,* (or by a GPU reset) so we mask any bit that * remains set. */ - emr =intel_uncore_read (&dev_priv->uncore,EMR ); -intel_uncore_write (&dev_priv->uncore,EMR ,0xffffffff ); + emr =intel_uncore_rmw (&dev_priv->uncore,EMR , ~0 ,0xffffffff );intel_uncore_write (&dev_priv->uncore,EMR , emr | *eir_stuck); }@@ -4096,7 +4035,7 @@ static void i915_irq_reset(struct drm_i915_private *dev_priv)if (I915_HAS_HOTPLUG (dev_priv)) {i915_hotplug_interrupt_update (dev_priv,0xffffffff ,0 ); -intel_uncore_write (&dev_priv->uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (&dev_priv->uncore,PORT_HOTPLUG_STAT )); +intel_uncore_rmw (&dev_priv->uncore,PORT_HOTPLUG_STAT ,0 ,0 ); }i9xx_pipestat_irq_reset (dev_priv);@@ -4206,7 +4145,7 @@ static void i965_irq_reset(struct drm_i915_private *dev_priv)struct intel_uncore *uncore = &dev_priv->uncore;i915_hotplug_interrupt_update (dev_priv,0xffffffff ,0 ); -intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (uncore,PORT_HOTPLUG_STAT )); +intel_uncore_rmw (uncore,PORT_HOTPLUG_STAT ,0 ,0 );i9xx_pipestat_irq_reset (dev_priv);drivers/gpu/drm/i915/intel_pm.c +19
-41@@ -895,19 +895,14 @@ static void pnv_update_wm(struct drm_i915_private *dev_priv) wm =intel_calculate_wm (pixel_rate, &pnv_cursor_wm, pnv_display_wm.fifo_size,4 , latency->cursor_sr); - reg =intel_uncore_read (&dev_priv->uncore,DSPFW3 ); - reg &= ~DSPFW_CURSOR_SR_MASK ; - reg |=FW_WM (wm,CURSOR_SR ); -intel_uncore_write (&dev_priv->uncore,DSPFW3 , reg); +intel_uncore_rmw (&dev_priv->uncore,DSPFW3 ,DSPFW_CURSOR_SR_MASK , +FW_WM (wm,CURSOR_SR ));/* Display HPLL off SR */ wm =intel_calculate_wm (pixel_rate, &pnv_display_hplloff_wm, pnv_display_hplloff_wm.fifo_size, cpp, latency->display_hpll_disable); - reg =intel_uncore_read (&dev_priv->uncore,DSPFW3 ); - reg &= ~DSPFW_HPLL_SR_MASK ; - reg |=FW_WM (wm,HPLL_SR ); -intel_uncore_write (&dev_priv->uncore,DSPFW3 , reg); +intel_uncore_rmw (&dev_priv->uncore,DSPFW3 ,DSPFW_HPLL_SR_MASK ,FW_WM (wm,HPLL_SR ));/* cursor HPLL off SR */ wm = intel_calculate_wm(pixel_rate, &pnv_cursor_hplloff_wm,@@ -3480,7 +3475,6 @@ static void ilk_write_wm_values(struct drm_i915_private *dev_priv, {struct ilk_wm_values *previous = &dev_priv->display.wm.hw;unsigned int dirty; -u32 val; dirty =ilk_compute_wm_dirty (dev_priv, previous, results);if (!dirty)@@ -3496,32 +3490,20 @@ static void ilk_write_wm_values(struct drm_i915_private *dev_priv,intel_uncore_write (&dev_priv->uncore,WM0_PIPE_ILK (PIPE_C ), results->wm_pipe[2 ]);if (dirty &WM_DIRTY_DDB ) { -if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv)) { - val =intel_uncore_read (&dev_priv->uncore,WM_MISC ); -if (results->partitioning ==INTEL_DDB_PART_1_2 ) - val &= ~WM_MISC_DATA_PARTITION_5_6 ; -else - val |=WM_MISC_DATA_PARTITION_5_6 ; -intel_uncore_write (&dev_priv->uncore,WM_MISC , val); - }else { - val =intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL2 ); -if (results->partitioning ==INTEL_DDB_PART_1_2 ) - val &= ~DISP_DATA_PARTITION_5_6 ; -else - val |=DISP_DATA_PARTITION_5_6 ; -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL2 , val); - } - } - -if (dirty &WM_DIRTY_FBC ) { - val =intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ); -if (results->enable_fbc_wm) - val &= ~DISP_FBC_WM_DIS ; +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv)) +intel_uncore_rmw (&dev_priv->uncore,WM_MISC ,WM_MISC_DATA_PARTITION_5_6 , + results->partitioning ==INTEL_DDB_PART_1_2 ?0 : +WM_MISC_DATA_PARTITION_5_6 );else - val |=DISP_FBC_WM_DIS ; -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL , val); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL2 ,DISP_DATA_PARTITION_5_6 , + results->partitioning ==INTEL_DDB_PART_1_2 ?0 : +DISP_DATA_PARTITION_5_6 ); } +if (dirty &WM_DIRTY_FBC ) +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,DISP_FBC_WM_DIS , + results->enable_fbc_wm ?0 :DISP_FBC_WM_DIS ); +if (dirty &WM_DIRTY_LP (1 ) && previous->wm_lp_spr[0 ] != results->wm_lp_spr[0 ])intel_uncore_write (&dev_priv->uncore,WM1S_LP_ILK , results->wm_lp_spr[0 ]);@@ -4131,7 +4113,7 @@ static void g4x_disable_trickle_feed(struct drm_i915_private *dev_priv)intel_uncore_read (&dev_priv->uncore,DSPCNTR (pipe)) | DISP_TRICKLE_FEED_DISABLE); -intel_uncore_write (&dev_priv->uncore,DSPSURF (pipe),intel_uncore_read (&dev_priv->uncore,DSPSURF (pipe))); +intel_uncore_rmw (&dev_priv->uncore,DSPSURF (pipe),0 ,0 );intel_uncore_posting_read (&dev_priv->uncore,DSPSURF (pipe)); } }@@ -4339,8 +4321,8 @@ static void gen8_set_l3sqc_credits(struct drm_i915_private *dev_priv,u32 val;/* WaTempDisableDOPClkGating:bdw */ - misccpctl =intel_uncore_read (&dev_priv->uncore,GEN7_MISCCPCTL ); -intel_uncore_write (&dev_priv->uncore,GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); + misccpctl =intel_uncore_rmw (&dev_priv->uncore,GEN7_MISCCPCTL , ~GEN7_DOP_CLOCK_GATE_ENABLE , +0 ); val =intel_uncore_read (&dev_priv->uncore,GEN8_L3SQCREG1 ); val &= ~L3_PRIO_CREDITS_MASK ;@@ -4619,8 +4601,6 @@ static void hsw_init_clock_gating(struct drm_i915_private *dev_priv)static void ivb_init_clock_gating (struct drm_i915_private *dev_priv) { -u32 snpcr; -intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D ,ILK_VRHUNIT_CLOCK_GATE_DISABLE );/* WaFbcAsynchFlipDisableFbcQueue:ivb */ @@ -4658,10 +4638,8 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv)g4x_disable_trickle_feed (dev_priv); - snpcr =intel_uncore_read (&dev_priv->uncore,GEN6_MBCUNIT_SNPCR ); - snpcr &= ~GEN6_MBC_SNPCR_MASK ; - snpcr |=GEN6_MBC_SNPCR_MED ; -intel_uncore_write (&dev_priv->uncore,GEN6_MBCUNIT_SNPCR , snpcr); +intel_uncore_rmw (&dev_priv->uncore,GEN6_MBCUNIT_SNPCR ,GEN6_MBC_SNPCR_MASK , +GEN6_MBC_SNPCR_MED );if (!HAS_PCH_NOP (dev_priv))cpt_init_clock_gating (dev_priv);drivers/gpu/drm/i915/vlv_suspend.c +8
-20@@ -194,7 +194,6 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *i915) {struct vlv_s0ix_state *s = i915->vlv_s0ix_state;struct intel_uncore *uncore = &i915->uncore; -u32 val;int i;if (!s)@@ -262,15 +261,11 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *i915)* be restored, as they are used to control the s0ix suspend/resume * sequence by the caller. */ - val =intel_uncore_read (uncore,VLV_GTLC_WAKE_CTRL ); - val &=VLV_GTLC_ALLOWWAKEREQ ; - val |= s->gtlc_wake_ctrl & ~VLV_GTLC_ALLOWWAKEREQ ; -intel_uncore_write (uncore,VLV_GTLC_WAKE_CTRL , val); +intel_uncore_rmw (uncore,VLV_GTLC_WAKE_CTRL , ~VLV_GTLC_ALLOWWAKEREQ , + s->gtlc_wake_ctrl & ~VLV_GTLC_ALLOWWAKEREQ ); - val =intel_uncore_read (uncore,VLV_GTLC_SURVIVABILITY_REG ); - val &=VLV_GFX_CLK_FORCE_ON_BIT ; - val |= s->gtlc_survive & ~VLV_GFX_CLK_FORCE_ON_BIT ; -intel_uncore_write (uncore,VLV_GTLC_SURVIVABILITY_REG , val); +intel_uncore_rmw (uncore,VLV_GTLC_SURVIVABILITY_REG , ~VLV_GFX_CLK_FORCE_ON_BIT , + s->gtlc_survive & ~VLV_GFX_CLK_FORCE_ON_BIT );intel_uncore_write (uncore,VLV_PMWGICZ , s->pmwgicz);@@ -308,14 +303,10 @@ static int vlv_wait_for_pw_status(struct drm_i915_private *i915,static int vlv_force_gfx_clock (struct drm_i915_private *i915,bool force_on) {struct intel_uncore *uncore = &i915->uncore; -u32 val;int err; - val =intel_uncore_read (uncore,VLV_GTLC_SURVIVABILITY_REG ); - val &= ~VLV_GFX_CLK_FORCE_ON_BIT ; -if (force_on) - val |=VLV_GFX_CLK_FORCE_ON_BIT ; -intel_uncore_write (uncore,VLV_GTLC_SURVIVABILITY_REG , val); +intel_uncore_rmw (uncore,VLV_GTLC_SURVIVABILITY_REG ,VLV_GFX_CLK_FORCE_ON_BIT , + force_on ?VLV_GFX_CLK_FORCE_ON_BIT :0 );if (!force_on)return 0 ;@@ -340,11 +331,8 @@ static int vlv_allow_gt_wake(struct drm_i915_private *i915, bool allow)u32 val;int err; - val =intel_uncore_read (uncore,VLV_GTLC_WAKE_CTRL ); - val &= ~VLV_GTLC_ALLOWWAKEREQ ; -if (allow) - val |=VLV_GTLC_ALLOWWAKEREQ ; -intel_uncore_write (uncore,VLV_GTLC_WAKE_CTRL , val); +intel_uncore_rmw (uncore,VLV_GTLC_WAKE_CTRL ,VLV_GTLC_ALLOWWAKEREQ , + allow ?VLV_GTLC_ALLOWWAKEREQ :0 );intel_uncore_posting_read (uncore,VLV_GTLC_WAKE_CTRL ); mask =VLV_GTLC_ALLOWWAKEACK ;Signature · 1 line
2.34.1
Signature · 4 lines
Matt Roper Graphics Software Engineer VTT-OSGC Platform Enablement Intel Corporation
Re: [Intel-gfx] [PATCH v2 4/4] drm/i915: use proper helper for register updates
Quoted 58 lines · Matt Roper
Quoted 57 lines · Andrzej Hajda
There is special helper for register read/modify/write.
Signed-off-by Andrzej Hajda <[email protected]>Reviewed-by Andi Shyti <[email protected]>--- drivers/gpu/drm/i915/display/intel_tc.c | 9 +- drivers/gpu/drm/i915/i915_irq.c | 227 +++++++++--------------- drivers/gpu/drm/i915/intel_pm.c | 60 ++----- drivers/gpu/drm/i915/vlv_suspend.c | 28 +-- 4 files changed, 112 insertions(+), 212 deletions(-)drivers/gpu/drm/i915/display/intel_tc.c +2
-7@@ -408,14 +408,9 @@ static bool adl_tc_phy_take_ownership(struct intel_digital_port *dig_port,struct drm_i915_private *i915 =to_i915 (dig_port->base.base.dev);struct intel_uncore *uncore = &i915->uncore;enum port port = dig_port->base.port; -u32 val; - val =intel_uncore_read (uncore,DDI_BUF_CTL (port)); -if (take) - val |=DDI_BUF_CTL_TC_PHY_OWNERSHIP ; -else - val &= ~DDI_BUF_CTL_TC_PHY_OWNERSHIP ; -intel_uncore_write (uncore,DDI_BUF_CTL (port), val); +intel_uncore_rmw (uncore,DDI_BUF_CTL (port),DDI_BUF_CTL_TC_PHY_OWNERSHIP , + take ?DDI_BUF_CTL_TC_PHY_OWNERSHIP :0 );return true; }drivers/gpu/drm/i915/i915_irq.c +1
-6@@ -325,15 +325,10 @@ i915_hotplug_interrupt_update_locked(struct drm_i915_private *dev_priv, u32 mask, u32 bits) { -u32 val; -lockdep_assert_held (&dev_priv->irq_lock);drm_WARN_ON (&dev_priv->drm, bits & ~mask); - val =intel_uncore_read (&dev_priv->uncore,PORT_HOTPLUG_EN ); - val &= ~mask; - val |= bits; -intel_uncore_write (&dev_priv->uncore,PORT_HOTPLUG_EN , val); +intel_uncore_rmw (&dev_priv->uncore,PORT_HOTPLUG_EN , mask, bits); }/** @@ -1057,8 +1052,8 @@ static void ivb_parity_work(struct work_struct *work)if (drm_WARN_ON (&dev_priv->drm, !dev_priv->l3_parity.which_slice)) goto out;
Quoted 9 lines
drivers/gpu/drm/i915/i915_irq.c static void ivb_parity_work(struct work_struct *work) · line 1056
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +2
-2- misccpctl =intel_uncore_read (&dev_priv->uncore,GEN7_MISCCPCTL ); -intel_uncore_write (&dev_priv->uncore,GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); + misccpctl =intel_uncore_rmw (&dev_priv->uncore,GEN7_MISCCPCTL , ~GEN7_DOP_CLOCK_GATE_ENABLE , +0 );This doesn't look like the right transformation. The original code was clearing the
GEN7_DOP_CLOCK_GATE_ENABLEbit and leaving all other bits the way they were. The new code is clearing all of the bits *except*GEN7_DOP_CLOCK_GATE_ENABLE. I think you need to drop the ~ here.
Thx for spotting this one, fix already posted. Also for similar line in intel_pm.
Quoted 17 lines
drivers/gpu/drm/i915/i915_irq.c static irqreturn_t valleyview_irq_handler(int irq, void *arg) · line 1687
Quoted 11 lines
drivers/gpu/drm/i915/i915_irq.c +1
-2intel_uncore_posting_read (&dev_priv->uncore,GEN7_MISCCPCTL );while ((slice =ffs (dev_priv->l3_parity.which_slice)) !=0 ) {@@ -1689,8 +1684,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)* bits this time around. */ intel_uncore_write (&dev_priv->uncore,VLV_MASTER_IER ,0 ); - ier =intel_uncore_read (&dev_priv->uncore,VLV_IER ); -intel_uncore_write (&dev_priv->uncore,VLV_IER ,0 ); + ier =intel_uncore_rmw (&dev_priv->uncore,VLV_IER , ~0 ,0 );I'm not sure there's really benefit to the interrupt handlers like this one...the original code is doing a read, followed by a write to clear the register. There's no (m)odify step there, so converting this to a rmw makes it harder to read and understand what's going on.
Quoted 3 lines
If you really want to cut out the extra line of code, it would be better to create a 'read and clear' wrapper function for use in the interrupt handlers so it's at least more intuitive what's happening.
Hmm, for me rmw(..., reg, ~0, 0) is quite straightforward "clear all bits of given reg". On the other side read followed by write requires from reader matching 1st two parameters (register), not so sure if it is more clear. Anyway, since this is only two cases I am not sure if making new helper for it makes sense, there is already many of them :)
Maybe simplest is to just revert these two cases.
Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/i915/i915_irq.c +1
-2if (gt_iir)intel_uncore_write (&dev_priv->uncore,GTIIR , gt_iir);@@ -1775,8 +1769,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)* bits this time around. */ intel_uncore_write (&dev_priv->uncore,GEN8_MASTER_IRQ ,0 ); - ier =intel_uncore_read (&dev_priv->uncore,VLV_IER ); -intel_uncore_write (&dev_priv->uncore,VLV_IER ,0 ); + ier =intel_uncore_rmw (&dev_priv->uncore,VLV_IER , ~0 ,0 );gen8_gt_irq_handler (to_gt (dev_priv), master_ctl);@@ -1981,8 +1974,7 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (ddi_hotplug_trigger) {u32 dig_hotplug_reg;
Quoted 6 lines
drivers/gpu/drm/i915/i915_irq.c static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir) · line 1977
Quoted 3 lines
drivers/gpu/drm/i915/i915_irq.c +1
-2- dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_DDI ); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_DDI , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_DDI ,0 ,0 );Similarly, a wrapper function for 'read and w1c' would make these a lot less confusing.
This case has too many users to revert :)
If intel_uncore_rmw(uncore, reg, 0, 0) is not acceptable, what about intel_uncore_rw(uncore, reg) ?
I would like to avoid "w1c" in the name, as there is possibility helper can be useful in case of latch registers - when writting current value to the register will cause some hw action.
Regards
Andrzej
Quoted 590 lines
Matt
Quoted 585 lines
drivers/gpu/drm/i915/i915_irq.c +77
-130intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, ddi_hotplug_trigger, dig_hotplug_reg,@@ -1993,8 +1985,7 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (tc_hotplug_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_TC ); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_TC , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_TC ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, tc_hotplug_trigger, dig_hotplug_reg,@@ -2019,8 +2010,7 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (hotplug_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg,@@ -2031,8 +2021,7 @@ static void spt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)if (hotplug2_trigger) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG2 , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug2_trigger, dig_hotplug_reg,@@ -2052,8 +2041,7 @@ static void ilk_hpd_irq_handler(struct drm_i915_private *dev_priv, {u32 dig_hotplug_reg, pin_mask =0 , long_mask =0 ; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL ); -intel_uncore_write (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg,@@ -2232,8 +2220,7 @@ static void bxt_hpd_irq_handler(struct drm_i915_private *dev_priv, {u32 dig_hotplug_reg, pin_mask =0 , long_mask =0 ; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, hotplug_trigger, dig_hotplug_reg,@@ -2252,8 +2239,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)if (trigger_tc) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL ); -intel_uncore_write (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tc, dig_hotplug_reg,@@ -2264,8 +2250,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)if (trigger_tbt) {u32 dig_hotplug_reg; - dig_hotplug_reg =intel_uncore_read (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL ); -intel_uncore_write (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL , dig_hotplug_reg); + dig_hotplug_reg =intel_uncore_rmw (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL ,0 ,0 ); intel_get_hpd_pins(dev_priv, &pin_mask, &long_mask, trigger_tbt, dig_hotplug_reg,@@ -2355,8 +2340,7 @@ gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)else iir_reg =EDP_PSR_IIR ; - psr_iir =intel_uncore_read (&dev_priv->uncore, iir_reg); -intel_uncore_write (&dev_priv->uncore, iir_reg, psr_iir); + psr_iir =intel_uncore_rmw (&dev_priv->uncore, iir_reg,0 ,0 );if (psr_iir) found = true;@@ -2426,8 +2410,7 @@ static void gen11_dsi_te_interrupt_handler(struct drm_i915_private *dev_priv,/* clear TE in dsi IIR */ port = (te_trigger &DSI1_TE ) ?PORT_B :PORT_A ; - tmp =intel_uncore_read (&dev_priv->uncore,DSI_INTR_IDENT_REG (port)); -intel_uncore_write (&dev_priv->uncore,DSI_INTR_IDENT_REG (port), tmp); + tmp =intel_uncore_rmw (&dev_priv->uncore,DSI_INTR_IDENT_REG (port),0 ,0 ); }static u32 gen8_de_pipe_flip_done_mask (struct drm_i915_private *i915)@@ -2884,7 +2867,6 @@ static bool gen11_dsi_configure_te(struct intel_crtc *intel_crtc, {struct drm_i915_private *dev_priv =to_i915 (intel_crtc->base.dev);enum port port; -u32 tmp;if (!(intel_crtc->mode_flags & (I915_MODE_FLAG_DSI_USE_TE1 |I915_MODE_FLAG_DSI_USE_TE0 )))@@ -2896,16 +2878,10 @@ static bool gen11_dsi_configure_te(struct intel_crtc *intel_crtc,else port =PORT_A ; - tmp =intel_uncore_read (&dev_priv->uncore,DSI_INTR_MASK_REG (port)); -if (enable) - tmp &= ~DSI_TE_EVENT ; -else - tmp |=DSI_TE_EVENT ; - -intel_uncore_write (&dev_priv->uncore,DSI_INTR_MASK_REG (port), tmp); +intel_uncore_rmw (&dev_priv->uncore,DSI_INTR_MASK_REG (port),DSI_TE_EVENT , + enable ?0 :DSI_TE_EVENT ); - tmp =intel_uncore_read (&dev_priv->uncore,DSI_INTR_IDENT_REG (port)); -intel_uncore_write (&dev_priv->uncore,DSI_INTR_IDENT_REG (port), tmp); +intel_uncore_rmw (&dev_priv->uncore,DSI_INTR_IDENT_REG (port),0 ,0 );return true; }@@ -3020,7 +2996,7 @@ static void vlv_display_irq_reset(struct drm_i915_private *dev_priv)intel_uncore_write (uncore,DPINVGTT ,DPINVGTT_STATUS_MASK_VLV );i915_hotplug_interrupt_update_locked (dev_priv,0xffffffff ,0 ); -intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (uncore,PORT_HOTPLUG_STAT )); +intel_uncore_rmw (uncore,PORT_HOTPLUG_STAT ,0 ,0 );i9xx_pipestat_irq_reset (dev_priv);@@ -3290,23 +3266,20 @@ static u32 ibx_hotplug_enables(struct drm_i915_private *i915,static void ibx_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; -/* * Enable digital hotplug on the PCH, and configure the DP short pulse * duration to 2ms (which is the minimum in the Display Port spec). * The pulse duration bits are reserved on LPT+. */ - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); - hotplug &= ~(PORTA_HOTPLUG_ENABLE | -PORTB_HOTPLUG_ENABLE | -PORTC_HOTPLUG_ENABLE | -PORTD_HOTPLUG_ENABLE | -PORTB_PULSE_DURATION_MASK | -PORTC_PULSE_DURATION_MASK | -PORTD_PULSE_DURATION_MASK ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, ibx_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG , +PORTA_HOTPLUG_ENABLE | +PORTB_HOTPLUG_ENABLE | +PORTC_HOTPLUG_ENABLE | +PORTD_HOTPLUG_ENABLE | +PORTB_PULSE_DURATION_MASK | +PORTC_PULSE_DURATION_MASK | +PORTD_PULSE_DURATION_MASK , +intel_hpd_hotplug_enables (dev_priv, ibx_hotplug_enables)); }static void ibx_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3353,30 +3326,24 @@ static u32 icp_tc_hotplug_enables(struct drm_i915_private *i915,static void icp_ddi_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_DDI ); - hotplug &= ~(SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_A ) | -SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_B ) | -SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_C ) | -SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_D )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, icp_ddi_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_DDI , hotplug); +intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_DDI , +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_A ) | +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_B ) | +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_C ) | +SHOTPLUG_CTL_DDI_HPD_ENABLE (HPD_PORT_D ), +intel_hpd_hotplug_enables (dev_priv, icp_ddi_hotplug_enables)); }static void icp_tc_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,SHOTPLUG_CTL_TC ); - hotplug &= ~(ICP_TC_HPD_ENABLE (HPD_PORT_TC1 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC2 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC3 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC4 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC5 ) | -ICP_TC_HPD_ENABLE (HPD_PORT_TC6 )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, icp_tc_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,SHOTPLUG_CTL_TC , hotplug); +intel_uncore_rmw (&dev_priv->uncore,SHOTPLUG_CTL_TC , +ICP_TC_HPD_ENABLE (HPD_PORT_TC1 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC2 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC3 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC4 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC5 ) | +ICP_TC_HPD_ENABLE (HPD_PORT_TC6 ), +intel_hpd_hotplug_enables (dev_priv, icp_tc_hotplug_enables)); }static void icp_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3428,46 +3395,37 @@ static void dg1_hpd_irq_setup(struct drm_i915_private *dev_priv)static void gen11_tc_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL ); - hotplug &= ~(GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL , hotplug); +intel_uncore_rmw (&dev_priv->uncore,GEN11_TC_HOTPLUG_CTL , +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 ), +intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables)); }static void gen11_tbt_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL ); - hotplug &= ~(GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | -GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 )); - hotplug |=intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL , hotplug); +intel_uncore_rmw (&dev_priv->uncore,GEN11_TBT_HOTPLUG_CTL , +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC1 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC2 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC3 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC4 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC5 ) | +GEN11_HOTPLUG_CTL_ENABLE (HPD_PORT_TC6 ), +intel_hpd_hotplug_enables (dev_priv, gen11_hotplug_enables)); }static void gen11_hpd_irq_setup (struct drm_i915_private *dev_priv) {u32 hotplug_irqs, enabled_irqs; -u32 val; enabled_irqs =intel_hpd_enabled_irqs (dev_priv, dev_priv->display.hotplug.hpd); hotplug_irqs =intel_hpd_hotplug_irqs (dev_priv, dev_priv->display.hotplug.hpd); - val =intel_uncore_read (&dev_priv->uncore,GEN11_DE_HPD_IMR ); - val &= ~hotplug_irqs; - val |= ~enabled_irqs & hotplug_irqs; -intel_uncore_write (&dev_priv->uncore,GEN11_DE_HPD_IMR , val); +intel_uncore_rmw (&dev_priv->uncore,GEN11_DE_HPD_IMR , hotplug_irqs, + ~enabled_irqs & hotplug_irqs);intel_uncore_posting_read (&dev_priv->uncore,GEN11_DE_HPD_IMR );gen11_tc_hpd_detection_setup (dev_priv);@@ -3507,29 +3465,22 @@ static u32 spt_hotplug2_enables(struct drm_i915_private *i915,static void spt_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 val, hotplug; -/* Display WA #1179 WaHardHangonHotPlug: cnp */ if (HAS_PCH_CNP (dev_priv)) { - val =intel_uncore_read (&dev_priv->uncore,SOUTH_CHICKEN1 ); - val &= ~CHASSIS_CLK_REQ_DURATION_MASK ; - val |=CHASSIS_CLK_REQ_DURATION (0xf ); -intel_uncore_write (&dev_priv->uncore,SOUTH_CHICKEN1 , val); +intel_uncore_rmw (&dev_priv->uncore,SOUTH_CHICKEN1 ,CHASSIS_CLK_REQ_DURATION_MASK , +CHASSIS_CLK_REQ_DURATION (0xf )); }/* Enable digital hotplug on the PCH */ - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); - hotplug &= ~(PORTA_HOTPLUG_ENABLE | -PORTB_HOTPLUG_ENABLE | -PORTC_HOTPLUG_ENABLE | -PORTD_HOTPLUG_ENABLE ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, spt_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG , +PORTA_HOTPLUG_ENABLE | +PORTB_HOTPLUG_ENABLE | +PORTC_HOTPLUG_ENABLE | +PORTD_HOTPLUG_ENABLE , +intel_hpd_hotplug_enables (dev_priv, spt_hotplug_enables)); - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ); - hotplug &= ~PORTE_HOTPLUG_ENABLE ; - hotplug |=intel_hpd_hotplug_enables (dev_priv, spt_hotplug2_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG2 , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG2 ,PORTE_HOTPLUG_ENABLE , +intel_hpd_hotplug_enables (dev_priv, spt_hotplug2_enables)); }static void spt_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3561,18 +3512,14 @@ static u32 ilk_hotplug_enables(struct drm_i915_private *i915,static void ilk_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; -/* * Enable digital hotplug on the CPU, and configure the DP short pulse * duration to 2ms (which is the minimum in the Display Port spec) * The pulse duration bits are reserved on HSW+. */ - hotplug =intel_uncore_read (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL ); - hotplug &= ~(DIGITAL_PORTA_HOTPLUG_ENABLE | -DIGITAL_PORTA_PULSE_DURATION_MASK ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, ilk_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL , hotplug); +intel_uncore_rmw (&dev_priv->uncore,DIGITAL_PORT_HOTPLUG_CNTRL , +DIGITAL_PORTA_HOTPLUG_ENABLE |DIGITAL_PORTA_PULSE_DURATION_MASK , +intel_hpd_hotplug_enables (dev_priv, ilk_hotplug_enables)); }static void ilk_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -3620,17 +3567,12 @@ static u32 bxt_hotplug_enables(struct drm_i915_private *i915,static void bxt_hpd_detection_setup (struct drm_i915_private *dev_priv) { -u32 hotplug; - - hotplug =intel_uncore_read (&dev_priv->uncore,PCH_PORT_HOTPLUG ); - hotplug &= ~(PORTA_HOTPLUG_ENABLE | -PORTB_HOTPLUG_ENABLE | -PORTC_HOTPLUG_ENABLE | -BXT_DDIA_HPD_INVERT | -BXT_DDIB_HPD_INVERT | -BXT_DDIC_HPD_INVERT ); - hotplug |=intel_hpd_hotplug_enables (dev_priv, bxt_hotplug_enables); -intel_uncore_write (&dev_priv->uncore,PCH_PORT_HOTPLUG , hotplug); +intel_uncore_rmw (&dev_priv->uncore,PCH_PORT_HOTPLUG , +PORTA_HOTPLUG_ENABLE | +PORTB_HOTPLUG_ENABLE | +PORTC_HOTPLUG_ENABLE | +BXT_DDI_HPD_INVERT_MASK , +intel_hpd_hotplug_enables (dev_priv, bxt_hotplug_enables)); }static void bxt_hpd_irq_setup (struct drm_i915_private *dev_priv)@@ -4010,9 +3952,7 @@ static void i9xx_error_irq_ack(struct drm_i915_private *dev_priv, {u32 emr; - *eir =intel_uncore_read (&dev_priv->uncore,EIR ); - -intel_uncore_write (&dev_priv->uncore,EIR , *eir); + *eir =intel_uncore_rmw (&dev_priv->uncore,EIR ,0 ,0 ); *eir_stuck =intel_uncore_read (&dev_priv->uncore,EIR );if (*eir_stuck ==0 )@@ -4028,8 +3968,7 @@ static void i9xx_error_irq_ack(struct drm_i915_private *dev_priv,* (or by a GPU reset) so we mask any bit that * remains set. */ - emr =intel_uncore_read (&dev_priv->uncore,EMR ); -intel_uncore_write (&dev_priv->uncore,EMR ,0xffffffff ); + emr =intel_uncore_rmw (&dev_priv->uncore,EMR , ~0 ,0xffffffff );intel_uncore_write (&dev_priv->uncore,EMR , emr | *eir_stuck); }@@ -4096,7 +4035,7 @@ static void i915_irq_reset(struct drm_i915_private *dev_priv)if (I915_HAS_HOTPLUG (dev_priv)) {i915_hotplug_interrupt_update (dev_priv,0xffffffff ,0 ); -intel_uncore_write (&dev_priv->uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (&dev_priv->uncore,PORT_HOTPLUG_STAT )); +intel_uncore_rmw (&dev_priv->uncore,PORT_HOTPLUG_STAT ,0 ,0 ); }i9xx_pipestat_irq_reset (dev_priv);@@ -4206,7 +4145,7 @@ static void i965_irq_reset(struct drm_i915_private *dev_priv)struct intel_uncore *uncore = &dev_priv->uncore;i915_hotplug_interrupt_update (dev_priv,0xffffffff ,0 ); -intel_uncore_write (uncore,PORT_HOTPLUG_STAT ,intel_uncore_read (uncore,PORT_HOTPLUG_STAT )); +intel_uncore_rmw (uncore,PORT_HOTPLUG_STAT ,0 ,0 );i9xx_pipestat_irq_reset (dev_priv);drivers/gpu/drm/i915/intel_pm.c +19
-41@@ -895,19 +895,14 @@ static void pnv_update_wm(struct drm_i915_private *dev_priv) wm =intel_calculate_wm (pixel_rate, &pnv_cursor_wm, pnv_display_wm.fifo_size,4 , latency->cursor_sr); - reg =intel_uncore_read (&dev_priv->uncore,DSPFW3 ); - reg &= ~DSPFW_CURSOR_SR_MASK ; - reg |=FW_WM (wm,CURSOR_SR ); -intel_uncore_write (&dev_priv->uncore,DSPFW3 , reg); +intel_uncore_rmw (&dev_priv->uncore,DSPFW3 ,DSPFW_CURSOR_SR_MASK , +FW_WM (wm,CURSOR_SR ));/* Display HPLL off SR */ wm =intel_calculate_wm (pixel_rate, &pnv_display_hplloff_wm, pnv_display_hplloff_wm.fifo_size, cpp, latency->display_hpll_disable); - reg =intel_uncore_read (&dev_priv->uncore,DSPFW3 ); - reg &= ~DSPFW_HPLL_SR_MASK ; - reg |=FW_WM (wm,HPLL_SR ); -intel_uncore_write (&dev_priv->uncore,DSPFW3 , reg); +intel_uncore_rmw (&dev_priv->uncore,DSPFW3 ,DSPFW_HPLL_SR_MASK ,FW_WM (wm,HPLL_SR ));/* cursor HPLL off SR */ wm = intel_calculate_wm(pixel_rate, &pnv_cursor_hplloff_wm,@@ -3480,7 +3475,6 @@ static void ilk_write_wm_values(struct drm_i915_private *dev_priv, {struct ilk_wm_values *previous = &dev_priv->display.wm.hw;unsigned int dirty; -u32 val; dirty =ilk_compute_wm_dirty (dev_priv, previous, results);if (!dirty)@@ -3496,32 +3490,20 @@ static void ilk_write_wm_values(struct drm_i915_private *dev_priv,intel_uncore_write (&dev_priv->uncore,WM0_PIPE_ILK (PIPE_C ), results->wm_pipe[2 ]);if (dirty &WM_DIRTY_DDB ) { -if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv)) { - val =intel_uncore_read (&dev_priv->uncore,WM_MISC ); -if (results->partitioning ==INTEL_DDB_PART_1_2 ) - val &= ~WM_MISC_DATA_PARTITION_5_6 ; -else - val |=WM_MISC_DATA_PARTITION_5_6 ; -intel_uncore_write (&dev_priv->uncore,WM_MISC , val); - }else { - val =intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL2 ); -if (results->partitioning ==INTEL_DDB_PART_1_2 ) - val &= ~DISP_DATA_PARTITION_5_6 ; -else - val |=DISP_DATA_PARTITION_5_6 ; -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL2 , val); - } - } - -if (dirty &WM_DIRTY_FBC ) { - val =intel_uncore_read (&dev_priv->uncore,DISP_ARB_CTL ); -if (results->enable_fbc_wm) - val &= ~DISP_FBC_WM_DIS ; +if (IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv)) +intel_uncore_rmw (&dev_priv->uncore,WM_MISC ,WM_MISC_DATA_PARTITION_5_6 , + results->partitioning ==INTEL_DDB_PART_1_2 ?0 : +WM_MISC_DATA_PARTITION_5_6 );else - val |=DISP_FBC_WM_DIS ; -intel_uncore_write (&dev_priv->uncore,DISP_ARB_CTL , val); +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL2 ,DISP_DATA_PARTITION_5_6 , + results->partitioning ==INTEL_DDB_PART_1_2 ?0 : +DISP_DATA_PARTITION_5_6 ); } +if (dirty &WM_DIRTY_FBC ) +intel_uncore_rmw (&dev_priv->uncore,DISP_ARB_CTL ,DISP_FBC_WM_DIS , + results->enable_fbc_wm ?0 :DISP_FBC_WM_DIS ); +if (dirty &WM_DIRTY_LP (1 ) && previous->wm_lp_spr[0 ] != results->wm_lp_spr[0 ])intel_uncore_write (&dev_priv->uncore,WM1S_LP_ILK , results->wm_lp_spr[0 ]);@@ -4131,7 +4113,7 @@ static void g4x_disable_trickle_feed(struct drm_i915_private *dev_priv)intel_uncore_read (&dev_priv->uncore,DSPCNTR (pipe)) | DISP_TRICKLE_FEED_DISABLE); -intel_uncore_write (&dev_priv->uncore,DSPSURF (pipe),intel_uncore_read (&dev_priv->uncore,DSPSURF (pipe))); +intel_uncore_rmw (&dev_priv->uncore,DSPSURF (pipe),0 ,0 );intel_uncore_posting_read (&dev_priv->uncore,DSPSURF (pipe)); } }@@ -4339,8 +4321,8 @@ static void gen8_set_l3sqc_credits(struct drm_i915_private *dev_priv,u32 val;/* WaTempDisableDOPClkGating:bdw */ - misccpctl =intel_uncore_read (&dev_priv->uncore,GEN7_MISCCPCTL ); -intel_uncore_write (&dev_priv->uncore,GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); + misccpctl =intel_uncore_rmw (&dev_priv->uncore,GEN7_MISCCPCTL , ~GEN7_DOP_CLOCK_GATE_ENABLE , +0 ); val =intel_uncore_read (&dev_priv->uncore,GEN8_L3SQCREG1 ); val &= ~L3_PRIO_CREDITS_MASK ;@@ -4619,8 +4601,6 @@ static void hsw_init_clock_gating(struct drm_i915_private *dev_priv)static void ivb_init_clock_gating (struct drm_i915_private *dev_priv) { -u32 snpcr; -intel_uncore_write (&dev_priv->uncore,ILK_DSPCLK_GATE_D ,ILK_VRHUNIT_CLOCK_GATE_DISABLE );/* WaFbcAsynchFlipDisableFbcQueue:ivb */ @@ -4658,10 +4638,8 @@ static void ivb_init_clock_gating(struct drm_i915_private *dev_priv)g4x_disable_trickle_feed (dev_priv); - snpcr =intel_uncore_read (&dev_priv->uncore,GEN6_MBCUNIT_SNPCR ); - snpcr &= ~GEN6_MBC_SNPCR_MASK ; - snpcr |=GEN6_MBC_SNPCR_MED ; -intel_uncore_write (&dev_priv->uncore,GEN6_MBCUNIT_SNPCR , snpcr); +intel_uncore_rmw (&dev_priv->uncore,GEN6_MBCUNIT_SNPCR ,GEN6_MBC_SNPCR_MASK , +GEN6_MBC_SNPCR_MED );if (!HAS_PCH_NOP (dev_priv))cpt_init_clock_gating (dev_priv);drivers/gpu/drm/i915/vlv_suspend.c +8
-20@@ -194,7 +194,6 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *i915) {struct vlv_s0ix_state *s = i915->vlv_s0ix_state;struct intel_uncore *uncore = &i915->uncore; -u32 val;int i;if (!s)@@ -262,15 +261,11 @@ static void vlv_restore_gunit_s0ix_state(struct drm_i915_private *i915)* be restored, as they are used to control the s0ix suspend/resume * sequence by the caller. */ - val =intel_uncore_read (uncore,VLV_GTLC_WAKE_CTRL ); - val &=VLV_GTLC_ALLOWWAKEREQ ; - val |= s->gtlc_wake_ctrl & ~VLV_GTLC_ALLOWWAKEREQ ; -intel_uncore_write (uncore,VLV_GTLC_WAKE_CTRL , val); +intel_uncore_rmw (uncore,VLV_GTLC_WAKE_CTRL , ~VLV_GTLC_ALLOWWAKEREQ , + s->gtlc_wake_ctrl & ~VLV_GTLC_ALLOWWAKEREQ ); - val =intel_uncore_read (uncore,VLV_GTLC_SURVIVABILITY_REG ); - val &=VLV_GFX_CLK_FORCE_ON_BIT ; - val |= s->gtlc_survive & ~VLV_GFX_CLK_FORCE_ON_BIT ; -intel_uncore_write (uncore,VLV_GTLC_SURVIVABILITY_REG , val); +intel_uncore_rmw (uncore,VLV_GTLC_SURVIVABILITY_REG , ~VLV_GFX_CLK_FORCE_ON_BIT , + s->gtlc_survive & ~VLV_GFX_CLK_FORCE_ON_BIT );intel_uncore_write (uncore,VLV_PMWGICZ , s->pmwgicz);@@ -308,14 +303,10 @@ static int vlv_wait_for_pw_status(struct drm_i915_private *i915,static int vlv_force_gfx_clock (struct drm_i915_private *i915,bool force_on) {struct intel_uncore *uncore = &i915->uncore; -u32 val;int err; - val =intel_uncore_read (uncore,VLV_GTLC_SURVIVABILITY_REG ); - val &= ~VLV_GFX_CLK_FORCE_ON_BIT ; -if (force_on) - val |=VLV_GFX_CLK_FORCE_ON_BIT ; -intel_uncore_write (uncore,VLV_GTLC_SURVIVABILITY_REG , val); +intel_uncore_rmw (uncore,VLV_GTLC_SURVIVABILITY_REG ,VLV_GFX_CLK_FORCE_ON_BIT , + force_on ?VLV_GFX_CLK_FORCE_ON_BIT :0 );if (!force_on)return 0 ;@@ -340,11 +331,8 @@ static int vlv_allow_gt_wake(struct drm_i915_private *i915, bool allow)u32 val;int err; - val =intel_uncore_read (uncore,VLV_GTLC_WAKE_CTRL ); - val &= ~VLV_GTLC_ALLOWWAKEREQ ; -if (allow) - val |=VLV_GTLC_ALLOWWAKEREQ ; -intel_uncore_write (uncore,VLV_GTLC_WAKE_CTRL , val); +intel_uncore_rmw (uncore,VLV_GTLC_WAKE_CTRL ,VLV_GTLC_ALLOWWAKEREQ , + allow ?VLV_GTLC_ALLOWWAKEREQ :0 );intel_uncore_posting_read (uncore,VLV_GTLC_WAKE_CTRL ); mask =VLV_GTLC_ALLOWWAKEACK ;Signature · 1 line
2.34.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Simplify uncore register updates (rev2)
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: Simplify uncore register updates (rev2)
URL : https://patchwork.freedesktop.org/series/109374/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for Simplify uncore register updates (rev2)
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: Simplify uncore register updates (rev2)
URL : https://patchwork.freedesktop.org/series/109374/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12222 -> Patchwork_109374v2
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/index.html
Participating hosts (43 -> 40)
------------------------------
Missing (3): fi-ctg-p8600 fi-kbl-x1275 fi-hsw-4200u
Known issues
------------
Here are the changes found in Patchwork_109374v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_lmem_swapping@basic:
- fi-apl-guc: NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#4613]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-apl-guc/igt@[email protected]
* igt@kms_chamelium@hdmi-crc-fast:
- fi-apl-guc: NOTRUN -> [SKIP][2] ([fdo#109271] / [fdo#111827]) +8 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-apl-guc/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-hdmi-a-1:
- fi-snb-2600: [PASS][3] -> [DMESG-WARN][4] ([i915#5090])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/fi-snb-2600/igt@kms_pipe_crc_basic@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-snb-2600/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- fi-apl-guc: NOTRUN -> [SKIP][5] ([fdo#109271]) +11 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-apl-guc/igt@kms_psr@sprite_plane_onoff.html
#### Possible fixes ####
* igt@gem_render_tiled_blits@basic:
- fi-apl-guc: [INCOMPLETE][6] -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/fi-apl-guc/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-apl-guc/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-bxt-dsi: [DMESG-FAIL][8] ([i915#5334]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-bxt-dsi/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@guc:
- {bat-rpls-2}: [DMESG-WARN][10] ([i915#6471]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/bat-rpls-2/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/bat-rpls-2/igt@i915_selftest@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-2:
- {bat-dg2-11}: [FAIL][12] ([i915#6818]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]
#### Warnings ####
* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: [FAIL][14] ([fdo#103375]) -> [INCOMPLETE][15] ([i915#5982])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/fi-rkl-11600/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/fi-rkl-11600/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#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5090]: https://gitlab.freedesktop.org/drm/intel/issues/5090
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6434]: https://gitlab.freedesktop.org/drm/intel/issues/6434
[i915#6471]: https://gitlab.freedesktop.org/drm/intel/issues/6471
[i915#6559]: https://gitlab.freedesktop.org/drm/intel/issues/6559
[i915#6818]: https://gitlab.freedesktop.org/drm/intel/issues/6818
Build changes
-------------
* Linux: CI_DRM_12222 -> Patchwork_109374v2
CI-20190529: 20190529
CI_DRM_12222: 6278acf81fd635214b7e310bb325c218e72e0349 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7001: d21216f0db39457717274d74b4d2e3db6683aa63 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109374v2: 6278acf81fd635214b7e310bb325c218e72e0349 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
ea8bfe7fe033 drm/i915: use proper helper for register updates 8f51f21c845e drm/i915: make intel_uncore_rmw() write unconditionally 899cfaf2d826 drm/i915/display: Use intel_uncore alias if defined 5dd0cbcb6fda drm/i915/display: Use drm_device alias if defined
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/index.html
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Simplify uncore register updates (rev3)
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: Simplify uncore register updates (rev3)
URL : https://patchwork.freedesktop.org/series/109374/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for Simplify uncore register updates (rev3)
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: Simplify uncore register updates (rev3)
URL : https://patchwork.freedesktop.org/series/109374/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12223 -> Patchwork_109374v3
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_109374v3 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_109374v3, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/index.html
Participating hosts (42 -> 35)
------------------------------
Missing (7): fi-hsw-4200u bat-dg2-9 bat-adlp-6 fi-ctg-p8600 bat-adln-1 bat-jsl-3 bat-rpls-2
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109374v3:
### IGT changes ###
#### Possible regressions ####
* igt@gem_render_tiled_blits@basic:
- fi-apl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12223/fi-apl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/fi-apl-guc/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109374v3 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-hsw-4770: NOTRUN -> [SKIP][3] ([fdo#109271] / [fdo#111827])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/fi-hsw-4770/igt@[email protected]
- bat-dg1-5: NOTRUN -> [SKIP][4] ([fdo#111827])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/bat-dg1-5/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-dg1-5: NOTRUN -> [SKIP][5] ([i915#4078])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/bat-dg1-5/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3@lmem0:
- {bat-dg2-11}: [DMESG-WARN][6] ([i915#6816]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12223/bat-dg2-11/igt@gem_exec_suspend@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/bat-dg2-11/igt@gem_exec_suspend@[email protected]
* igt@gem_exec_suspend@basic-s3@smem:
- {bat-adlm-1}: [DMESG-WARN][8] ([i915#2867]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12223/bat-adlm-1/igt@gem_exec_suspend@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/bat-adlm-1/igt@gem_exec_suspend@[email protected]
* igt@i915_selftest@live@gt_engines:
- bat-dg1-5: [INCOMPLETE][10] ([i915#4418]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12223/bat-dg1-5/igt@i915_selftest@live@gt_engines.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/bat-dg1-5/igt@i915_selftest@live@gt_engines.html
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][12] ([i915#4785]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12223/fi-hsw-4770/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/fi-hsw-4770/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- {bat-rpls-1}: [INCOMPLETE][14] ([i915#4983] / [i915#6257]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12223/bat-rpls-1/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/bat-rpls-1/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4418]: https://gitlab.freedesktop.org/drm/intel/issues/4418
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6816]: https://gitlab.freedesktop.org/drm/intel/issues/6816
[i915#7029]: https://gitlab.freedesktop.org/drm/intel/issues/7029
[i915#7031]: https://gitlab.freedesktop.org/drm/intel/issues/7031
Build changes
-------------
* Linux: CI_DRM_12223 -> Patchwork_109374v3
CI-20190529: 20190529
CI_DRM_12223: c53a5e48e0405a63cda64682304cd8b391025be3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7002: 523844c74e7da6b39d856596c28a92f04172035f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109374v3: c53a5e48e0405a63cda64682304cd8b391025be3 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
0fde7c09febb drm/i915: use proper helper for register updates 817bcd2da950 drm/i915: make intel_uncore_rmw() write unconditionally bccf05147153 drm/i915/display: Use intel_uncore alias if defined dc158c4e7b65 drm/i915/display: remove drm_device aliases
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v3/index.html
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for Simplify uncore register updates (rev2)
In reply to Andrzej Hajda== Series Details ==
== Series Details ==
Series: Simplify uncore register updates (rev2)
URL : https://patchwork.freedesktop.org/series/109374/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12222_full -> Patchwork_109374v2_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_109374v2_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_109374v2_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (9 -> 12)
------------------------------
Additional (3): shard-rkl shard-dg1 shard-tglu
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_109374v2_full:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@reset:
- shard-skl: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl9/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_109374v2_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_capture@pi@bcs0:
- shard-skl: [PASS][2] -> [INCOMPLETE][3] ([i915#3371])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl9/igt@gem_exec_capture@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl10/igt@gem_exec_capture@[email protected]
* igt@gem_exec_endless@dispatch@rcs0:
- shard-iclb: [PASS][4] -> [INCOMPLETE][5] ([i915#3778])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb2/igt@gem_exec_endless@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb4/igt@gem_exec_endless@[email protected]
* igt@gem_exec_fair@basic-pace@vecs0:
- shard-glk: [PASS][6] -> [FAIL][7] ([i915#2842])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-glk9/igt@gem_exec_fair@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-glk7/igt@gem_exec_fair@[email protected]
* igt@gem_lmem_swapping@random:
- shard-iclb: NOTRUN -> [SKIP][8] ([i915#4613])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@gem_pxp@verify-pxp-key-change-after-suspend-resume:
- shard-iclb: NOTRUN -> [SKIP][9] ([i915#4270])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@gem_workarounds@suspend-resume:
- shard-apl: [PASS][10] -> [DMESG-WARN][11] ([i915#180]) +3 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-apl7/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl1/igt@[email protected]
* igt@gen7_exec_parse@bitmasks:
- shard-iclb: NOTRUN -> [SKIP][12] ([fdo#109289])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@gen9_exec_parse@allowed-single:
- shard-glk: [PASS][13] -> [DMESG-WARN][14] ([i915#5566] / [i915#716])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-glk2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-glk5/igt@[email protected]
* igt@gen9_exec_parse@secure-batches:
- shard-iclb: NOTRUN -> [SKIP][15] ([i915#2856])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@i915_module_load@reload:
- shard-skl: [PASS][16] -> [DMESG-WARN][17] ([i915#1982])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl9/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl10/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-skl: NOTRUN -> [FAIL][18] ([i915#454])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl10/igt@[email protected]
* igt@kms_addfb_basic@legacy-format:
- shard-tglb: [PASS][19] -> [INCOMPLETE][20] ([i915#6987])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-tglb5/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-tglb2/igt@[email protected]
* igt@kms_async_flips@alternate-sync-async-flip@pipe-c-edp-1:
- shard-skl: [PASS][21] -> [FAIL][22] ([i915#2521]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl1/igt@kms_async_flips@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl6/igt@kms_async_flips@[email protected]
* igt@kms_big_fb@4-tiled-32bpp-rotate-90:
- shard-apl: NOTRUN -> [SKIP][23] ([fdo#109271]) +11 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl2/igt@[email protected]
* igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
- shard-iclb: NOTRUN -> [SKIP][24] ([i915#5286]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_big_fb@4-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
* igt@kms_big_fb@linear-8bpp-rotate-270:
- shard-iclb: NOTRUN -> [SKIP][25] ([fdo#110725] / [fdo#111614])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_big_fb@yf-tiled-8bpp-rotate-90:
- shard-iclb: NOTRUN -> [SKIP][26] ([fdo#110723])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_big_joiner@invalid-modeset:
- shard-iclb: NOTRUN -> [SKIP][27] ([i915#2705])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc:
- shard-iclb: NOTRUN -> [SKIP][28] ([fdo#109278] / [i915#3886])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_ccs@pipe-b-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_ccs@pipe-c-random-ccs-data-4_tiled_dg2_mc_ccs:
- shard-iclb: NOTRUN -> [SKIP][29] ([fdo#109278]) +4 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_ccs@pipe-c-random-ccs-data-4_tiled_dg2_mc_ccs.html
* igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_mc_ccs:
- shard-skl: NOTRUN -> [SKIP][30] ([fdo#109271] / [i915#3886]) +2 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl4/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_mc_ccs.html
* igt@kms_chamelium@vga-hpd-after-suspend:
- shard-iclb: NOTRUN -> [SKIP][31] ([fdo#109284] / [fdo#111827]) +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_color@ctm-0-25@pipe-c-edp-1:
- shard-iclb: NOTRUN -> [FAIL][32] ([i915#315] / [i915#6946]) +2 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_color@[email protected]
* igt@kms_color_chamelium@ctm-0-50:
- shard-skl: NOTRUN -> [SKIP][33] ([fdo#109271] / [fdo#111827])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl4/igt@[email protected]
* igt@kms_content_protection@srm:
- shard-iclb: NOTRUN -> [SKIP][34] ([fdo#109300] / [fdo#111066])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_cursor_crc@cursor-random-512x170:
- shard-iclb: NOTRUN -> [SKIP][35] ([i915#3359])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_cursor_crc@cursor-sliding-max-size:
- shard-iclb: NOTRUN -> [SKIP][36] ([i915#3555]) +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [PASS][37] -> [INCOMPLETE][38] ([i915#180] / [i915#1982] / [i915#4939])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-apl1/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl6/igt@[email protected]
* igt@kms_flip@2x-blocking-wf_vblank:
- shard-iclb: NOTRUN -> [SKIP][39] ([fdo#109274]) +5 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_flip@2x-blocking-wf_vblank.html
* igt@kms_flip@flip-vs-expired-vblank@a-edp1:
- shard-skl: [PASS][40] -> [FAIL][41] ([i915#79])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl4/igt@kms_flip@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl4/igt@kms_flip@[email protected]
* igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-64bpp-4tile-downscaling@pipe-a-valid-mode:
- shard-iclb: NOTRUN -> [SKIP][42] ([i915#2587] / [i915#2672])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb4/igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-64bpp-4tile-downscaling@pipe-a-valid-mode.html
* igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][43] ([i915#2672]) +3 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-default-mode.html
* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-downscaling@pipe-a-default-mode:
- shard-iclb: NOTRUN -> [SKIP][44] ([i915#2672] / [i915#3555])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilercccs-downscaling@pipe-a-default-mode.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-snb: [PASS][45] -> [DMESG-WARN][46] ([i915#5090])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-snb5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-snb5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-mmap-wc:
- shard-iclb: NOTRUN -> [SKIP][47] ([fdo#109280]) +7 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-spr-indfb-draw-mmap-wc.html
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-edp-1:
- shard-skl: [PASS][48] -> [INCOMPLETE][49] ([i915#4939])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl6/igt@kms_pipe_crc_basic@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl10/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_plane_scaling@plane-downscale-with-pixel-format-factor-0-25@pipe-c-edp-1:
- shard-iclb: NOTRUN -> [SKIP][50] ([i915#5176]) +2 similar issues
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_plane_scaling@[email protected]
* igt@kms_plane_scaling@plane-scaler-with-rotation-unity-scaling@pipe-a-edp-1:
- shard-skl: NOTRUN -> [SKIP][51] ([fdo#109271]) +43 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl6/igt@kms_plane_scaling@[email protected]
* igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-a-edp-1:
- shard-iclb: [PASS][52] -> [SKIP][53] ([i915#5235]) +2 similar issues
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb6/igt@kms_plane_scaling@[email protected]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb2/igt@kms_plane_scaling@[email protected]
* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: NOTRUN -> [SKIP][54] ([fdo#109441])
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@kms_psr@psr2_cursor_blt.html
* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [PASS][55] -> [SKIP][56] ([fdo#109441])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb5/igt@kms_psr@psr2_cursor_plane_move.html
* igt@perf_pmu@event-wait@rcs0:
- shard-iclb: NOTRUN -> [SKIP][57] ([fdo#112283])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@perf_pmu@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@preservation-s3@vecs0:
- shard-apl: [DMESG-WARN][58] ([i915#180]) -> [PASS][59]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-apl6/igt@gem_ctx_isolation@[email protected]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl2/igt@gem_ctx_isolation@[email protected]
* igt@gem_exec_balancer@parallel-bb-first:
- shard-iclb: [SKIP][60] ([i915#4525]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb3/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb2/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [FAIL][62] ([i915#3989] / [i915#454]) -> [PASS][63]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb8/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb7/igt@[email protected]
* igt@i915_pm_rpm@system-suspend-modeset:
- shard-iclb: [INCOMPLETE][64] -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb7/igt@[email protected]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb6/igt@[email protected]
* igt@i915_selftest@live@evict:
- shard-skl: [INCOMPLETE][66] -> [PASS][67]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl1/igt@i915_selftest@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl9/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- shard-skl: [DMESG-FAIL][68] ([i915#5334]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl1/igt@i915_selftest@live@gt_heartbeat.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl9/igt@i915_selftest@live@gt_heartbeat.html
* igt@kms_async_flips@alternate-sync-async-flip@pipe-b-edp-1:
- shard-skl: [FAIL][70] ([i915#2521]) -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl1/igt@kms_async_flips@[email protected]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl6/igt@kms_async_flips@[email protected]
* igt@kms_fbcon_fbt@psr-suspend:
- shard-skl: [FAIL][72] ([i915#4767]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl1/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl6/igt@[email protected]
* igt@kms_flip@plain-flip-fb-recreate@a-edp1:
- shard-skl: [FAIL][74] ([i915#2122]) -> [PASS][75] +2 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl10/igt@kms_flip@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl1/igt@kms_flip@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes:
- shard-skl: [INCOMPLETE][76] ([i915#4939]) -> [PASS][77] +1 similar issue
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl7/igt@kms_plane@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl10/igt@kms_plane@[email protected]
* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: [SKIP][78] ([fdo#109441]) -> [PASS][79] +3 similar issues
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb3/igt@kms_psr@psr2_cursor_mmap_gtt.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
* igt@perf@blocking:
- shard-skl: [FAIL][80] ([i915#1542]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl6/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl6/igt@[email protected]
* igt@perf@polling-parameterized:
- shard-skl: [FAIL][82] ([i915#5639]) -> [PASS][83]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-skl7/igt@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-skl1/igt@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-idle@rcs0:
- shard-iclb: [WARN][84] ([i915#2684]) -> [FAIL][85] ([i915#2684])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb1/igt@i915_pm_rc6_residency@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb1/igt@i915_pm_rc6_residency@[email protected]
* igt@kms_psr2_sf@cursor-plane-move-continuous-exceed-sf:
- shard-iclb: [SKIP][86] ([i915#2920]) -> [SKIP][87] ([i915#658])
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb2/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb5/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area:
- shard-iclb: [SKIP][88] ([i915#2920]) -> [SKIP][89] ([fdo#111068] / [i915#658])
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb2/igt@[email protected]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb5/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb:
- shard-iclb: [SKIP][90] ([i915#658]) -> [SKIP][91] ([i915#2920]) +2 similar issues
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb6/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb2/igt@[email protected]
* igt@kms_psr2_su@page_flip-p010:
- shard-iclb: [FAIL][92] ([i915#5939]) -> [SKIP][93] ([fdo#109642] / [fdo#111068] / [i915#658])
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-iclb2/igt@kms_psr2_su@page_flip-p010.html
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-iclb4/igt@kms_psr2_su@page_flip-p010.html
* igt@runner@aborted:
- shard-apl: ([FAIL][94], [FAIL][95], [FAIL][96]) ([i915#180] / [i915#3002] / [i915#4312]) -> ([FAIL][97], [FAIL][98], [FAIL][99], [FAIL][100], [FAIL][101], [FAIL][102], [FAIL][103]) ([fdo#109271] / [i915#180] / [i915#3002] / [i915#4312])
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-apl2/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-apl6/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12222/shard-apl8/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl6/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl1/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl3/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl2/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl1/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl8/igt@[email protected]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109374v2/shard-apl8/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#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110254]: https://bugs.freedesktop.org/show_bug.cgi?id=110254
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#110725]: https://bugs.freedesktop.org/show_bug.cgi?id=110725
[fdo#111066]: https://bugs.freedesktop.org/show_bug.cgi?id=111066
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1063]: https://gitlab.freedesktop.org/drm/intel/issues/1063
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
[i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#1911]: https://gitlab.freedesktop.org/drm/intel/issues/1911
[i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2410]: https://gitlab.freedesktop.org/drm/intel/issues/2410
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2434]: https://gitlab.freedesktop.org/drm/intel/issues/2434
[i915#2435]: https://gitlab.freedesktop.org/drm/intel/issues/2435
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3371]: https://gitlab.freedesktop.org/drm/intel/issues/3371
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3938]: https://gitlab.freedesktop.org/drm/intel/issues/3938
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#4036]: https://gitlab.freedesktop.org/drm/intel/issues/4036
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4573]: https://gitlab.freedesktop.org/drm/intel/issues/4573
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4855]: https://gitlab.freedesktop.org/drm/intel/issues/4855
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4874]: https://gitlab.freedesktop.org/drm/intel/issues/4874
[i915#4877]: https://gitlab.freedesktop.org/drm/intel/issues/4877
[i915#4879]: https://gitlab.freedesktop.org/drm/intel/issues/4879
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#4883]: https://gitlab.freedesktop.org/drm/intel/issues/4883
[i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#4939]: https://gitlab.freedesktop.org/drm/intel/issues/4939
[i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
[i915#5030]: https://gitlab.freedesktop.org/drm/intel/issues/5030
[i915#5090]: https://gitlab.freedesktop.org/drm/intel/issues/5090
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5182]: https://gitlab.freedesktop.org/drm/intel/issues/5182
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5639]: https://gitlab.freedesktop.org/drm/intel/issues/5639
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5939]: https://gitlab.freedesktop.org/drm/intel/issues/5939
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6458]: https://gitlab.freedesktop.org/drm/intel/issues/6458
[i915#6463]: https://gitlab.freedesktop.org/drm/intel/issues/6463
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6987]: https://gitlab.freedesktop.org/drm/intel/issues/6987
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
Build changes
-------------
* Linux: CI_DRM_12222 -> Patchwork_109374v2
CI-20190529: 20190529
CI_DRM_12222: 6278acf81fd635214b7e310bb325c218e72e0349 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7001: d21216f0db39457717274d74b4d2e3db6683aa63 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109374v2: 6278acf81fd635214b7e310bb325c218e72e0349 @ 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_109374v2/index.html
Hi Andrzej,
Quoted 17 lines · Andrzej Hajda
This patchset should not modify behaviour of the code (except patch 3). It just replaces sequence of uncore read/modify/write with single call. Moreover it replaces nested pointers with alias if there is one. All patches except 3rd, were generated using coccinelle (quite ugly) and adjusted in some cases by hand.
v2:
- addressed comments by Andi, Jani and lkp,
- despite Jani objections Ive left 1st patch with hope he will change his mind, if not it can be safely ignored :),
- converted few more read/modifiy/write sequences in last patch,
- style adjustements to make checkpatch happy.Regards
Andrzej
Quoted 5 lines
Andrzej Hajda (4):
drm/i915/display: Usedrm_devicealias if defined drm/i915/display: Useintel_uncorealias if defined drm/i915: makeintel_uncore_rmw()write unconditionally drm/i915: use proper helper for register updates
Pushed in drm-intel-next
Thanks,
Andi
Quoted 16 lines
drivers/gpu/drm/i915/display/icl_dsi.c | 4 +- drivers/gpu/drm/i915/display/intel_display.c | 3 +- .../drm/i915/display/intel_display_debugfs.c | 2 +- drivers/gpu/drm/i915/display/intel_hotplug.c | 2 +- drivers/gpu/drm/i915/display/intel_lvds.c | 13 +- drivers/gpu/drm/i915/display/intel_opregion.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 9 +- drivers/gpu/drm/i915/display/vlv_dsi.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 237 +++++++----------- drivers/gpu/drm/i915/intel_pm.c | 60 ++--- drivers/gpu/drm/i915/intel_uncore.h | 8 +- drivers/gpu/drm/i915/vlv_suspend.c | 28 +-- 12 files changed, 133 insertions(+), 237 deletions(-)Signature · 1 line
2.34.1