1. 08 12月, 2015 7 次提交
  2. 25 11月, 2015 1 次提交
  3. 24 11月, 2015 2 次提交
  4. 19 10月, 2015 1 次提交
  5. 05 10月, 2015 1 次提交
  6. 25 9月, 2015 2 次提交
  7. 11 9月, 2015 1 次提交
    • D
      drm: Nuke drm_framebuffer->helper_private · c86fb9d9
      Daniel Vetter 提交于
      It's completely unused and there's really no reason for this:
      - drm_framebuffer structures are invariant after creation, no need for
        helpers to manipulate them.
      - drm_framebuffer structures should just be embedded (and that's what
        all the drivers do).
      
      Stumbled over this since some folks are apparently concerned with the
      overhead of struct drm_framebuffer and this is an easy 8 byte saving.
      
      More could be gained by ditching the legacy fields and recomputing
      stuff from the fourcc value. But that would require some drm-wide
      cocci and real justification.
      
      Cc: gary.k.smith@intel.com
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      c86fb9d9
  8. 08 9月, 2015 1 次提交
  9. 12 8月, 2015 1 次提交
  10. 11 8月, 2015 1 次提交
  11. 27 7月, 2015 2 次提交
  12. 22 7月, 2015 6 次提交
    • D
      drm: gc now dead mode_group code · 3fdefa39
      Daniel Vetter 提交于
      Two nice things here:
      - drm_dev_register will truly register everything in the right order
        if the driver doesn't have a ->load callback. Before this we had to
        init the primary mode_group after the device nodes where already
        registered.
      
      - Less things to keep track of when reworking the connector locking,
        yay!
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      3fdefa39
    • D
      drm: Amend connector list locking rules · cff20ba2
      Daniel Vetter 提交于
      Now that dp mst hotplug takes all locks we can amend the locking rules
      for the iterators. This is needed before we can roll these out in the
      atomic code to avoid getting burried in WARNINGs.
      
      v2: Rebase onto the extracted list locking assert and add a comment to
      explain the rules.
      
      v3: Fixup German->English translation fail in the comment.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      cff20ba2
    • D
      drm: Check locking in drm_for_each_fb · 4676ba0b
      Daniel Vetter 提交于
      Ever since framebuffers are reference counted we have a special lock
      for the global fb list. Make sure users of that list do hold that
      lock when using the new iterators.
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      4676ba0b
    • D
      drm: Check locking in drm_for_each_connector · 7a3f3d66
      Daniel Vetter 提交于
      Because of DP MST connectors can now be hotplugged and we must hold
      the right lock when walking the connector lists.  Enforce this by
      checking the locking in our shiny new list walking macros.
      
      v2: Extract the locking check into a small static inline helper to
      help readability. This will be more important when we make the
      read list access rules more complicated in later patches. Inspired by
      comments from Chris. Unfortunately, due to header loops around the
      definition of struct drm_device the function interface is a bit funny.
      
      v3: Encoders aren't hotadded/removed. For each dp mst encoder we
      statically create one fake encoder per pipe so that we can support as
      many mst sinks as the hw can (Dave).
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Airlie <airlied@redhat.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      7a3f3d66
    • D
      drm: Add modeset object iterators · 6295d607
      Daniel Vetter 提交于
      And roll them out across drm_* files. The point here isn't code
      prettification (it helps with that too) but that some of these lists
      aren't static any more. And having macros will gives us a convenient
      place to put locking checks into.
      
      I didn't add an iterator for props since that's only used by a
      list_for_each_entry_safe in the driver teardown code.
      
      Search&replace was done with the below cocci spatch. Note that there's
      a bunch more places that didn't match and which would need some manual
      changes, but I've intentially left these out for this mostly automated
      patch.
      
      iterator name drm_for_each_crtc;
      struct drm_crtc *crtc;
      struct drm_device *dev;
      expression head;
      @@
      - list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
      + drm_for_each_crtc (crtc, dev) {
      ...
      }
      
      @@
      iterator name drm_for_each_encoder;
      struct drm_encoder *encoder;
      struct drm_device *dev;
      expression head;
      @@
      - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
      + drm_for_each_encoder (encoder, dev) {
      ...
      }
      
      @@
      iterator name drm_for_each_fb;
      struct drm_framebuffer *fb;
      struct drm_device *dev;
      expression head;
      @@
      - list_for_each_entry(fb, &dev->mode_config.fb_list, head) {
      + drm_for_each_fb (fb, dev) {
      ...
      }
      
      @@
      iterator name drm_for_each_connector;
      struct drm_connector *connector;
      struct drm_device *dev;
      expression head;
      @@
      - list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
      + drm_for_each_connector (connector, dev) {
      ...
      }
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      6295d607
    • D
      drm: Simplify drm_for_each_legacy_plane arguments · 4ea50e99
      Daniel Vetter 提交于
      No need to pass the planelist when everyone just uses
      dev->mode_config.plane_list anyway.
      
      I want to add a pile more of iterators with unified (obj, dev)
      arguments. This is just prep.
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      4ea50e99
  13. 25 6月, 2015 1 次提交
    • D
      drm/dp/mst: close deadlock in connector destruction. · 6b8eeca6
      Dave Airlie 提交于
      I've only seen this once, and I failed to capture the
      lockdep backtrace, but I did some investigations.
      
      If we are calling into the MST layer from EDID probing,
      we have the mode_config mutex held, if during that EDID
      probing, the MST hub goes away, then we can get a deadlock
      where the connector destruction function in the driver
      tries to retake the mode config mutex.
      
      This offloads connector destruction to a workqueue,
      and avoid the subsequenct lock ordering issue.
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6b8eeca6
  14. 26 5月, 2015 2 次提交
  15. 22 5月, 2015 1 次提交
  16. 21 5月, 2015 1 次提交
    • A
      drm: bridge: Allow daisy chaining of bridges · 862e686c
      Archit Taneja 提交于
      Allow drm_bridge objects to link to each other in order to form an encoder
      chain. The requirement for creating a chain of bridges comes because the
      MSM drm driver uses up its encoder and bridge objects for blocks within
      the SoC itself. There isn't anything left to use if the SoC display output
      is connected to an external encoder IC. Having an additional bridge
      connected to the existing bridge helps here. In general, it is possible for
      platforms to have  multiple devices between the encoder and the
      connector/panel that require some sort of configuration.
      
      We create drm bridge helper functions corresponding to each op in
      'drm_bridge_funcs'. These helpers call the corresponding
      'drm_bridge_funcs' op for the entire chain of bridges. These helpers are
      used internally by drm_atomic_helper.c and drm_crtc_helper.c.
      
      The drm_bridge_enable/pre_enable helpers execute enable/pre_enable ops of
      the bridge closet to the encoder, and proceed until the last bridge in the
      chain is enabled. The same holds for drm_bridge_mode_set/mode_fixup
      helpers. The drm_bridge_disable/post_disable helpers disable the last
      bridge in the chain first, and proceed until the first bridge in the chain
      is disabled.
      
      drm_bridge_attach() remains the same. As before, the driver calling this
      function should make sure it has set the links correctly. The order in
      which the bridges are connected to each other determines the order in which
      the calls are made. One requirement is that every bridge in the chain
      should point the parent encoder object. This is required since bridge
      drivers expect a valid encoder pointer in drm_bridge. For example, consider
      a chain where an encoder's output is connected to bridge1, and bridge1's
      output is connected to bridge2:
      
      	/* Like before, attach bridge to an encoder */
      	bridge1->encoder = encoder;
      	ret = drm_bridge_attach(dev, bridge1);
      	..
      
      	/*
      	 * set the first bridge's 'next' bridge to bridge2, set its encoder
      	 * as bridge1's encoder
      	 */
      	bridge1->next = bridge2
      	bridge2->encoder = bridge1->encoder;
      	ret = drm_bridge_attach(dev, bridge2);
      
      	...
      	...
      
      This method of bridge chaining isn't intrusive and existing drivers that
      use drm_bridge will behave the same way as before. The bridge helpers also
      cleans up the atomic and crtc helper files a bit.
      Reviewed-by: NJani Nikula <jani.nikula@linux.intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      862e686c
  17. 18 5月, 2015 1 次提交
  18. 12 5月, 2015 1 次提交
  19. 08 5月, 2015 3 次提交
    • D
      drm/edid: Kerneldoc for newly added edid_corrupt · ac6f2e29
      Daniel Vetter 提交于
      Also treat it as a proper boolean.
      
      Cc: Todd Previte <tprevite@gmail.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      ac6f2e29
    • D
      drm: Introduce blob_lock · 8fb6e7a5
      Daniel Stone 提交于
      Create a new global blob_lock mutex, which protects the blob property
      list from insertion and/or deletion.
      Signed-off-by: NDaniel Stone <daniels@collabora.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8fb6e7a5
    • T
      drm: Add edid_corrupt flag for Displayport Link CTS 4.2.2.6 · 6ba2bd3d
      Todd Previte 提交于
      Displayport compliance test 4.2.2.6 requires that a source device be capable of
      detecting a corrupt EDID. The test specification states that the sink device
      sets up the EDID with an invalid checksum. To do this, the sink sets up an
      invalid EDID header, expecting the source device to generate the checksum and
      compare it to the value stored in the last byte of the block data.
      
      Unfortunately, the DRM EDID reading and parsing functions are actually too good
      in this case; the header is fixed before the checksum is computed and thus the
      test never sees the invalid checksum. This results in a failure to pass the
      compliance test.
      
      To correct this issue, when the EDID code detects that the header is invalid,
      a flag is set to indicate that the EDID is corrupted. In this case, it sets
      edid_corrupt flag and continues with its fix-up code. This flag is also set in
      the case of a more seriously damaged header (fixup score less than the
      threshold). For consistency, the edid_corrupt flag is also set when the
      checksum is invalid as well.
      
      V2:
      - Removed the static bool global
      - Added a bool to the drm_connector struct to reaplce the static one for
        holding the status of raw edid header corruption detection
      - Modified the function signature of the is_valid function to take an
        additional parameter to store the corruption detected value
      - Fixed the other callers of the above is_valid function
      V3:
      - Updated the commit message to be more clear about what and why this
        patch does what it does.
      - Added comment in code to clarify the operations there
      - Removed compliance variable and check_link_status update; those
        have been moved to a later patch
      - Removed variable assignment from the bottom of the test handler
      V4:
      - Removed i915 tag from subject line as the patch is not i915-specific
      V5:
      - Moved code causing a compilation error to this patch where the variable
        is actually declared
      - Maintained blank lines / spacing so as to not contaminate the patch
      V6:
      - Removed extra debug messages
      - Added documentation to for the added parameter on drm_edid_block_valid
      - Fixed more whitespace issues in check_link_status
      - Added a clear of the header_corrupt flag to the end of the test handler
        in intel_dp.c
      - Changed the usage of the new function prototype in several places to use
        NULL where it is not needed by compliance testing
      V7:
      - Updated to account for long_pulse flag propagation
      V8:
      - Removed clearing of header_corrupt flag from the test handler in intel_dp.c
      - Added clearing of header_corrupt flag in the drm_edid_block_valid function
      V9:
      - Renamed header_corrupt flag to edid_corrupt to more accurately reflect its
        value and purpose
      - Updated commit message
      V10:
      - Updated for versioning and patch swizzle
      - Revised the title to more accurately reflect the nature and contents of
        the patch
      - Fixed formatting/whitespace problems
      - Added set flag when computed checksum is invalid
      Signed-off-by: NTodd Previte <tprevite@gmail.com>
      Cc: dri-devel@lists.freedesktop.org
      Acked-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6ba2bd3d
  20. 14 4月, 2015 1 次提交
  21. 13 4月, 2015 1 次提交
  22. 10 4月, 2015 1 次提交
  23. 24 3月, 2015 1 次提交