1. 11 1月, 2019 1 次提交
  2. 10 12月, 2018 1 次提交
  3. 12 11月, 2018 1 次提交
  4. 10 11月, 2018 2 次提交
  5. 08 11月, 2018 1 次提交
  6. 19 10月, 2018 1 次提交
    • L
      drm/atomic_helper: Stop modesets on unregistered connectors harder · de9f8eea
      Lyude Paul 提交于
      Unfortunately, it appears our fix in:
      commit b5d29843 ("drm/atomic_helper: Allow DPMS On<->Off changes
      for unregistered connectors")
      
      Which attempted to work around the problems introduced by:
      commit 4d802739 ("drm/atomic_helper: Disallow new modesets on
      unregistered connectors")
      
      Is still not the right solution, as modesets can still be triggered
      outside of drm_atomic_set_crtc_for_connector().
      
      So in order to fix this, while still being careful that we don't break
      modesets that a driver may perform before being registered with
      userspace, we replace connector->registered with a tristate member,
      connector->registration_state. This allows us to keep track of whether
      or not a connector is still initializing and hasn't been exposed to
      userspace, is currently registered and exposed to userspace, or has been
      legitimately removed from the system after having once been present.
      
      Using this info, we can prevent userspace from performing new modesets
      on unregistered connectors while still allowing the driver to perform
      modesets on unregistered connectors before the driver has finished being
      registered.
      
      Changes since v1:
      - Fix WARN_ON() in drm_connector_cleanup() that CI caught with this
        patchset in igt@drv_module_reload@basic-reload-inject and
        igt@drv_module_reload@basic-reload by checking if the connector is
        registered instead of unregistered, as calling drm_connector_cleanup()
        on a connector that hasn't been registered with userspace yet should
        stay valid.
      - Remove unregistered_connector_check(), and just go back to what we
        were doing before in commit 4d802739 ("drm/atomic_helper: Disallow
        new modesets on unregistered connectors") except replacing
        READ_ONCE(connector->registered) with drm_connector_is_unregistered().
        This gets rid of the behavior of allowing DPMS On<->Off, but that should
        be fine as it's more consistent with the UAPI we had before - danvet
      - s/drm_connector_unregistered/drm_connector_is_unregistered/ - danvet
      - Update documentation, fix some typos.
      
      Fixes: b5d29843 ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors")
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: stable@vger.kernel.org
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181016203946.9601-1-lyude@redhat.com
      (cherry picked from commit 39b50c60)
      Fixes: e9655095 ("drm/atomic_helper: Disallow new modesets on unregistered connectors")
      Fixes: 34ca26a9 ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors")
      Cc: stable@vger.kernel.org
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      de9f8eea
  7. 18 10月, 2018 4 次提交
    • L
      drm/i915: Fix intel_dp_mst_best_encoder() · 4bbf0d47
      Lyude Paul 提交于
      Currently, i915 appears to rely on blocking modesets on
      no-longer-present MSTB ports by simply returning NULL for
      ->best_encoder(), which in turn causes any new atomic commits that don't
      disable the CRTC to fail. This is wrong however, since we still want to
      allow userspace to disable CRTCs on no-longer-present MSTB ports by
      changing the DPMS state to off and this still requires that we retrieve
      an encoder.
      
      So, fix this by always returning a valid encoder regardless of the state
      of the MST port.
      
      Changes since v1:
      - Remove mst atomic helper, since this got replaced with a much simpler
        solution
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-6-lyude@redhat.com
      (cherry picked from commit a9f9ca33)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      4bbf0d47
    • L
      drm/i915: Skip vcpi allocation for MSTB ports that are gone · c02ba4ef
      Lyude Paul 提交于
      Since we need to be able to allow DPMS on->off prop changes after an MST
      port has disappeared from the system, we need to be able to make sure we
      can compute a config for the resulting atomic commit. Currently this is
      impossible when the port has disappeared, since the VCPI slot searching
      we try to do in intel_dp_mst_compute_config() will fail with -EINVAL.
      
      Since the only commits we want to allow on no-longer-present MST ports
      are ones that shut off display hardware, we already know that no VCPI
      allocations are needed. So, hardcode the VCPI slot count to 0 when
      intel_dp_mst_compute_config() is called on an MST port that's gone.
      
      Changes since V4:
      - Don't use mst_port_gone at all, just check whether or not the drm
        connector is registered - Daniel Vetter
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-5-lyude@redhat.com
      (cherry picked from commit f67207d7)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      c02ba4ef
    • L
      drm/i915: Don't unset intel_connector->mst_port · 80c18869
      Lyude Paul 提交于
      Currently we set intel_connector->mst_port to NULL to signify that the
      MST port has been removed from the system so that we can prevent further
      action on the port such as connector probes, mode probing, etc.
      However, we're going to need access to intel_connector->mst_port in
      order to fixup ->best_encoder() so that it can always return the correct
      encoder for an MST port to prevent legacy DPMS prop changes from
      failing. This should be safe, so instead keep intel_connector->mst_port
      always set and instead just check the status of
      drm_connector->regustered to signify whether or not the connector has
      disappeared from the system.
      
      Changes since v2:
      - Add a comment to mst_port_gone (Jani Nikula)
      - Change mst_port_gone to a u8 instead of a bool, per the kernel bot.
        Apparently bool is discouraged in structs these days
      Changes since v4:
      - Don't use mst_port_gone at all! Just check if the connector is
        registered or not - Daniel Vetter
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-4-lyude@redhat.com
      (cherry picked from commit 6ed5bb1f)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      80c18869
    • L
      drm/atomic_helper: Stop modesets on unregistered connectors harder · 39b50c60
      Lyude Paul 提交于
      Unfortunately, it appears our fix in:
      commit b5d29843 ("drm/atomic_helper: Allow DPMS On<->Off changes
      for unregistered connectors")
      
      Which attempted to work around the problems introduced by:
      commit 4d802739 ("drm/atomic_helper: Disallow new modesets on
      unregistered connectors")
      
      Is still not the right solution, as modesets can still be triggered
      outside of drm_atomic_set_crtc_for_connector().
      
      So in order to fix this, while still being careful that we don't break
      modesets that a driver may perform before being registered with
      userspace, we replace connector->registered with a tristate member,
      connector->registration_state. This allows us to keep track of whether
      or not a connector is still initializing and hasn't been exposed to
      userspace, is currently registered and exposed to userspace, or has been
      legitimately removed from the system after having once been present.
      
      Using this info, we can prevent userspace from performing new modesets
      on unregistered connectors while still allowing the driver to perform
      modesets on unregistered connectors before the driver has finished being
      registered.
      
      Changes since v1:
      - Fix WARN_ON() in drm_connector_cleanup() that CI caught with this
        patchset in igt@drv_module_reload@basic-reload-inject and
        igt@drv_module_reload@basic-reload by checking if the connector is
        registered instead of unregistered, as calling drm_connector_cleanup()
        on a connector that hasn't been registered with userspace yet should
        stay valid.
      - Remove unregistered_connector_check(), and just go back to what we
        were doing before in commit 4d802739 ("drm/atomic_helper: Disallow
        new modesets on unregistered connectors") except replacing
        READ_ONCE(connector->registered) with drm_connector_is_unregistered().
        This gets rid of the behavior of allowing DPMS On<->Off, but that should
        be fine as it's more consistent with the UAPI we had before - danvet
      - s/drm_connector_unregistered/drm_connector_is_unregistered/ - danvet
      - Update documentation, fix some typos.
      
      Fixes: b5d29843 ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors")
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: stable@vger.kernel.org
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181016203946.9601-1-lyude@redhat.com
      39b50c60
  8. 15 10月, 2018 1 次提交
  9. 10 10月, 2018 1 次提交
  10. 09 10月, 2018 3 次提交
    • L
      drm/i915: Fix intel_dp_mst_best_encoder() · a9f9ca33
      Lyude Paul 提交于
      Currently, i915 appears to rely on blocking modesets on
      no-longer-present MSTB ports by simply returning NULL for
      ->best_encoder(), which in turn causes any new atomic commits that don't
      disable the CRTC to fail. This is wrong however, since we still want to
      allow userspace to disable CRTCs on no-longer-present MSTB ports by
      changing the DPMS state to off and this still requires that we retrieve
      an encoder.
      
      So, fix this by always returning a valid encoder regardless of the state
      of the MST port.
      
      Changes since v1:
      - Remove mst atomic helper, since this got replaced with a much simpler
        solution
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-6-lyude@redhat.com
      a9f9ca33
    • L
      drm/i915: Skip vcpi allocation for MSTB ports that are gone · f67207d7
      Lyude Paul 提交于
      Since we need to be able to allow DPMS on->off prop changes after an MST
      port has disappeared from the system, we need to be able to make sure we
      can compute a config for the resulting atomic commit. Currently this is
      impossible when the port has disappeared, since the VCPI slot searching
      we try to do in intel_dp_mst_compute_config() will fail with -EINVAL.
      
      Since the only commits we want to allow on no-longer-present MST ports
      are ones that shut off display hardware, we already know that no VCPI
      allocations are needed. So, hardcode the VCPI slot count to 0 when
      intel_dp_mst_compute_config() is called on an MST port that's gone.
      
      Changes since V4:
      - Don't use mst_port_gone at all, just check whether or not the drm
        connector is registered - Daniel Vetter
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-5-lyude@redhat.com
      f67207d7
    • L
      drm/i915: Don't unset intel_connector->mst_port · 6ed5bb1f
      Lyude Paul 提交于
      Currently we set intel_connector->mst_port to NULL to signify that the
      MST port has been removed from the system so that we can prevent further
      action on the port such as connector probes, mode probing, etc.
      However, we're going to need access to intel_connector->mst_port in
      order to fixup ->best_encoder() so that it can always return the correct
      encoder for an MST port to prevent legacy DPMS prop changes from
      failing. This should be safe, so instead keep intel_connector->mst_port
      always set and instead just check the status of
      drm_connector->regustered to signify whether or not the connector has
      disappeared from the system.
      
      Changes since v2:
      - Add a comment to mst_port_gone (Jani Nikula)
      - Change mst_port_gone to a u8 instead of a bool, per the kernel bot.
        Apparently bool is discouraged in structs these days
      Changes since v4:
      - Don't use mst_port_gone at all! Just check if the connector is
        registered or not - Daniel Vetter
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-4-lyude@redhat.com
      6ed5bb1f
  11. 19 9月, 2018 1 次提交
  12. 04 9月, 2018 1 次提交
  13. 01 9月, 2018 1 次提交
  14. 26 7月, 2018 1 次提交
  15. 21 7月, 2018 1 次提交
  16. 14 7月, 2018 2 次提交
  17. 05 7月, 2018 1 次提交
  18. 29 6月, 2018 1 次提交
  19. 19 6月, 2018 1 次提交
  20. 14 6月, 2018 1 次提交
  21. 08 4月, 2018 1 次提交
    • L
      drm/i915/dp: Send DPCD ON for MST before phy_up · be1c63c8
      Lyude Paul 提交于
      When doing a modeset where the sink is transitioning from D3 to D0 , it
      would sometimes be possible for the initial power_up_phy() to start
      timing out. This would only be observed in the last action before the
      sink went into D3 mode was intel_dp_sink_dpms(DRM_MODE_DPMS_OFF). We
      originally thought this might be an issue with us accidentally shutting
      off the aux block when putting the sink into D3, but since the DP spec
      mandates that sinks must wake up within 1ms while we have 100ms to
      respond to an ESI irq, this didn't really add up. Turns out that the
      problem is more subtle then that:
      
      It turns out that the timeout is from us not enabling DPMS on the MST
      hub before actually trying to initiate sideband communications. This
      would cause the first sideband communication (power_up_phy()), to start
      timing out because the sink wasn't ready to respond. Afterwards, we
      would call intel_dp_sink_dpms(DRM_MODE_DPMS_ON) in
      intel_ddi_pre_enable_dp(), which would actually result in waking up the
      sink so that sideband requests would work again.
      
      Since DPMS is what lets us actually bring the hub up into a state where
      sideband communications become functional again, we just need to make
      sure to enable DPMS on the display before attempting to perform sideband
      communications.
      
      Changes since v1:
      - Remove comment above if (!intel_dp->is_mst) - vsryjala
      - Move intel_dp_sink_dpms() for MST into intel_dp_post_disable_mst() to
        keep enable/disable paths symmetrical
      - Improve commit message - dhnkrn
      Changes since v2:
      - Only send DPMS off when we're disabling the last sink, and only send
        DPMS on when we're enabling the first sink - dhnkrn
      Changes since v3:
      - Check against is_mst, not intel_dp->is_mst - dhnkrn/vsyrjala
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NLaura Abbott <labbott@redhat.com>
      Cc: stable@vger.kernel.org
      Fixes: ad260ab3 ("drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.")
      Link: https://patchwork.freedesktop.org/patch/msgid/20180407011053.22437-1-lyude@redhat.com
      be1c63c8
  22. 10 11月, 2017 1 次提交
    • V
      drm/i915: Nuke intel_digital_port->port · 8f4f2797
      Ville Syrjälä 提交于
      Remove intel_digital_port->port and replace its users with
      intel_encoder->port. intel_encoder->port is a superset of
      intel_digital_port->port, and it works correctly even for
      MST encoders.
      
      v2: Eliminate a few dp_to_dig_port()->base.port cases too (DK)
      
      Performed with cocci:
      @@
      @@
      struct intel_digital_port {
             ...
      -       enum port port;
             ...
      }
      
      @@
      struct intel_digital_port *D;
      expression E;
      @@
      - D->port = E;
      
      @@
      struct intel_digital_port *D;
      @@
      - D->port
      + D->base.port
      
      @
      expression E;
      @@
      (
      - dp_to_dig_port(E)->port
      + dp_to_dig_port(E)->base.port
      |
      - enc_to_dig_port(E)->port
      + to_intel_encoder(E)->port
      )
      
      @@
      expression E;
      @@
      - to_intel_encoder(&E->base)
      + E
      
      @@
      struct intel_digital_port *D;
      identifier I, M;
      @@
        I = &D->base
      <...
      (
      - D->base.M
      + I->M
      |
      - &D->base
      + I
      )
      ...>
      
      @@
      identifier D;
      expression E;
      identifier M;
      @@
       D = enc_to_dig_port(&E->base)
      <...
      (
      - D->base.M
      + E->M
      |
      - &D->base
      + E
      )
      ...>
      
      @@
      identifier D, DP;
      expression E;
      identifier M;
      @@
       DP = enc_to_intel_dp(&E->base)
      <...
      (
      - dp_to_dig_port(DP)->base.M
      + E->M
      |
      - &dp_to_dig_port(DP)->base
      + E
      )
      ...>
      
      @@
      expression E;
      identifier M;
      @@
      (
      - enc_to_dig_port(&E->base)->base.M
      + E->M
      |
      - enc_to_dig_port(&E->base)->base
      + E
      |
      - enc_to_mst(&E->base)->primary->base.port
      + E->port
      )
      
      @@
      expression E;
      identifier D;
      @@
      - struct intel_digital_port *D = E;
      ... when != D
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171109152434.32074-1-ville.syrjala@linux.intel.com
      8f4f2797
  23. 01 11月, 2017 1 次提交
  24. 31 10月, 2017 3 次提交
  25. 28 10月, 2017 1 次提交
  26. 25 10月, 2017 1 次提交
    • V
      drm/i915: Adjust system agent voltage on CNL if required by DDI ports · 53e9bf5e
      Ville Syrjälä 提交于
      On CNL we may need to bump up the system agent voltage not only due
      to CDCLK but also when driving DDI port with a sufficiently high clock.
      To that end start tracking the minimum acceptable voltage for each crtc.
      We do the tracking via crtcs because we don't have any kind of encoder
      state. Also there's no downside to doing it this way, and it matches how
      we track cdclk requirements on account of pixel rate.
      
      v2: Allow disabled crtcs to use the min voltage
          Add IS_CNL check to intel_ddi_compute_min_voltage() since
          we're using CNL specific values there
          s/intel_compute_min_voltage/cnl_compute_min_voltage/ since
          the function makes hw specific assumptions about the voltage
          values
      v3: Drop the test hack leftovers from skl_modeset_calc_cdclk()
      v4: s/voltage/voltage_level/ (Rodrigo)
          Replace DPLL DVFS FIXMEs with an explanation why we don't
          do anything there (Rodrigo)
      
      Cc: Mika Kahola <mika.kahola@intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171024095216.1638-9-ville.syrjala@linux.intel.com
      53e9bf5e
  27. 17 10月, 2017 1 次提交
  28. 13 10月, 2017 1 次提交
  29. 05 10月, 2017 1 次提交
  30. 25 9月, 2017 2 次提交