1. 14 6月, 2019 1 次提交
  2. 04 6月, 2019 1 次提交
    • U
      drm: Fix docbook warnings in hdr metadata helper structures · a09db883
      Uma Shankar 提交于
      Fixes the following warnings:
      ./include/drm/drm_mode_config.h:841: warning: Incorrect use of
      kernel-doc format:          * hdr_output_metadata_property: Connector
      property containing hdr
      ./include/drm/drm_mode_config.h:918: warning: Function parameter or member 'hdr_output_metadata_property' not described in 'drm_mode_config'
      ./include/drm/drm_connector.h:1251: warning: Function parameter or member 'hdr_output_metadata' not described in 'drm_connector'
      ./include/drm/drm_connector.h:1251: warning: Function parameter or member 'hdr_sink_metadata' not described in 'drm_connector'
      
      Also adds some property documentation for HDR Metadata Connector
      Property in connector property create function.
      
      v2: Fixed Sean Paul's review comments.
      
      v3: Fixed Daniel Vetter's review comments, added the UAPI structure
      definition section in kernel docs.
      
      v4: Fixed Daniel Vetter's review comments.
      
      v5: Added structure member references as per Daniel's suggestion.
      
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Ville Syrjä <ville.syrjala@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: "Ville Syrjä" <ville.syrjala@linux.intel.com>
      Cc: Hans Verkuil <hansverk@cisco.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-fbdev@vger.kernel.org
      Reviewed-by: Sean Paul <sean@poorly.run> (v1)
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      [danvet: Fix up markup: () for functions, & for structs. Style guide
      also recommends to prepend struct for structures.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/1559647022-7336-1-git-send-email-uma.shankar@intel.com
      a09db883
  3. 03 6月, 2019 1 次提交
  4. 23 5月, 2019 1 次提交
    • U
      drm: Add HDR source metadata property · fbb5d035
      Uma Shankar 提交于
      This patch adds a blob property to get HDR metadata
      information from userspace. This will be send as part
      of AVI Infoframe to panel.
      
      It also implements get() and set() functions for HDR output
      metadata property.The blob data is received from userspace and
      saved in connector state, the same is returned as blob in get
      property call to userspace.
      
      v2: Rebase and modified the metadata structure elements
      as per Ville's POC changes.
      
      v3: No Change
      
      v4: Addressed Shashank's review comments
      
      v5: Rebase.
      
      v6: Addressed Brian Starkey's review comments, defined
      new structure with header for dynamic metadata scalability.
      Merge get/set property functions for metadata in this patch.
      
      v7: Addressed Jonas Karlman review comments and defined separate
      structure for infoframe to better align with CTA 861.G spec. Added
      Shashank's RB.
      
      v8: Addressed Ville's review comments. Moved sink metadata structure
      out of uapi headers as suggested by Jonas Karlman.
      
      v9: Rebase and addressed Jonas Karlman review comments.
      
      v10: Addressed Ville's review comments, dropped the metdata_changed
      state variable as its not needed anymore.
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      Reviewed-by: NShashank Sharma <shashank.sharma@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1558015817-12025-2-git-send-email-uma.shankar@intel.com
      fbb5d035
  5. 09 5月, 2019 2 次提交
  6. 07 5月, 2019 1 次提交
  7. 27 3月, 2019 3 次提交
  8. 18 3月, 2019 2 次提交
  9. 20 2月, 2019 1 次提交
    • U
      drm: Add HDMI colorspace property · d2c6a405
      Uma Shankar 提交于
      Create a new connector property to program colorspace to sink
      devices. Modern sink devices support more than 1 type of
      colorspace like 601, 709, BT2020 etc. This helps to switch
      based on content type which is to be displayed. The decision
      lies with compositors as to in which scenarios, a particular
      colorspace will be picked.
      
      This will be helpful mostly to switch to higher gamut colorspaces
      like BT2020 when the media content is encoded as BT2020. Thereby
      giving a good visual experience to users.
      
      The expectation from userspace is that it should parse the EDID
      and get supported colorspaces. Use this property and switch to the
      one supported. Sink supported colorspaces should be retrieved by
      userspace from EDID and driver will not explicitly expose them.
      
      Basically the expectation from userspace is:
       - Set up CRTC DEGAMMA/CTM/GAMMA to convert to some sink
         colorspace
       - Set this new property to let the sink know what it
         converted the CRTC output to.
      
      v2: Addressed Maarten and Ville's review comments. Enhanced
      the colorspace enum to incorporate both HDMI and DP supported
      colorspaces. Also, added a default option for colorspace.
      
      v3: Removed Adobe references from enum definitions as per
      Ville, Hans Verkuil and Jonas Karlman suggestions. Changed
      Default to an unset state where driver will assign the colorspace
      is not chosen by user, suggested by Ville and Maarten. Addressed
      other misc review comments from Maarten. Split the changes to
      have separate colorspace property for DP and HDMI.
      
      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.
      
      v5: Made the property creation helper accept enum list based on
      platform capabilties as suggested by Shashank. Consolidated HDMI
      and DP property creation in the common helper.
      
      v6: Addressed Shashank's review comments.
      
      v7: Added defines instead of enum in uapi as per Brian Starkey's
      suggestion in order to go with string matching at userspace. Updated
      the commit message to add more details as well kernel docs.
      
      v8: Addressed Maarten's review comments.
      
      v9: Removed macro defines from uapi as per Brian Starkey and Daniel
      Stone's comments and moved to drm include file. Moved back to older
      design with exposing all HDMI colorspaces to userspace since infoframe
      capability is there even on legacy platforms, as per Ville's review
      comments.
      
      v10: Fixed sparse warnings, updated the RB from Maarten and Jani's ack.
      
      v11: Addressed Ville's review comments. Updated the Macro naming and
      added DCI-P3 colorspace as well, defined in CTA 861.G spec.
      
      v12: Appended BT709 and SMPTE 170M with YCC information as per Ville's
      review comment to be clear and not to be confused with RGB.
      
      v13: Reorder the colorspace macros.
      
      v14: Removed DP as of now, will be added later once full support is
      enabled, as per Ville's suggestion. Added Ville's RB.
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NShashank Sharma <shashank.sharma@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-2-git-send-email-uma.shankar@intel.com
      d2c6a405
  10. 04 2月, 2019 1 次提交
  11. 11 1月, 2019 1 次提交
  12. 19 12月, 2018 2 次提交
  13. 29 11月, 2018 1 次提交
  14. 25 11月, 2018 1 次提交
  15. 03 11月, 2018 1 次提交
    • R
      drm: Add connector property to limit max bpc · 47e22ff1
      Radhakrishna Sripada 提交于
      At times 12bpc HDMI cannot be driven due to faulty cables, dongles
      level shifters etc. To workaround them we may need to drive the output
      at a lower bpc. Currently the user space does not have a way to limit
      the bpc. The default bpc to be programmed is decided by the driver and
      is run against connector limitations.
      
      Creating a new connector property "max bpc" in order to limit the bpc.
      xrandr can make use of this connector property to make sure that bpc does
      not exceed the configured value. This property can be used by userspace to
      set the bpc.
      
      V2: Initialize max_bpc to satisfy kms_properties
      V3: Move the property to drm_connector
      V4: Split drm and i915 components(Ville)
      V5: Make the property per connector(Ville)
      V6: Compare the requested bpc to connector bpc(Daniel)
          Move the attach_property function to core(Ville)
      V7: Fix checkpatch warnings
      V8: Simplify the connector check code(Ville)
      V9: Const display_info(Ville)
      V10,V11: Fix CI issues.
      V12: Add the Kernel documentation(Daniel)
      V14: Crossreference the function name in the doc(Daniel)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Kishore Kadiyala <kishore.kadiyala@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Sunpeng Li <sunpeng.li@amd.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181012184233.29250-1-radhakrishna.sripada@intel.com
      47e22ff1
  16. 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
  17. 18 10月, 2018 1 次提交
    • 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
  18. 05 10月, 2018 1 次提交
  19. 09 9月, 2018 1 次提交
  20. 14 7月, 2018 5 次提交
  21. 10 7月, 2018 1 次提交
  22. 05 7月, 2018 2 次提交
  23. 02 7月, 2018 1 次提交
  24. 20 6月, 2018 2 次提交
    • B
      drm: writeback: Add out-fences for writeback connectors · b13cc8dd
      Brian Starkey 提交于
      Add the WRITEBACK_OUT_FENCE_PTR property to writeback connectors, to
      enable userspace to get a fence which will signal once the writeback is
      complete. It is not allowed to request an out-fence without a
      framebuffer attached to the connector.
      
      A timeline is added to drm_writeback_connector for use by the writeback
      out-fences.
      
      In the case of a commit failure or DRM_MODE_ATOMIC_TEST_ONLY, the fence
      is set to -1.
      
      Changes from v2:
       - Rebase onto Gustavo Padovan's v9 explicit sync series
       - Change out_fence_ptr type to s32 __user *
       - Set *out_fence_ptr to -1 in drm_atomic_connector_set_property
       - Store fence in drm_writeback_job
       Gustavo Padovan:
       - Move out_fence_ptr out of connector_state
       - Signal fence from drm_writeback_signal_completion instead of
         in driver directly
      
      Changes from v3:
       - Rebase onto commit 7e9081c5 ("drm/fence: fix memory overwrite
         when setting out_fence fd") (change out_fence_ptr to s32 __user *,
         for real this time.)
       - Update documentation around WRITEBACK_OUT_FENCE_PTR
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/229036/
      b13cc8dd
    • B
      drm: Add writeback connector type · 935774cd
      Brian Starkey 提交于
      Writeback connectors represent writeback engines which can write the
      CRTC output to a memory framebuffer. Add a writeback connector type and
      related support functions.
      
      Drivers should initialize a writeback connector with
      drm_writeback_connector_init() which takes care of setting up all the
      writeback-specific details on top of the normal functionality of
      drm_connector_init().
      
      Writeback connectors have a WRITEBACK_FB_ID property, used to set the
      output framebuffer, and a WRITEBACK_PIXEL_FORMATS blob used to expose the
      supported writeback formats to userspace.
      
      When a framebuffer is attached to a writeback connector with the
      WRITEBACK_FB_ID property, it is used only once (for the commit in which
      it was included), and userspace can never read back the value of
      WRITEBACK_FB_ID. WRITEBACK_FB_ID can only be set if the connector is
      attached to a CRTC.
      
      Changes since v1:
       - Added drm_writeback.c + documentation
       - Added helper to initialize writeback connector in one go
       - Added core checks
       - Squashed into a single commit
       - Dropped the client cap
       - Writeback framebuffers are no longer persistent
      
      Changes since v2:
       Daniel Vetter:
       - Subclass drm_connector to drm_writeback_connector
       - Relax check to allow CRTC to be set without an FB
       - Add some writeback_ prefixes
       - Drop PIXEL_FORMATS_SIZE property, as it was unnecessary
       Gustavo Padovan:
       - Add drm_writeback_job to handle writeback signalling centrally
      
      Changes since v3:
       - Rebased
       - Rename PIXEL_FORMATS -> WRITEBACK_PIXEL_FORMATS
      
      Chances since v4:
       - Embed a drm_encoder inside the drm_writeback_connector to
         reduce the amount of boilerplate code required from the drivers
         that are using it.
      
      Changes since v5:
       - Added Rob Clark's atomic_commit() vfunc to connector helper
         funcs, so that writeback jobs are committed from atomic helpers
       - Updated create_writeback_properties() signature to return an
         error code rather than a boolean false for failure.
       - Free writeback job with the connector state rather than when
         doing the cleanup_work()
      
      Changes since v7:
       - fix extraneous use of out_fence that is only introduced in a
         subsequent patch.
      
      Changes since v8:
       - whitespace changes pull from subsequent patch
      
      Changes since v9:
       - Revert the v6 changes that free the writeback job in the connector
         state cleanup and return to doing it in the cleanup_work() function
      Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
      [rebased and fixed conflicts]
      Signed-off-by: NMihail Atanassov <mihail.atanassov@arm.com>
      [rebased and added atomic_commit() vfunc for writeback jobs]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/229037/
      935774cd
  25. 18 6月, 2018 1 次提交
  26. 17 5月, 2018 1 次提交
    • S
      drm: content-type property for HDMI connector · 50525c33
      Stanislav Lisovskiy 提交于
      Added content_type property to drm_connector_state
      in order to properly handle external HDMI TV content-type setting.
      
      v2:
       * Moved helper function which attaches content type property
         to the drm core, as was suggested.
         Removed redundant connector state initialization.
      
      v3:
       * Removed caps in drm_content_type_enum_list.
         After some discussion it turned out that HDMI Spec 1.4
         was wrongly assuming that IT Content(itc) bit doesn't affect
         Content type states, however itc bit needs to be manupulated
         as well. In order to not expose additional property for itc,
         for sake of simplicity it was decided to bind those together
         in same "content type" property.
      
      v4:
       * Added it_content checking in intel_digital_connector_atomic_check.
         Fixed documentation for new content type enum.
      
      v5:
       * Moved patch revision's description to commit messages.
      
      v6:
       * Minor naming fix for the content type enumeration string.
      
      v7:
       * Fix parameter name for documentation and parameter alignment
         in order not to get warning. Added Content Type description to
         new HDMI connector properties section.
      
      v8:
       * Thrown away unneeded numbers from HDMI content-type property
         description. Switch to strings desription instead of plain
         definitions.
      
      v9:
       * Moved away hdmi specific content-type enum from
         drm_connector_state. Content type property should probably not
         be bound to any specific connector interface in
         drm_connector_state.
         Same probably should be done to hdmi_picture_aspect_ration enum
         which is also contained in drm_connector_state. Added special
         helper function to get derive hdmi specific relevant infoframe
         fields.
      
      v10:
       * Added usage description to HDMI properties kernel doc.
      
      v11:
       * Created centralized function for filling HDMI AVI infoframe, based
         on correspondent DRM property value.
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180515135928.31092-2-stanislav.lisovskiy@intel.com
      [vsyrjala: clean up checkpatch multiple blank lines warnings]
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      50525c33
  27. 20 2月, 2018 1 次提交
  28. 09 1月, 2018 1 次提交
    • S
      drm: Add Content Protection property · 24557865
      Sean Paul 提交于
      This patch adds a new optional connector property to allow userspace to enable
      protection over the content it is displaying. This will typically be implemented
      by the driver using HDCP.
      
      The property is a tri-state with the following values:
      - OFF: Self explanatory, no content protection
      - DESIRED: Userspace requests that the driver enable protection
      - ENABLED: Once the driver has authenticated the link, it sets this value
      
      The driver is responsible for downgrading ENABLED to DESIRED if the link becomes
      unprotected. The driver should also maintain the desiredness of protection
      across hotplug/dpms/suspend.
      
      If this looks familiar, I posted [1] this 3 years ago. We have been using this
      in ChromeOS across exynos, mediatek, and rockchip over that time.
      
      Changes in v2:
       - Pimp kerneldoc for content_protection_property (Daniel)
       - Drop sysfs attribute
      Changes in v3:
       - None
      Changes in v4:
      - Changed kerneldoc to recommend userspace polling (Daniel)
      - Changed kerneldoc to briefly describe how to attach the property (Daniel)
      Changes in v5:
      - checkpatch whitespace noise
      - Change DRM_MODE_CONTENT_PROTECTION_OFF to DRM_MODE_CONTENT_PROTECTION_UNDESIRED
      Changes in v6:
      - None
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      
      [1] https://lists.freedesktop.org/archives/dri-devel/2014-December/073336.html
      Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-4-seanpaul@chromium.org
      24557865
  29. 14 12月, 2017 1 次提交
    • D
      drm: rework delayed connector cleanup in connector_iter · ea497bb9
      Daniel Vetter 提交于
      PROBE_DEFER also uses system_wq to reprobe drivers, which means when
      that again fails, and we try to flush the overall system_wq (to get
      all the delayed connectore cleanup work_struct completed), we
      deadlock.
      
      Fix this by using just a single cleanup work, so that we can only
      flush that one and don't block on anything else. That means a free
      list plus locking, a standard pattern.
      
      v2:
      - Correctly free connectors only on last ref. Oops (Chris).
      - use llist_head/node (Chris).
      
      v3
      - Add init_llist_head (Chris).
      
      Fixes: a703c550 ("drm: safely free connectors from connector_iter")
      Fixes: 613051da ("drm: locking&new iterators for connector_list")
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: <stable@vger.kernel.org> # v4.11+: 613051da ("drm: locking&new iterators for connector_list"
      Cc: <stable@vger.kernel.org> # v4.11+
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Javier Martinez Canillas <javier@dowhile0.org>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: Guillaume Tucker <guillaume.tucker@collabora.com>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Matt Hart <matthew.hart@linaro.org>
      Cc: Thierry Escande <thierry.escande@collabora.co.uk>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
      Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171213124936.17914-1-daniel.vetter@ffwll.ch
      ea497bb9