1. 03 3月, 2016 6 次提交
  2. 25 2月, 2016 2 次提交
  3. 23 2月, 2016 5 次提交
  4. 20 2月, 2016 2 次提交
    • M
      drm/amdgpu: Don't hang in amdgpu_flip_work_func on disabled crtc. · e1d09dc0
      Mario Kleiner 提交于
      This fixes a regression introduced in Linux 4.4.
      
      This is a port of the same fix for radeon-kms in the
      patch "drm/radeon: Don't hang in radeon_flip_work_func
      on disabled crtc. (v2)"
      
      Limit the amount of time amdgpu_flip_work_func can
      delay programming a page flip, by both limiting the
      maximum amount of time per wait cycle and the maximum
      number of wait cycles. Continue the flip if the limit
      is exceeded, even if that may result in a visual or
      timing glitch.
      
      This is to prevent a hang of page flips, as reported
      in fdo bug #93746: Disconnecting a DisplayPort display
      in parallel to a kms pageflip getting queued can cause
      the following hang of page flips and thereby an unusable
      desktop:
      
      1. kms pageflip ioctl() queues pageflip -> queues execution
         of amdgpu_flip_work_func.
      
      2. Hotunplug of display causes the driver to DPMS OFF
         the unplugged display. Display engine shuts down,
         scanout no longer moves, but stays at its resting
         position at start line of vblank.
      
      3. amdgpu_flip_work_func executes while crtc is off, and
         due to the non-moving scanout position, the new flip
         delay code introduced into Linux 4.4 by
         commit 8e36f9d3 ("drm/amdgpu: Fixup hw vblank counter/ts..")
         enters an infinite wait loop.
      
      4. After reconnecting the display, the pageflip continues
         to hang in 3. and the display doesn't update its view
         of the desktop.
      
      This patch fixes the Linux 4.4 regression from fdo bug #93746
      
      <https://bugs.freedesktop.org/show_bug.cgi?id=93746>
      Reported-by: NBernd Steinhauser <linux@bernd-steinhauser.de>
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      
      Cc: <stable@vger.kernel.org> # 4.4+
      Cc: Michel Dänzer <michel.daenzer@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      e1d09dc0
    • M
      drm/radeon: Don't hang in radeon_flip_work_func on disabled crtc. (v2) · 2b8341b3
      Mario Kleiner 提交于
      This fixes a regression introduced in Linux 4.4.
      
      Limit the amount of time radeon_flip_work_func can
      delay programming a page flip, by both limiting the
      maximum amount of time per wait cycle and the maximum
      number of wait cycles. Continue the flip if the limit
      is exceeded, even if that may result in a visual or
      timing glitch.
      
      This is to prevent a hang of page flips, as reported
      in fdo bug #93746: Disconnecting a DisplayPort display
      in parallel to a kms pageflip getting queued can cause
      the following hang of page flips and thereby an unusable
      desktop:
      
      1. kms pageflip ioctl() queues pageflip -> queues execution
         of radeon_flip_work_func.
      
      2. Hotunplug of display causes the driver to DPMS OFF
         the unplugged display. Display engine shuts down,
         scanout no longer moves, but stays at its resting
         position at start line of vblank.
      
      3. radeon_flip_work_func executes while crtc is off, and
         due to the non-moving scanout position, the new flip
         delay code introduced into Linux 4.4 by
         commit 5b5561b3 ("drm/radeon: Fixup hw vblank counter/ts..")
         enters an infinite wait loop.
      
      4. After reconnecting the display, the pageflip continues
         to hang in 3. and the display doesn't update its view
         of the desktop.
      
      This patch fixes the Linux 4.4 regression from fdo bug #93746
      
      <https://bugs.freedesktop.org/show_bug.cgi?id=93746>
      
      v2: Skip wait immediately if !radeon_crtc->enabled, as
          suggested by Michel.
      Reported-by: NBernd Steinhauser <linux@bernd-steinhauser.de>
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Tested-by: NBernd Steinhauser <linux@bernd-steinhauser.de>
      
      Cc: <stable@vger.kernel.org> # 4.4+
      Cc: Michel Dänzer <michel.daenzer@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      2b8341b3
  5. 19 2月, 2016 7 次提交
  6. 18 2月, 2016 6 次提交
    • J
      ftrace/module: remove ftrace module notifier · 7dcd182b
      Jessica Yu 提交于
      Remove the ftrace module notifier in favor of directly calling
      ftrace_module_enable() and ftrace_release_mod() in the module loader.
      Hard-coding the function calls directly in the module loader removes
      dependence on the module notifier call chain and provides better
      visibility and control over what gets called when, which is important
      to kernel utilities such as livepatch.
      
      This fixes a notifier ordering issue in which the ftrace module notifier
      (and hence ftrace_module_enable()) for coming modules was being called
      after klp_module_notify(), which caused livepatch modules to initialize
      incorrectly. This patch removes dependence on the module notifier call
      chain in favor of hard coding the corresponding function calls in the
      module loader. This ensures that ftrace and livepatch code get called in
      the correct order on patch module load and unload.
      
      Fixes: 5156dca3 ("ftrace: Fix the race between ftrace and insmod")
      Signed-off-by: NJessica Yu <jeyu@redhat.com>
      Reviewed-by: NSteven Rostedt <rostedt@goodmis.org>
      Reviewed-by: NPetr Mladek <pmladek@suse.cz>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Reviewed-by: NMiroslav Benes <mbenes@suse.cz>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      7dcd182b
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 28507135
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "A collection of fixes from the past few weeks that should go into 4.5.
        This contains:
      
         - Overflow fix for sysfs discard show function from Alan.
      
         - A stacking limit init fix for max_dev_sectors, so we don't end up
           artificially capping some use cases.  From Keith.
      
         - Have blk-mq proper end unstarted requests on a dying queue, instead
           of pushing that to the driver.  From Keith.
      
         - NVMe:
              - Update to Kconfig description for NVME_SCSI, since it was
                vague and having it on is important for some SUSE distros.
                From Christoph.
              - Set of fixes from Keith, around surprise removal. Also kills
                the no-merge flag, so it supports merging.
      
         - Set of fixes for lightnvm from Matias, Javier, and Wenwei.
      
         - Fix null_blk oops when asked for lightnvm, but not available.  From
           Matias.
      
         - Copy-to-user EINTR fix from Hannes, fixing a case where SG_IO fails
           if interrupted by a signal.
      
         - Two floppy fixes from Jiri, fixing signal handling and blocking
           open.
      
         - A use-after-free fix for O_DIRECT, from Mike Krinkin.
      
         - A block module ref count fix from Roman Pen.
      
         - An fs IO wait accounting fix for O_DSYNC from Stephane Gasparini.
      
         - Smaller reallo fix for xen-blkfront from Bob Liu.
      
         - Removal of an unused struct member in the deadline IO scheduler,
           from Tahsin.
      
         - Also from Tahsin, properly initialize inode struct members
           associated with cgroup writeback, if enabled.
      
         - From Tejun, ensure that we keep the superblock pinned during cgroup
           writeback"
      
      * 'for-linus' of git://git.kernel.dk/linux-block: (25 commits)
        blk: fix overflow in queue_discard_max_hw_show
        writeback: initialize inode members that track writeback history
        writeback: keep superblock pinned during cgroup writeback association switches
        bio: return EINTR if copying to user space got interrupted
        NVMe: Rate limit nvme IO warnings
        NVMe: Poll device while still active during remove
        NVMe: Requeue requests on suspended queues
        NVMe: Allow request merges
        NVMe: Fix io incapable return values
        blk-mq: End unstarted requests on dying queue
        block: Initialize max_dev_sectors to 0
        null_blk: oops when initializing without lightnvm
        block: fix module reference leak on put_disk() call for cgroups throttle
        nvme: fix Kconfig description for BLK_DEV_NVME_SCSI
        kernel/fs: fix I/O wait not accounted for RW O_DSYNC
        floppy: refactor open() flags handling
        lightnvm: allow to force mm initialization
        lightnvm: check overflow and correct mlc pairs
        lightnvm: fix request intersection locking in rrpc
        lightnvm: warn if irqs are disabled in lock laddr
        ...
      28507135
    • L
      Merge tag 'devicetree-fixes-for-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · c28b947d
      Linus Torvalds 提交于
      Pull DeviceTree fixes from Rob Herring:
      
       - Fix irq msi-map calculation for nonzero rid-base.
      
       - Binding doc updates for GICv3, fsl-imx-uart, and S3C RTC.
      
      * tag 'devicetree-fixes-for-4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        rtc: s3c: Document required clocks in the DT binding
        serial: fsl-imx-uart: Fix typo in fsl,dte-mode description
        dt-bindings: arm, gic-v3: require that reserved cells are always 0
        of/irq: Fix msi-map calculation for nonzero rid-base
      c28b947d
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 35683dd3
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "This has two main sets of fixes:
      
         - A bunch of Exynos fixes, mainly for their MIC component.
      
         - vblank regression fixes from Mario, apparantly some changes in 4.4
           caused some vblank breakage on radeon/nouveau, this set fixes all
           the issues seen.
      
        There is also a revert of one of the MST changse, that I was
        overzealous in including, that broke 30" MST monitors, and two qxl
        fixes"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/qxl: fix erroneous return value
        drm/nouveau/display: Enable vblank irqs after display engine is on again.
        drm/radeon/pm: Handle failure of drm_vblank_get.
        drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2)
        drm: Fix drm_vblank_pre/post_modeset regression from Linux 4.4
        drm: Prevent vblank counter bumps > 1 with active vblank clients. (v2)
        drm: No-Op redundant calls to drm_vblank_off() (v2)
        drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command
        Revert "drm/dp/mst: change MST detection scheme"
        drm/exynos/decon: fix disable clocks order
        drm/exynos: fix incorrect cpu address for dma_mmap_attrs()
        drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable
        drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable
        drm/exynos: dsi: restore support for drm bridge
        drm/exynos: mic: make all functions static
        drm/exynos: mic: convert to component framework
        drm/exynos: mic: use devm_clk interface
        drm/exynos: fix types for compilation on 64bit architectures
        drm/exynos: ipp: fix incorrect format specifiers in debug messages
        drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS
      35683dd3
    • L
      Merge tag 'trace-fixes-v4.5-rc4' of... · a9f70bd4
      Linus Torvalds 提交于
      Merge tag 'trace-fixes-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fixes from Steven Rostedt:
       "This includes two fixes.
      
        The first is something that has come up a few times and has been
        worked out individually, but it's come up now enough that the problem
        should be generic.  Tracepoints are protected by RCU sched.  There are
        several tracepoints within core infrastructure like kfree().  If a
        tracepoint is called when the CPU is going down, or when it's coming
        up but has yet to be recognized by RCU, a RCU warning is triggered.
      
        This is a true bug as that tracepoint is not protected by RCU.
        Usually, this is taken care of by testing for cpu online as a
        tracepoint condition.  But as this is happening more often, moving it
        from a individual tracepoint to a check in the tracepoint
        infrastructure is more robust.
      
        Note, there is now a duplicate of a cpu online test, because this
        update does not remove the individual checks.  But the overhead is
        small enough that the removal can be done in another release.
      
        The second change is strange linker breakage due to the branch
        tracer's builtin_constant_p() check failing, and treating the
        condition as a variable instead of a constant.  Arnd Bergmann found
        that this can be fixed by testing !!(cond) instead of just (cond)"
      
      * tag 'trace-fixes-v4.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix freak link error caused by branch tracer
        tracepoints: Do not trace when cpu is offline
      a9f70bd4
    • A
      blk: fix overflow in queue_discard_max_hw_show · 18f922d0
      Alan 提交于
      We get this right for queue_discard_max_show but not max_hw_show. Follow the
      same pattern as queue_discard_max_show instead so that we don't truncate.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      18f922d0
  7. 17 2月, 2016 12 次提交
    • 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
    • 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
      Merge branch 'exynos-drm-fixes' of... · e8f051e9
      Dave Airlie 提交于
      Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
        Summary:
         - fix compilation warnings on ARM64bit.
         - fix mic driver initialization.
           . MIC is a part of KMS so it converts it to use component framework
             like other KMS drivers did.
         - fix wrong driver state and disable clock order on DECON driver.
         - fix incorrect use of dma_mmap_attrs function.
      
      * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos/decon: fix disable clocks order
        drm/exynos: fix incorrect cpu address for dma_mmap_attrs()
        drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable
        drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable
        drm/exynos: dsi: restore support for drm bridge
        drm/exynos: mic: make all functions static
        drm/exynos: mic: convert to component framework
        drm/exynos: mic: use devm_clk interface
        drm/exynos: fix types for compilation on 64bit architectures
        drm/exynos: ipp: fix incorrect format specifiers in debug messages
        drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS
      e8f051e9
    • 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
    • T
      writeback: initialize inode members that track writeback history · 3d65ae46
      Tahsin Erdogan 提交于
      inode struct members that track cgroup writeback information
      should be reinitialized when inode gets allocated from
      kmem_cache. Otherwise, their values remain and get used by the
      new inode.
      Signed-off-by: NTahsin Erdogan <tahsin@google.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Fixes: d10c8095 ("writeback: implement foreign cgroup inode bdi_writeback switching")
      Signed-off-by: NJens Axboe <axboe@fb.com>
      3d65ae46