1. 05 5月, 2015 2 次提交
  2. 04 5月, 2015 5 次提交
    • D
      drm/atomic-helper: Really recover pre-atomic plane/cursor behavior · 3671c580
      Daniel Vetter 提交于
      I've fumbled this in
      
      commit f02ad907
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Jan 22 16:36:23 2015 +0100
      
          drm/atomic-helpers: Recover full cursor plane behaviour
      
      and accidentally put the assignment for legacy_cursor_upate after the
      atomic commit, where it is pretty useless.
      Reported-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      3671c580
    • M
      drm/qxl: Fix qxl_noop_get_vblank_counter() · 337eb43c
      Mario Kleiner 提交于
      This breaks under the vblank timestamp cleanup patch
      by Daniel Vetter. Also it is pointless to return anything
      but zero (or any other constant) if the function doesn't
      actually query a hw vblank counter. The bogus return of
      the current drm vblank counter via direct readout or via
      drm_vblank_count() is found in many of the new kms drivers,
      but it does exactly nothing different from returning any
      arbitrary constant - it's a no operation.
      
      Let's simply return 0 - Easy and fast.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      337eb43c
    • M
      drm: Zero out invalid vblank timestamp in drm_update_vblank_count. (v2) · d66a1e38
      Mario Kleiner 提交于
      Since commit 844b03f2 we make
      sure that after vblank irq off, we return the last valid
      (vblank count, vblank timestamp) pair to clients, e.g., during
      modesets, which is good.
      
      An overlooked side effect of that commit for kms drivers without
      support for precise vblank timestamping is that at vblank irq
      enable, when we update the vblank counter from the hw counter, we
      can't update the corresponding vblank timestamp, so now we have a
      totally mismatched timestamp for the new count to confuse clients.
      
      Restore old client visible behaviour from before Linux 3.18, but
      zero out the timestamp at vblank counter update (instead of disable
      as in original implementation) if we can't generate a meaningful
      timestamp immediately for the new vblank counter. This will fix
      this regression, so callers know they need to retry again later
      if they need a valid timestamp, but at the same time preserves
      the improvements made in the commit mentioned above.
      
      v2: Rebased on top of Daniel Vetter's fixup and documentation
          patch for timestamp updates. Drop request for stable kernel
          backport as this would be more difficult, unless the original
          patch would get applied to stable kernels.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d66a1e38
    • M
      drm: Prevent invalid use of vblank_disable_immediate. (v2) · 5a8b21b2
      Mario Kleiner 提交于
      For a kms driver to support immediate disable of vblank
      irq's reliably without introducing off by one errors or
      other mayhem for clients, it must not only support a
      hardware vblank counter query, but also high precision
      vblank timestamping, so vblank count and timestamp can be
      instantaneously reinitialzed to valid values. Additionally
      the exposed hardware counter must behave as if it is
      incrementing at leading edge of vblank to avoid off by
      one errors during reinitialization of the counter while
      the display happens to be inside or close to vblank.
      
      Check during drm_vblank_init that a driver which claims to
      be capable of vblank_disable_immediate at least supports
      high precision timestamping and prevent use of instant
      disable if that isn't present as a minimum requirement.
      
      v2: Changed from DRM_ERROR to DRM_INFO and made message
          more clear, as suggested by Michel Dänzer.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5a8b21b2
    • D
      drm/vblank: Fixup and document timestamp update/read barriers · 99264a61
      Daniel Vetter 提交于
      This was a bit too much cargo-culted, so lets make it solid:
      - vblank->count doesn't need to be an atomic, writes are always done
        under the protection of dev->vblank_time_lock. Switch to an unsigned
        long instead and update comments. Note that atomic_read is just a
        normal read of a volatile variable, so no need to audit all the
        read-side access specifically.
      
      - The barriers for the vblank counter seqlock weren't complete: The
        read-side was missing the first barrier between the counter read and
        the timestamp read, it only had a barrier between the ts and the
        counter read. We need both.
      
      - Barriers weren't properly documented. Since barriers only work if
        you have them on boths sides of the transaction it's prudent to
        reference where the other side is. To avoid duplicating the
        write-side comment 3 times extract a little store_vblank() helper.
        In that helper also assert that we do indeed hold
        dev->vblank_time_lock, since in some cases the lock is acquired a
        few functions up in the callchain.
      
      Spotted while reviewing a patch from Chris Wilson to add a fastpath to
      the vblank_wait ioctl.
      
      v2: Add comment to better explain how store_vblank works, suggested by
      Chris.
      
      v3: Peter noticed that as-is the 2nd smp_wmb is redundant with the
      implicit barrier in the spin_unlock. But that can only be proven by
      auditing all callers and my point in extracting this little helper was
      to localize all the locking into just one place. Hence I think that
      additional optimization is too risky.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-and-tested-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      99264a61
  3. 21 4月, 2015 2 次提交
    • J
      DRM: Don't re-poll connector for disconnect · a3c6d686
      Josef Holzmayr 提交于
      DRM probe should not repoll a connector if it is already
      connected and the DRM_CONNECTOR_POLL_DISCONNECT flag is not set.
      Signed-off-by: NJosef Holzmayr <holzmayr@rsi-elektrotechnik.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a3c6d686
    • T
      drm: Fix for DP CTS test 4.2.2.5 - I2C DEFER handling · 396aa445
      Todd Previte 提交于
      For test 4.2.2.5 to pass per the Link CTS Core 1.2 rev1.1 spec, the source
      device must attempt at least 7 times to read the EDID when it receives an
      I2C defer. The normal DRM code makes only 7 retries, regardless of whether
      or not the response is a native defer or an I2C defer. Test 4.2.2.5 fails
      since there are native defers interspersed with the I2C defers which
      results in less than 7 EDID read attempts.
      
      The solution is to add the numer of defers to the retry counter when an I2C
      DEFER is returned such that another read attempt will be made. This situation
      should normally only occur in compliance testing, however, as a worse case
      real-world scenario, it would result in 13 attempts ( 6 native defers, 7 I2C
      defers) for a single transaction to complete. The net result is a slightly
      slower response to an EDID read that shouldn't significantly impact overall
      performance.
      
      V2:
      - Added a check on the number of I2C Defers to limit the number
        of times that the retries variable will be decremented. This
        is to address review feedback regarding possible infinite loops
        from misbehaving sink devices.
      V3:
      - Fixed the limit value to 7 instead of 8 to get the correct retry
        count.
      - Combined the increment of the defer count into the if-statement
      V4:
      - Removed i915 tag from subject as the patch is not i915-specific
      V5:
      - Updated the for-loop to add the number of i2c defers to the retry
        counter such that the correct number of retry attempts will be
        made
      Signed-off-by: NTodd Previte <tprevite@gmail.com>
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      396aa445
  4. 16 4月, 2015 2 次提交
  5. 14 4月, 2015 2 次提交
    • J
      drm: fix trivial typo mistake · 2b1193d5
      John Hunter 提交于
      Signed-off-by: NJohn Hunter <zhjwpku@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2b1193d5
    • M
      drm: Make integer overflow checking cover universal cursor updates (v2) · 3968be94
      Matt Roper 提交于
      Our legacy SetPlane updates perform integer overflow checking on a
      plane's destination rectangle in drm_mode_setplane(), and atomic updates
      handled as part of a drm_atomic_state transaction do the same checking
      in drm_atomic_plane_check().  However legacy cursor updates that get
      routed through universal plane interfaces may bypass this overflow
      checking if the driver's .update_plane is serviced by the transitional
      plane helpers rather than the full atomic plane helpers.
      
      Move the check for destination rectangle integer overflow from the
      drm_mode_setplane() to __setplane_internal() so that it also covers
      cursor operations.
      
      This fixes an issue first noticed with i915 commit:
      
              commit ff42e093
              Author: Daniel Vetter <daniel.vetter@ffwll.ch>
              Date:   Mon Mar 2 16:35:20 2015 +0100
      
                  Revert "drm/i915: Switch planes from transitional helpers to full
                  atomic helpers"
      
      The above revert switched us from full atomic helpers back to the
      transitional helpers, and in doing so we lost the overflow checking here
      for universal cursor updates.  Even though such extreme cursor positions
      are unlikely to actually happen in the wild, we still don't want there
      to be a change of behavior when drivers switch from transitional helpers
      to full helpers.
      
      v2: Move check from setplane ioctl to setplane_internal rather than
          adding an additional copy of the checks to the transitional plane
          helpers.  (Daniel)
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Testcase: igt/kms_cursor_crc
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84269Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3968be94
  6. 13 4月, 2015 4 次提交
  7. 12 4月, 2015 1 次提交
  8. 08 4月, 2015 4 次提交
  9. 07 4月, 2015 5 次提交
  10. 02 4月, 2015 1 次提交
  11. 01 4月, 2015 3 次提交
    • C
    • D
      Merge tag 'topic/drm-misc-2015-03-31' of git://anongit.freedesktop.org/drm-intel into drm-next · 53d8858b
      Dave Airlie 提交于
      Final drm-misc pull for 4.0, just various things all over, including a few
      more important atomic fixes. btw I didn't pick up the vmwgfx patch from
      Ville's series, but one patch has one hunk touching vmwgfx and
      Thomas/Jakob didn't get around to ack it. I figured it's simple enough to
      be ok though.
      
      * tag 'topic/drm-misc-2015-03-31' of git://anongit.freedesktop.org/drm-intel:
        drm: line wrap DRM_IOCTL_DEF* macros
        drm/atomic: Don't try to free a NULL state
        drm/atomic: Clear crtcs, connectors and planes when clearing state
        drm: Rewrite drm_ioctl_flags() to resemble the new drm_ioctl() code
        drm: Use max() to make the ioctl alloc size code cleaner
        drm: Simplify core vs. drv ioctl handling
        drm: Drop ioctl->cmd_drv
        drm: Fix DRM_IOCTL_DEF_DRV()
        drm/atomic-helpers: Properly avoid full modeset dance
        drm: atomic: Allow setting CRTC active property
        drm: atomic: Expose CRTC active property
        drm: crtc_helper: Update hwmode before mode_set call
        drm: mode: Allow NULL modes for equality check
        drm: fb_helper: Simplify exit condition
        drm: mode: Fix typo in kerneldoc
        drm/dp: Print the number of bytes processed for aux nacks
      53d8858b
    • D
      Merge tag 'drm-intel-next-2015-03-27-merge' of... · 9e87e48f
      Dave Airlie 提交于
      Merge tag 'drm-intel-next-2015-03-27-merge' of git://anongit.freedesktop.org/drm-intel into drm-next
      
      This backmerges 4.0-rc6 due to the recent fixes in rc5/6
      
      - DP link rate refactoring from Ville
      - byt/bsw rps tuning from Chris
      - kerneldoc for the shrinker code
      - more dynamic ppgtt pte work (Michel, Ben, ...)
      - vlv dpll code refactoring to prep fro bxt (Imre)
      - refactoring the sprite colorkey code (Ville)
      - rotated ggtt view support from Tvrtko
      - roll out struct drm_atomic_state to prep for atomic update (Ander)
      
      * tag 'drm-intel-next-2015-03-27-merge' of git://anongit.freedesktop.org/drm-intel: (473 commits)
        Linux 4.0-rc6
        arm64: juno: Fix misleading name of UART reference clock
        drm/i915: Update DRIVER_DATE to 20150327
        drm/i915: Skip allocating shadow batch for 0-length batches
        drm/i915: Handle error to get connector state when staging config
        drm/i915: Compare GGTT view structs instead of types
        drm/i915: fix simple_return.cocci warnings
        drm/i915: Add module param to test the load detect code
        drm/i915: Remove usage of encoder->new_crtc from clock computations
        drm/i915: Don't look at staged config crtc when changing DRRS state
        drm/i915: Convert intel_pipe_will_have_type() to using atomic state
        drm/i915: Pass an atomic state to modeset_global_resources() functions
        drm/i915: Add dynamic page trace events
        drm/i915: Finish gen6/7 dynamic page table allocation
        drm/i915: Remove unnecessary gen6_ppgtt_unmap_pages
        drm/i915: Fix i915_dma_map_single positive error code
        drm/i915: Prevent out of range pt in gen6_for_each_pde
        drm/i915: fix definition of the DRM_IOCTL_I915_GET_SPRITE_COLORKEY ioctl
        drm/i915: Rip out GET_SPRITE_COLORKEY ioctl
        watchdog: imgpdc: Fix default heartbeat
        ...
      9e87e48f
  12. 31 3月, 2015 3 次提交
  13. 30 3月, 2015 6 次提交