]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: separate subplatform init and runtime feature init
authorJani Nikula <jani.nikula@intel.com>
Tue, 3 Oct 2023 12:42:10 +0000 (15:42 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 4 Oct 2023 09:41:42 +0000 (12:41 +0300)
Adjusting ->port_mask does not belong in
intel_device_info_subplatform_init(), but rather
intel_display_device_info_runtime_init().

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1035800e623e13d5e7baf1215b07e7cdad5eb764.1696336887.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_display_device.c
drivers/gpu/drm/i915/intel_device_info.c

index 11f4a6c54cc78272e3719a36ad55544faee171c6..9f0266318a413df13b28a90bbecc9cf026bcd070 100644 (file)
@@ -948,6 +948,13 @@ static void __intel_display_device_info_runtime_init(struct drm_i915_private *i9
        BUILD_BUG_ON(BITS_PER_TYPE(display_runtime->cpu_transcoder_mask) < I915_MAX_TRANSCODERS);
        BUILD_BUG_ON(BITS_PER_TYPE(display_runtime->port_mask) < I915_MAX_PORTS);
 
+       /* This covers both ULT and ULX */
+       if (IS_HASWELL_ULT(i915) || IS_BROADWELL_ULT(i915))
+               display_runtime->port_mask &= ~BIT(PORT_D);
+
+       if (IS_ICL_WITH_PORT_F(i915))
+               display_runtime->port_mask |= BIT(PORT_F);
+
        /* Wa_14011765242: adl-s A0,A1 */
        if (IS_ALDERLAKE_S(i915) && IS_DISPLAY_STEP(i915, STEP_A0, STEP_A2))
                for_each_pipe(i915, pipe)
index f0687776bb6d04a6c5428afff4024f5df3bfde57..64295e6702b02f2725324c31727c2d841b608c97 100644 (file)
@@ -27,7 +27,6 @@
 #include <drm/drm_print.h>
 #include <drm/i915_pciids.h>
 
-#include "display/intel_display_device.h"
 #include "gt/intel_gt_regs.h"
 #include "i915_drv.h"
 #include "i915_reg.h"
@@ -240,19 +239,15 @@ static void intel_device_info_subplatform_init(struct drm_i915_private *i915)
        if (find_devid(devid, subplatform_ult_ids,
                       ARRAY_SIZE(subplatform_ult_ids))) {
                mask = BIT(INTEL_SUBPLATFORM_ULT);
-               if (IS_HASWELL(i915) || IS_BROADWELL(i915))
-                       DISPLAY_RUNTIME_INFO(i915)->port_mask &= ~BIT(PORT_D);
        } else if (find_devid(devid, subplatform_ulx_ids,
                              ARRAY_SIZE(subplatform_ulx_ids))) {
                mask = BIT(INTEL_SUBPLATFORM_ULX);
                if (IS_HASWELL(i915) || IS_BROADWELL(i915)) {
                        /* ULX machines are also considered ULT. */
                        mask |= BIT(INTEL_SUBPLATFORM_ULT);
-                       DISPLAY_RUNTIME_INFO(i915)->port_mask &= ~BIT(PORT_D);
                }
        } else if (find_devid(devid, subplatform_portf_ids,
                              ARRAY_SIZE(subplatform_portf_ids))) {
-               DISPLAY_RUNTIME_INFO(i915)->port_mask |= BIT(PORT_F);
                mask = BIT(INTEL_SUBPLATFORM_PORTF);
        } else if (find_devid(devid, subplatform_uy_ids,
                           ARRAY_SIZE(subplatform_uy_ids))) {