1. 24 1月, 2019 1 次提交
  2. 21 1月, 2019 1 次提交
  3. 18 1月, 2019 1 次提交
  4. 17 1月, 2019 1 次提交
  5. 16 1月, 2019 2 次提交
    • L
      drm/i915: Pass down rc in intel_encoder->compute_config() · 204474a6
      Lyude Paul 提交于
      Something that I completely missed when implementing the new MST VCPI
      atomic helpers is that with those helpers, there's technically a chance
      of us having to grab additional modeset locks in ->compute_config() and
      furthermore, that means we have the potential to hit a normal modeset
      deadlock. However, because ->compute_config() only returns a bool this
      means we can't return -EDEADLK when we need to drop locks and try again
      which means we end up just failing the atomic check permanently. Whoops.
      
      So, fix this by modifying ->compute_config() to pass down an actual
      error code instead of a bool so that the atomic check can be restarted
      on modeset deadlocks.
      
      Thanks to Ville Syrjälä for pointing this out!
      
      Changes since v1:
      * Add some newlines
      * Return only -EINVAL from hsw_crt_compute_config()
      * Propogate return code from intel_dp_compute_dsc_params()
      * Change all of the intel_dp_compute_link_config*() variants
      * Don't miss if (hdmi_port_clock_valid()) branch in
        intel_hdmi_compute_config()
      
      [Cherry-picked from drm-misc-next to drm-intel-next-queued to fix
       linux-next & drm-tip conflict, while waiting for proper propagation of
       the DP MST series that this commit fixes. In hindsight, a topic branch
       might have been a better approach for it.]
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: eceae147 ("drm/dp_mst: Start tracking per-port VCPI allocations")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109320Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190115200800.3121-1-lyude@redhat.com
      (cherry picked from commit 96550555)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NDaniel Vetter <daniel@ffwll.ch>
      204474a6
    • L
      drm/i915: Pass down rc in intel_encoder->compute_config() · 96550555
      Lyude Paul 提交于
      Something that I completely missed when implementing the new MST VCPI
      atomic helpers is that with those helpers, there's technically a chance
      of us having to grab additional modeset locks in ->compute_config() and
      furthermore, that means we have the potential to hit a normal modeset
      deadlock. However, because ->compute_config() only returns a bool this
      means we can't return -EDEADLK when we need to drop locks and try again
      which means we end up just failing the atomic check permanently. Whoops.
      
      So, fix this by modifying ->compute_config() to pass down an actual
      error code instead of a bool so that the atomic check can be restarted
      on modeset deadlocks.
      
      Thanks to Ville Syrjälä for pointing this out!
      
      Changes since v1:
      * Add some newlines
      * Return only -EINVAL from hsw_crt_compute_config()
      * Propogate return code from intel_dp_compute_dsc_params()
      * Change all of the intel_dp_compute_link_config*() variants
      * Don't miss if (hdmi_port_clock_valid()) branch in
        intel_hdmi_compute_config()
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: eceae147 ("drm/dp_mst: Start tracking per-port VCPI allocations")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109320Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190115200800.3121-1-lyude@redhat.com
      96550555
  6. 15 1月, 2019 7 次提交
  7. 11 1月, 2019 1 次提交
    • L
      drm/dp_mst: Start tracking per-port VCPI allocations · eceae147
      Lyude Paul 提交于
      There has been a TODO waiting for quite a long time in
      drm_dp_mst_topology.c:
      
      	/* We cannot rely on port->vcpi.num_slots to update
      	 * topology_state->avail_slots as the port may not exist if the parent
      	 * branch device was unplugged. This should be fixed by tracking
      	 * per-port slot allocation in drm_dp_mst_topology_state instead of
      	 * depending on the caller to tell us how many slots to release.
      	 */
      
      That's not the only reason we should fix this: forcing the driver to
      track the VCPI allocations throughout a state's atomic check is
      error prone, because it means that extra care has to be taken with the
      order that drm_dp_atomic_find_vcpi_slots() and
      drm_dp_atomic_release_vcpi_slots() are called in in order to ensure
      idempotency. Currently the only driver actually using these helpers,
      i915, doesn't even do this correctly: multiple ->best_encoder() checks
      with i915's current implementation would not be idempotent and would
      over-allocate VCPI slots, something I learned trying to implement
      fallback retraining in MST.
      
      So: simplify this whole mess, and teach drm_dp_atomic_find_vcpi_slots()
      and drm_dp_atomic_release_vcpi_slots() to track the VCPI allocations for
      each port. This allows us to ensure idempotency without having to rely
      on the driver as much. Additionally: the driver doesn't need to do any
      kind of VCPI slot tracking anymore if it doesn't need it for it's own
      internal state.
      
      Additionally; this adds a new drm_dp_mst_atomic_check() helper which
      must be used by atomic drivers to perform validity checks for the new
      VCPI allocations incurred by a state.
      
      Also: update the documentation and make it more obvious that these
      /must/ be called by /all/ atomic drivers supporting MST.
      
      Changes since v9:
      * Add some missing changes that were requested by danvet that I forgot
        about after I redid all of the kref stuff:
        * Remove unnecessary state changes in intel_dp_mst_atomic_check
        * Cleanup atomic check logic for VCPI allocations - all we need to check in
          compute_config is whether or not this state disables a CRTC, then free
          VCPI based off that
      
      Changes since v8:
       * Fix compile errors, whoops!
      
      Changes since v7:
       - Don't check for mixed stale/valid VCPI allocations, just rely on
       connector registration to stop such erroneous modesets
      
      Changes since v6:
       - Keep a kref to all of the ports we have allocations on. This required
         a good bit of changing to when we call drm_dp_find_vcpi_slots(),
         mainly that we need to ensure that we only redo VCPI allocations on
         actual mode or CRTC changes, not crtc_state->active changes.
         Additionally, we no longer take the registration of the DRM connector
         for each port into account because so long as we have a kref to the
         port in the new or previous atomic state, the connector will stay
         registered.
       - Use the small changes to drm_dp_put_port() to add even more error
         checking to make misusage of the helpers more obvious. I added this
         after having to chase down various use-after-free conditions that
         started popping up from the new helpers so no one else has to
         troubleshoot that.
       - Move some accidental DRM_DEBUG_KMS() calls to DRM_DEBUG_ATOMIC()
       - Update documentation again, note that find/release() should both not be
         called on the same port in a single atomic check phase (but multiple
         calls to one or the other is OK)
      
      Changes since v4:
       - Don't skip the atomic checks for VCPI allocations if no new VCPI
         allocations happen in a state. This makes the next change I'm about
         to list here a lot easier to implement.
       - Don't ignore VCPI allocations on destroyed ports, instead ensure that
         when ports are destroyed and still have VCPI allocations in the
         topology state, the only state changes allowed are releasing said
         ports' VCPI. This prevents a state with a mix of VCPI allocations
         from destroyed ports, and allocations from valid ports.
      
      Changes since v3:
       - Don't release VCPI allocations in the topology state immediately in
         drm_dp_atomic_release_vcpi_slots(), instead mark them as 0 and skip
         over them in drm_dp_mst_duplicate_state(). This makes it so
         drm_dp_atomic_release_vcpi_slots() is still idempotent while also
         throwing warnings if the driver messes up it's book keeping and tries
         to release VCPI slots on a port that doesn't have any pre-existing
         VCPI allocation - danvet
       - Change mst_state/state in some debugging messages to "mst state"
      
      Changes since v2:
       - Use kmemdup() for duplicating MST state - danvet
       - Move port validation out of duplicate state callback - danvet
       - Handle looping through MST topology states in
         drm_dp_mst_atomic_check() so the driver doesn't have to do it
       - Fix documentation in drm_dp_atomic_find_vcpi_slots()
       - Move the atomic check for each individual topology state into it's
         own function, reduces indenting
       - Don't consider "stale" MST ports when calculating the bandwidth
         requirements. This is needed because originally we relied on the
         state duplication functions to prune any stale ports from the new
         state, which would prevent us from incorrectly considering their
         bandwidth requirements alongside legitimate new payloads.
       - Add function references in drm_dp_atomic_release_vcpi_slots() - danvet
       - Annotate atomic VCPI and atomic check functions with __must_check
         - danvet
      
      Changes since v1:
       - Don't use the now-removed ->atomic_check() for private objects hook,
         just give drivers a function to call themselves
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel@ffwll.ch>
      Cc: David Airlie <airlied@redhat.com>
      Cc: Jerry Zuo <Jerry.Zuo@amd.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Juston Li <juston.li@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-19-lyude@redhat.com
      eceae147
  8. 09 1月, 2019 1 次提交
  9. 03 1月, 2019 1 次提交
  10. 02 1月, 2019 1 次提交
  11. 31 12月, 2018 1 次提交
  12. 25 12月, 2018 1 次提交
  13. 21 12月, 2018 1 次提交
    • M
      drm/i915: Disable FBC on fastset if necessary, v2. · 50c42fc9
      Maarten Lankhorst 提交于
      Without this, we will get a dmesg-warn when enable_fbc is cleared on a fastset:
      WARN_ON(!crtc_state->enable_fbc)
      WARNING: CPU: 0 PID: 1090 at drivers/gpu/drm/i915/intel_fbc.c:1091 intel_fbc_enable+0x2ce/0x580 [i915]
      RIP: 0010:intel_fbc_enable+0x2ce/0x580 [i915]
      Call Trace:
       ? __mutex_unlock_slowpath+0x46/0x2b0
       intel_update_crtc+0x6f/0x2b0 [i915]
       skl_update_crtcs+0x1d1/0x2b0 [i915]
       intel_atomic_commit_tail+0x1ea/0xdb0 [i915]
       intel_atomic_commit+0x244/0x330 [i915]
       drm_mode_atomic_ioctl+0x85d/0x950
       ? drm_atomic_set_property+0x970/0x970
       drm_ioctl_kernel+0x81/0xf0
       drm_ioctl+0x2de/0x390
       ? drm_atomic_set_property+0x970/0x970
       ? __handle_mm_fault+0x81b/0xfc0
       do_vfs_ioctl+0xa0/0x6e0
       ? __do_page_fault+0x2a5/0x550
       ksys_ioctl+0x35/0x60
       __x64_sys_ioctl+0x11/0x20
       do_syscall_64+0x55/0x190
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Changes since v1:
      - Move intel_fbc_disable to intel_update_crtc() (Hans)
      
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181220151719.30586-1-maarten.lankhorst@linux.intel.comReviewed-by: NHans de Goede <hdegoede@redhat.com>
      50c42fc9
  14. 18 12月, 2018 1 次提交
    • H
      drm/i915: Update crtc scaler settings when update_pipe is set · 2c5c415c
      Hans de Goede 提交于
      When the pipe_config's update_pipe flag is set we may need to update the
      panel fitting settings. On GEN9+ this means we need to update the crtc's
      scaler settings.
      
      This fixes the following WARN_ON, during i915 loading on an Asrock
      B150M Pro4S/D3 board with an i5-6500 CPU / graphics:
      
      [drm:pipe_config_err [i915]] *ERROR* mismatch in pch_pfit.enabled
       (expected no, found yes)
      pipe state doesn't match!
      WARNING: CPU: 3 PID: 305 at drivers/gpu/drm/i915/intel_display.c:12084
      
      With line 12084 being the I915_STATE_WARN call inside the
      "if (!intel_pipe_config_compare())" block in verify_crtc_state().
      
      On this board with 2 1920x1080 monitors connected over HDMI the GOP
      initializes both monitors at 1920x1080 and despite no scaling being
      necessary configures a scaler for one of them.
      
      When booting with fastboot=1 on the initial modeset needs_modeset will
      be false while update_pipe is true. Since we were not calling
      skl_update_scaler_crtc() in this case we would leave the scaler enabled
      causing this error.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181217141903.4182-1-hdegoede@redhat.com
      2c5c415c
  15. 13 12月, 2018 2 次提交
  16. 11 12月, 2018 2 次提交
  17. 05 12月, 2018 1 次提交
  18. 04 12月, 2018 2 次提交
  19. 03 12月, 2018 4 次提交
  20. 30 11月, 2018 4 次提交
  21. 29 11月, 2018 4 次提交