1. 24 2月, 2016 2 次提交
  2. 19 2月, 2016 3 次提交
  3. 17 2月, 2016 20 次提交
    • V
      drm/i915: Fix hpd live status bits for g4x · 8d409cb3
      Ville Syrjälä 提交于
      Looks like g4x hpd live status bits actually agree with the spec. At
      least they do on the machine I have, and apparently on Nick Bowler's
      g4x as well.
      
      So gm45 may be the only platform where they don't agree. At least
      that seems to be the case based on the (somewhat incomplete)
      logs/dumps in [1], and Daniel has also tested this on his gm45
      sometime in the past.
      
      So let's change the bits to match the spec on g4x. That actually makes
      the g4x bits identical to vlv/chv so we can just share the code
      between those platforms, leaving gm45 as the special case.
      
      [1] https://bugzilla.kernel.org/show_bug.cgi?id=52361
      
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Sonika Jindal <sonika.jindal@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Nick Bowler <nbowler@draconx.ca>
      References: https://lists.freedesktop.org/archives/dri-devel/2016-February/100382.htmlReported-by: NNick Bowler <nbowler@draconx.ca>
      Cc: stable@vger.kernel.org
      Fixes: 237ed86c ("drm/i915: Check live status before reading edid")
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1455127145-20087-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      (cherry picked from commit 0780cd36)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      8d409cb3
    • M
      hpet: Drop stale URLs · 4e7f9df2
      Michael S. Tsirkin 提交于
      Looks like the HPET spec at intel.com got moved.
      It isn't hard to find so drop the link, just mention
      the revision assumed.
      Suggested-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Clemens Ladisch <clemens@ladisch.de>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-doc@vger.kernel.org
      Link: http://lkml.kernel.org/r/1455145462-3877-1-git-send-email-mst@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4e7f9df2
    • S
      s390/dasd: fix performance drop · 12d319b9
      Stefan Haberland 提交于
      Commit ca369d51 ("sd: Fix device-imposed transfer length limits")
      introduced a new queue limit max_dev_sectors which limits the maximum
      sectors for requests. The default value leads to small dasd requests
      and therefor to a performance drop.
      Set the max_dev_sectors value to the same value as the max_hw_sectors
      to use the maximum available request size for DASD devices.
      Signed-off-by: NStefan Haberland <sth@linux.vnet.ibm.com>
      Cc: stable@vger.kernel.org # 4.4+
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      12d319b9
    • A
      drm/qxl: fix erroneous return value · dada168b
      Anton Protopopov 提交于
      The qxl_gem_prime_mmap() function returns ENOSYS instead of -ENOSYS
      Signed-off-by: NAnton Protopopov <a.s.protopopov@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dada168b
    • M
      drm/nouveau/display: Enable vblank irqs after display engine is on again. · ff683df7
      Mario Kleiner 提交于
      In the display resume path, move the calls to drm_vblank_on()
      after the point when the display engine is running again.
      
      Since changes were made to drm_update_vblank_count() in Linux 4.4+
      to emulate hw vblank counters via vblank timestamping, the function
      drm_vblank_on() now needs working high precision vblank timestamping
      and therefore working scanout position queries at time of call.
      These don't work before the display engine gets restarted, causing
      miscalculation of vblank counter increments and thereby large forward
      jumps in vblank count at display resume. These jumps can cause client
      hangs on resume, or desktop hangs in the case of composited desktops.
      
      Fix this Linux 4.4 regression by reordering calls accordingly.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: <stable@vger.kernel.org> # 4.4+
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: ville.syrjala@linux.intel.com
      Cc: daniel.vetter@ffwll.ch
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ff683df7
    • M
      drm/radeon/pm: Handle failure of drm_vblank_get. · e0b34e38
      Mario Kleiner 提交于
      Make sure that drm_vblank_get/put() stay balanced in
      case drm_vblank_get fails, by skipping the corresponding
      put.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: michel@daenzer.net
      Cc: dri-devel@lists.freedesktop.org
      Cc: alexander.deucher@amd.com
      Cc: christian.koenig@amd.com
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e0b34e38
    • M
      drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2) · bb74fc1b
      Mario Kleiner 提交于
      drm_vblank_offdelay can have three different types of values:
      
      < 0 is to be always treated the same as dev->vblank_disable_immediate
      = 0 is to be treated as "never disable vblanks"
      > 0 is to be treated as disable immediate if kms driver wants it
          that way via dev->vblank_disable_immediate. Otherwise it is
          a disable timeout in msecs.
      
      This got broken in Linux 3.18+ for the implementation of
      drm_vblank_on. If the user specified a value of zero which should
      always reenable vblank irqs in this function, a kms driver could
      override the users choice by setting vblank_disable_immediate
      to true. This patch fixes the regression and keeps the user in
      control.
      
      v2: Only reenable vblank if there are clients left or the user
          requested to "never disable vblanks" via offdelay 0. Enabling
          vblanks even in the "delayed disable" case (offdelay > 0) was
          specifically added by Ville in commit cd19e52a
          ("drm: Kick start vblank interrupts at drm_vblank_on()"),
          but after discussion it turns out that this was done by accident.
      
          Citing Ville: "I think it just ended up as a mess due to changing
          some of the semantics of offdelay<0 vs. offdelay==0 vs.
          disable_immediate during the review of the series. So yeah, given
          how drm_vblank_put() works now, I'd just make this check for
          offdelay==0."
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      
      Cc: <stable@vger.kernel.org> # 3.18+
      Cc: michel@daenzer.net
      Cc: vbabka@suse.cz
      Cc: ville.syrjala@linux.intel.com
      Cc: daniel.vetter@ffwll.ch
      Cc: dri-devel@lists.freedesktop.org
      Cc: alexander.deucher@amd.com
      Cc: christian.koenig@amd.com
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      bb74fc1b
    • M
      drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4 · c61934ed
      Mario Kleiner 提交于
      Changes to drm_update_vblank_count() in Linux 4.4 broke the
      behaviour of the pre/post modeset functions as the new update
      code doesn't deal with hw vblank counter resets inbetween calls
      to drm_vblank_pre_modeset an drm_vblank_post_modeset, as it
      should.
      
      This causes mistreatment of such hw counter resets as counter
      wraparound, and thereby large forward jumps of the software
      vblank counter which in turn cause vblank event dispatching
      and vblank waits to fail/hang --> userspace clients hang.
      
      This symptom was reported on radeon-kms to cause a infinite
      hang of KDE Plasma 5 shell's login procedure, preventing users
      from logging in.
      
      Fix this by detecting when drm_update_vblank_count() is called
      inside a pre->post modeset interval. If so, clamp valid vblank
      increments to the safe values 0 and 1, pretty much restoring
      the update behavior of the old update code of Linux 4.3 and
      earlier. Also reset the last recorded hw vblank count at call
      to drm_vblank_post_modeset() to be safe against hw that after
      modesetting, dpms on etc. only fires its first vblank irq after
      drm_vblank_post_modeset() was already called.
      Reported-by: NVlastimil Babka <vbabka@suse.cz>
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Tested-by: NVlastimil Babka <vbabka@suse.cz>
      
      Cc: <stable@vger.kernel.org> # 4.4+
      Cc: michel@daenzer.net
      Cc: vbabka@suse.cz
      Cc: ville.syrjala@linux.intel.com
      Cc: daniel.vetter@ffwll.ch
      Cc: dri-devel@lists.freedesktop.org
      Cc: alexander.deucher@amd.com
      Cc: christian.koenig@amd.com
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c61934ed
    • M
      drm: Prevent vblank counter bumps > 1 with active vblank clients. (v2) · 99b8e715
      Mario Kleiner 提交于
      This fixes a regression introduced by the new drm_update_vblank_count()
      implementation in Linux 4.4:
      
      Restrict the bump of the software vblank counter in drm_update_vblank_count()
      to a safe maximum value of +1 whenever there is the possibility that
      concurrent readers of vblank timestamps could be active at the moment,
      as the current implementation of the timestamp caching and updating is
      not safe against concurrent readers for calls to store_vblank() with a
      bump of anything but +1. A bump != 1 would very likely return corrupted
      timestamps to userspace, because the same slot in the cache could
      be concurrently written by store_vblank() and read by one of those
      readers in a non-atomic fashion and without the read-retry logic
      detecting this collision.
      
      Concurrent readers can exist while drm_update_vblank_count() is called
      from the drm_vblank_off() or drm_vblank_on() functions or other non-vblank-
      irq callers. However, all those calls are happening with the vbl_lock
      locked thereby preventing a drm_vblank_get(), so the vblank refcount
      can't increase while drm_update_vblank_count() is executing. Therefore
      a zero vblank refcount during execution of that function signals that
      is safe for arbitrary counter bumps if called from outside vblank irq,
      whereas a non-zero count is not safe.
      
      Whenever the function is called from vblank irq, we have to assume concurrent
      readers could show up any time during its execution, even if the refcount
      is currently zero, as vblank irqs are usually only enabled due to the
      presence of readers, and because when it is called from vblank irq it
      can't hold the vbl_lock to protect it from sudden bumps in vblank refcount.
      Therefore also restrict bumps to +1 when the function is called from vblank
      irq.
      
      Such bumps of more than +1 can happen at other times than reenabling
      vblank irqs, e.g., when regular vblank interrupts get delayed by more
      than 1 frame due to long held locks, long irq off periods, realtime
      preemption on RT kernels, or system management interrupts.
      
      A better solution would be to rewrite the timestamp caching to use
      full seqlocks to allow concurrent writes and reads for arbitrary
      vblank counter increments.
      
      v2: Add code comment that this is essentially a hack and should
          be replaced by a full seqlock implementation for caching of
          timestamps.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      
      Cc: <stable@vger.kernel.org> # 4.4+
      Cc: michel@daenzer.net
      Cc: vbabka@suse.cz
      Cc: ville.syrjala@linux.intel.com
      Cc: daniel.vetter@ffwll.ch
      Cc: dri-devel@lists.freedesktop.org
      Cc: alexander.deucher@amd.com
      Cc: christian.koenig@amd.com
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      99b8e715
    • M
      drm: No-Op redundant calls to drm_vblank_off() (v2) · e8235891
      Mario Kleiner 提交于
      Otherwise if a kms driver calls into drm_vblank_off() more than once
      before calling drm_vblank_on() again, the redundant calls to
      vblank_disable_and_save() will call drm_update_vblank_count()
      while hw vblank counters and vblank timestamping are in a undefined
      state during modesets, dpms off etc.
      
      At least with the legacy drm helpers it is not unusual to
      get multiple calls to drm_vblank_off and drm_vblank_on, e.g.,
      half a dozen calls to drm_vblank_off and two calls to drm_vblank_on
      were observed on radeon-kms during dpms-off -> dpms-on transition.
      
      We don't no-op calls from atomic modesetting drivers, as they
      should do a proper job of tracking hw state.
      
      Fixes large jumps of the software maintained vblank counter due to
      the hardware vblank counter resetting to zero during dpms off or
      modeset, e.g., if radeon-kms is modified to use drm_vblank_off/on
      instead of drm_vblank_pre/post_modeset().
      
      This fixes a regression caused by the changes made to
      drm_update_vblank_count() in Linux 4.4.
      
      v2: Don't no-op on atomic modesetting drivers, per suggestion
          of Daniel Vetter.
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: <stable@vger.kernel.org> # 4.4+
      Cc: michel@daenzer.net
      Cc: vbabka@suse.cz
      Cc: ville.syrjala@linux.intel.com
      Cc: alexander.deucher@amd.com
      Cc: christian.koenig@amd.com
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e8235891
    • G
      drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command · 34855706
      Gerd Hoffmann 提交于
      This avoids integer overflows on 32bit machines when calculating
      reloc_info size, as reported by Alan Cox.
      
      Cc: stable@vger.kernel.org
      Cc: gnomes@lxorguk.ukuu.org.uk
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      34855706
    • D
      Revert "drm/dp/mst: change MST detection scheme" · 8ae22cb4
      Dave Airlie 提交于
      This reverts commit cfcfa086.
      
      This causes the tiling properties to break in some unexpected ways,
      
      Revert it for now.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8ae22cb4
    • E
      drm/vc4: Use runtime PM to power cycle the device when the GPU hangs. · 36cb6253
      Eric Anholt 提交于
      This gets us functional GPU reset again, like we had until a refactor
      at merge time.  Tested with a little patch to stuff in a broken binner
      job every 100 frames.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      36cb6253
    • E
      drm/vc4: Enable runtime PM. · 001bdb55
      Eric Anholt 提交于
      This may actually get us a feature that the closed driver didn't have:
      turning off the GPU in between rendering jobs, while the V3D device is
      still opened by the client.
      
      There may be some tuning to be applied here to use autosuspend so that
      we don't bounce the device's power so much, but in steady-state
      GPU-bound rendering we keep the power on (since we keep multiple jobs
      outstanding) and even if we power cycle on every job we can still
      manage at least 680 fps.
      
      More importantly, though, runtime PM will allow us to power off the
      device to do a GPU reset.
      
      v2: Switch #ifdef to CONFIG_PM not CONFIG_PM_SLEEP (caught by kbuild
          test robot)
      Signed-off-by: NEric Anholt <eric@anholt.net>
      001bdb55
    • E
      drm/vc4: Fix spurious GPU resets due to BO reuse. · c4ce60dc
      Eric Anholt 提交于
      We were tracking the "where are the head pointers pointing" globally,
      so if another job reused the same BOs and execution was at the same
      point as last time we checked, we'd stop and trigger a reset even
      though the GPU had made progress.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      c4ce60dc
    • E
      drm/vc4: Drop error message on seqno wait timeouts. · 2ee94657
      Eric Anholt 提交于
      These ioctls end up getting exposed to fairly directly to GL users,
      and having normal user operations print DRM errors is obviously wrong.
      The message was originally to give us some idea of what happened when
      a hang occurred, but we have a DRM_INFO from reset for that.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      2ee94657
    • E
      drm/vc4: Fix -ERESTARTSYS error return from BO waits. · 13cf8909
      Eric Anholt 提交于
      This caused the wait ioctls to claim that waiting had completed when
      we actually got interrupted by a signal before it was done.  Fixes
      broken rendering throttling that produced serious lag in X window
      dragging.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      13cf8909
    • E
      drm/vc4: Return an ERR_PTR from BO creation instead of NULL. · 2c68f1fc
      Eric Anholt 提交于
      Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the
      ioctl instead of -ENOMEM.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      2c68f1fc
    • E
      drm/vc4: Fix the clear color for the first tile rendered. · 54aec44a
      Eric Anholt 提交于
      Apparently in hardware (as opposed to simulation), the clear colors
      need to be uploaded before the render config, otherwise they won't
      take effect.  Fixes igt's vc4_wait_bo/used-bo-* subtests.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      54aec44a
    • E
      drm/vc4: Validate that WAIT_BO padding is cleared. · e0015236
      Eric Anholt 提交于
      This is ABI future-proofing if we ever want to extend the pad to mean
      something.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      e0015236
  4. 16 2月, 2016 5 次提交
  5. 15 2月, 2016 10 次提交