1. 27 3月, 2019 4 次提交
  2. 25 3月, 2019 1 次提交
  3. 23 3月, 2019 3 次提交
  4. 19 3月, 2019 3 次提交
  5. 16 3月, 2019 1 次提交
  6. 13 3月, 2019 1 次提交
  7. 09 3月, 2019 1 次提交
  8. 05 3月, 2019 1 次提交
  9. 27 2月, 2019 4 次提交
  10. 21 2月, 2019 7 次提交
  11. 20 2月, 2019 1 次提交
    • U
      drm/i915: Attach colorspace property and enable modeset · 2f146b78
      Uma Shankar 提交于
      This patch attaches the colorspace connector property to the
      hdmi connector. Based on colorspace change, modeset will be
      triggered to switch to new colorspace.
      
      Based on colorspace property value create an infoframe
      with appropriate colorspace. This can be used to send an
      infoframe packet with proper colorspace value set which
      will help to enable wider color gamut like BT2020 on sink.
      
      This patch attaches and enables HDMI colorspace, DP will be
      taken care separately.
      
      v2: Merged the changes of creating infoframe as well to this
      patch as per Maarten's suggestion.
      
      v3: Addressed review comments from Shashank. Separated HDMI
      and DP colorspaces as suggested by Ville and Maarten.
      
      v4: Addressed Chris and Ville's review comments, and created a
      common colorspace property for DP and HDMI, filtered the list
      based on the colorspaces supported by the respective protocol
      standard. Handle the default case properly.
      
      v5: Merged the DP handling along with platform colorspace
      handling as per Shashank's comments.
      
      v6: Reverted to old design of exposing all colorspaces to
      userspace as per Ville's review comment
      
      v7: Fixed a checkpatch complaint, Addressed  Maarten' review
      comment, updated the RB from Maarten and Jani's ack.
      
      v8: Moved colorspace AVI Infoframe programming to drm core and
      removed from driver as per Ville's suggestion.
      
      v9: Added a check to only allow RGB colorpsaces to be set in
      infoframe though the colorspace property. Since there is no output
      csc property to control planar formats and it will be added later.
      Changes for RGB->YUV conversion inside driver without userspace
      knowledge is still supported. This is as per Ville's suggestion.
      
      v10: Fixed an error in if check.
      
      v11: Dropped the check for planar vs RGB and allow all the colorspaces.
      Onus will be on userspace to pick whatever pipe output it is able to
      drive.
      
      v12: Added Ville's RB.
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1550596381-993-4-git-send-email-uma.shankar@intel.com
      2f146b78
  12. 16 2月, 2019 1 次提交
  13. 13 2月, 2019 2 次提交
  14. 12 2月, 2019 1 次提交
    • L
      drm/i915: Block fbdev HPD processing during suspend · e8a8fedd
      Lyude Paul 提交于
      When resuming, we check whether or not any previously connected
      MST topologies are still present and if so, attempt to resume them. If
      this fails, we disable said MST topologies and fire off a hotplug event
      so that userspace knows to reprobe.
      
      However, sending a hotplug event involves calling
      drm_fb_helper_hotplug_event(), which in turn results in fbcon doing a
      connector reprobe in the caller's thread - something we can't do at the
      point in which i915 calls drm_dp_mst_topology_mgr_resume() since
      hotplugging hasn't been fully initialized yet.
      
      This currently causes some rather subtle but fatal issues. For example,
      on my T480s the laptop dock connected to it usually disappears during a
      suspend cycle, and comes back up a short while after the system has been
      resumed. This guarantees pretty much every suspend and resume cycle,
      drm_dp_mst_topology_mgr_set_mst(mgr, false); will be caused and in turn,
      a connector hotplug will occur. Now it's Rute Goldberg time: when the
      connector hotplug occurs, i915 reprobes /all/ of the connectors,
      including eDP. However, eDP probing requires that we power on the panel
      VDD which in turn, grabs a wakeref to the appropriate power domain on
      the GPU (on my T480s, this is the PORT_DDI_A_IO domain). This is where
      things start breaking, since this all happens before
      intel_power_domains_enable() is called we end up leaking the wakeref
      that was acquired and never releasing it later. Come next suspend/resume
      cycle, this causes us to fail to shut down the GPU properly, which
      causes it not to resume properly and die a horrible complicated death.
      
      (as a note: this only happens when there's both an eDP panel and MST
      topology connected which is removed mid-suspend. One or the other seems
      to always be OK).
      
      We could try to fix the VDD wakeref leak, but this doesn't seem like
      it's worth it at all since we aren't able to handle hotplug detection
      while resuming anyway. So, let's go with a more robust solution inspired
      by nouveau: block fbdev from handling hotplug events until we resume
      fbdev. This allows us to still send sysfs hotplug events to be handled
      later by user space while we're resuming, while also preventing us from
      actually processing any hotplug events we receive until it's safe.
      
      This fixes the wakeref leak observed on the T480s and as such, also
      fixes suspend/resume with MST topologies connected on this machine.
      
      Changes since v2:
      * Don't call drm_fb_helper_hotplug_event() under lock, do it after lock
        (Chris Wilson)
      * Don't call drm_fb_helper_hotplug_event() in
        intel_fbdev_output_poll_changed() under lock (Chris Wilson)
      * Always set ifbdev->hpd_waiting (Chris Wilson)
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Fixes: 0e32b39c ("drm/i915: add DP 1.2 MST support (v0.7)")
      Cc: Todd Previte <tprevite@gmail.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v3.17+
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190129191001.442-2-lyude@redhat.com
      (cherry picked from commit fe5ec656)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      e8a8fedd
  15. 09 2月, 2019 1 次提交
    • C
      drm/i915: Revoke mmaps and prevent access to fence registers across reset · 2caffbf1
      Chris Wilson 提交于
      Previously, we were able to rely on the recursive properties of
      struct_mutex to allow us to serialise revoking mmaps and reacquiring the
      FENCE registers with them being clobbered over a global device reset.
      I then proceeded to throw out the baby with the bath water in order to
      pursue a struct_mutex-less reset.
      
      Perusing LWN for alternative strategies, the dilemma on how to serialise
      access to a global resource on one side was answered by
      https://lwn.net/Articles/202847/ -- Sleepable RCU:
      
          1  int readside(void) {
          2      int idx;
          3      rcu_read_lock();
          4	   if (nomoresrcu) {
          5          rcu_read_unlock();
          6	       return -EINVAL;
          7      }
          8	   idx = srcu_read_lock(&ss);
          9	   rcu_read_unlock();
          10	   /* SRCU read-side critical section. */
          11	   srcu_read_unlock(&ss, idx);
          12	   return 0;
          13 }
          14
          15 void cleanup(void)
          16 {
          17     nomoresrcu = 1;
          18     synchronize_rcu();
          19     synchronize_srcu(&ss);
          20     cleanup_srcu_struct(&ss);
          21 }
      
      No more worrying about stop_machine, just an uber-complex mutex,
      optimised for reads, with the overhead pushed to the rare reset path.
      
      However, we do run the risk of a deadlock as we allocate underneath the
      SRCU read lock, and the allocation may require a GPU reset, causing a
      dependency cycle via the in-flight requests. We resolve that by declaring
      the driver wedged and cancelling all in-flight rendering.
      
      v2: Use expedited rcu barriers to match our earlier timing
      characteristics.
      v3: Try to annotate locking contexts for sparse
      v4: Reduce selftest lock duration to avoid a reset deadlock with fences
      v5: s/srcu/reset_backoff_srcu/
      v6: Remove more stale comments
      
      Testcase: igt/gem_mmap_gtt/hang
      Fixes: eb8d0f5a ("drm/i915: Remove GPU reset dependence on struct_mutex")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190208153708.20023-2-chris@chris-wilson.co.uk
      2caffbf1
  16. 08 2月, 2019 7 次提交
  17. 07 2月, 2019 1 次提交
    • L
      drm/i915: Block fbdev HPD processing during suspend · fe5ec656
      Lyude Paul 提交于
      When resuming, we check whether or not any previously connected
      MST topologies are still present and if so, attempt to resume them. If
      this fails, we disable said MST topologies and fire off a hotplug event
      so that userspace knows to reprobe.
      
      However, sending a hotplug event involves calling
      drm_fb_helper_hotplug_event(), which in turn results in fbcon doing a
      connector reprobe in the caller's thread - something we can't do at the
      point in which i915 calls drm_dp_mst_topology_mgr_resume() since
      hotplugging hasn't been fully initialized yet.
      
      This currently causes some rather subtle but fatal issues. For example,
      on my T480s the laptop dock connected to it usually disappears during a
      suspend cycle, and comes back up a short while after the system has been
      resumed. This guarantees pretty much every suspend and resume cycle,
      drm_dp_mst_topology_mgr_set_mst(mgr, false); will be caused and in turn,
      a connector hotplug will occur. Now it's Rute Goldberg time: when the
      connector hotplug occurs, i915 reprobes /all/ of the connectors,
      including eDP. However, eDP probing requires that we power on the panel
      VDD which in turn, grabs a wakeref to the appropriate power domain on
      the GPU (on my T480s, this is the PORT_DDI_A_IO domain). This is where
      things start breaking, since this all happens before
      intel_power_domains_enable() is called we end up leaking the wakeref
      that was acquired and never releasing it later. Come next suspend/resume
      cycle, this causes us to fail to shut down the GPU properly, which
      causes it not to resume properly and die a horrible complicated death.
      
      (as a note: this only happens when there's both an eDP panel and MST
      topology connected which is removed mid-suspend. One or the other seems
      to always be OK).
      
      We could try to fix the VDD wakeref leak, but this doesn't seem like
      it's worth it at all since we aren't able to handle hotplug detection
      while resuming anyway. So, let's go with a more robust solution inspired
      by nouveau: block fbdev from handling hotplug events until we resume
      fbdev. This allows us to still send sysfs hotplug events to be handled
      later by user space while we're resuming, while also preventing us from
      actually processing any hotplug events we receive until it's safe.
      
      This fixes the wakeref leak observed on the T480s and as such, also
      fixes suspend/resume with MST topologies connected on this machine.
      
      Changes since v2:
      * Don't call drm_fb_helper_hotplug_event() under lock, do it after lock
        (Chris Wilson)
      * Don't call drm_fb_helper_hotplug_event() in
        intel_fbdev_output_poll_changed() under lock (Chris Wilson)
      * Always set ifbdev->hpd_waiting (Chris Wilson)
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Fixes: 0e32b39c ("drm/i915: add DP 1.2 MST support (v0.7)")
      Cc: Todd Previte <tprevite@gmail.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v3.17+
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190129191001.442-2-lyude@redhat.com
      fe5ec656