drm/i915: move snps_phy_failed_calibration to display sub-struct under snps
authorJani Nikula <jani.nikula@intel.com>
Tue, 17 Jan 2023 14:39:44 +0000 (16:39 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 18 Jan 2023 10:17:03 +0000 (12:17 +0200)
Move the display related member to the struct drm_i915_private display
sub-struct.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230117143946.2426043-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display_core.h
drivers/gpu/drm/i915/display/intel_snps_phy.c
drivers/gpu/drm/i915/i915_drv.h

index 1f5a471a0adf277034f4bcf96f3254707ac09548..0034a43f56e51592984357125490b8a90ab0f4c7 100644 (file)
@@ -4323,7 +4323,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
        }
 
        if (intel_phy_is_snps(dev_priv, phy) &&
-           dev_priv->snps_phy_failed_calibration & BIT(phy)) {
+           dev_priv->display.snps.phy_failed_calibration & BIT(phy)) {
                drm_dbg_kms(&dev_priv->drm,
                            "SNPS PHY %c failed to calibrate, proceeding anyway\n",
                            phy_name(phy));
index 57ddce3ba02b397eeb21bb59bef53b139b85c81b..2e85dd0ef4b536aa39f9d66a4bd2dfdf320ddf41 100644 (file)
@@ -428,6 +428,14 @@ struct intel_display {
                u32 block_time_us;
        } sagv;
 
+       struct {
+               /*
+                * DG2: Mask of PHYs that were not calibrated by the firmware
+                * and should not be used.
+                */
+               u8 phy_failed_calibration;
+       } snps;
+
        struct {
                /* ordered wq for modesets */
                struct workqueue_struct *modeset;
index 9494cfd45519016e2174bedbc97c46f3442b2c02..c65c771f5c461f018bcc4620809782571109eea0 100644 (file)
@@ -40,7 +40,7 @@ void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
                 */
                if (intel_de_wait_for_clear(i915, DG2_PHY_MISC(phy),
                                            DG2_PHY_DP_TX_ACK_MASK, 25))
-                       i915->snps_phy_failed_calibration |= BIT(phy);
+                       i915->display.snps.phy_failed_calibration |= BIT(phy);
        }
 }
 
index 83bc69892a861d212e055343f0e5f4b0847d1f42..bedcd0891c48c8853248eed519e7a148981986b5 100644 (file)
@@ -381,12 +381,6 @@ struct drm_i915_private {
 
        bool irq_enabled;
 
-       /*
-        * DG2: Mask of PHYs that were not calibrated by the firmware
-        * and should not be used.
-        */
-       u8 snps_phy_failed_calibration;
-
        struct i915_pmu pmu;
 
        struct i915_drm_clients clients;