1. 15 11月, 2016 11 次提交
    • D
      drm: Move tile group code into drm_connector.c · 9498c19b
      Daniel Vetter 提交于
      And also put the overview section into the KMS Properties part of the
      docs, instead of randomly-placed within the helpers - this is part of
      the uabi.
      
      With this patch I think drm_crtc.[hc] is cleaned up and entirely
      documented.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      9498c19b
    • D
      drm: Extract drm_mode_config.[hc] · 28575f16
      Daniel Vetter 提交于
      And shuffle the kernel-doc structure a bit since drm_crtc.[hc] now
      only contains CRTC-related functions and structures.
      
      v2:
      - rebase onto drm-misc
      - don't forget to move drm_mode_config_cleanup.
      - move 2 internal decls under the right heading (Chris)
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      28575f16
    • V
      Revert "drm: Add and handle new aspect ratios in DRM layer" · 7920232d
      Ville Syrjälä 提交于
      This reverts commit a68362fe.
      
      Adding new mode flags willy nilly breaks existing userspace. We need to
      coordinate this better, potentially with a new client cap that only
      exposes the aspect ratio flags when userspace is prepared for them
      (similar to what we do with stereo 3D modes).
      
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Lin, Jia <lin.a.jia@intel.com>
      Cc: Akashdeep Sharma <akashdeep.sharma@intel.com>
      Cc: Jim Bride <jim.bride@linux.intel.com>
      Cc: Jose Abreu <Jose.Abreu@synopsys.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1478176304-6743-1-git-send-email-ville.syrjala@linux.intel.com
      7920232d
    • D
      drm/print: Move kerneldoc next to definition · 2d5e836d
      Daniel Vetter 提交于
      kerneldoc expects the comment next to definitions, otherwise it can't
      pick up exported vs. internal stuff.
      
      This fixes a warning from the doc build done with:
      
      $ make DOCBOOKS="" htmldocs
      
      Fixes: d8187177 ("drm: add helper for printing to log or seq_file")
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-8-daniel.vetter@ffwll.ch
      2d5e836d
    • D
      drm: Consolidate dumb buffer docs · 4f93624e
      Daniel Vetter 提交于
      Put the callback docs into struct drm_driver, and the small overview
      into a DOC comment.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-7-daniel.vetter@ffwll.ch
      4f93624e
    • D
    • D
      drm: Extract drm_drv.h · 85e634bc
      Daniel Vetter 提交于
      I want to move dumb buffer documentation into the right vfuncs, and
      for that I first need to be able to pull that into kerneldoc without
      having to clean up all of drmP.h. Also, header-splitting is nice.
      
      While at it shuffle all the function declarations for drm_drv.c into
      the right spots, and drop the kerneldoc for drm_minor_acquire/release
      since it's only used internally.
      
      v2: Keep all existing copyright notices (Chris).
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      85e634bc
    • D
      doc/dma-buf: Fix up include directives · 8a5846bf
      Daniel Vetter 提交于
      Would be great if everony could add
      
      $ make DOCBOOKS="" htmldocs
      
      to their build scripts to catch these. 0day should also report them,
      not sure why it failed to spot this.
      
      Fixes: f54d1867 ("dma-buf: Rename struct fence to dma_fence")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Christian König <christian.koenig@amd.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161114115825.22050-4-daniel.vetter@ffwll.ch
      8a5846bf
    • M
      drm/fb_cma_helper: Add missing forward declaration · 196594ef
      Marek Vasut 提交于
      Add missing forward declaration for struct drm_plane and drm_plane_state,
      which causes the following warning in the VC4 driver (can be replicated
      by building using bcm2835_defconfig):
      
      In file included from drivers/gpu/drm/vc4/vc4_drv.c:18:0:
      include/drm/drm_fb_cma_helper.h:45:13: warning: ‘struct drm_plane_state’ declared inside parameter list will not be visible outside of this definition or declaration
            struct drm_plane_state *state);
                   ^~~~~~~~~~~~~~~
      include/drm/drm_fb_cma_helper.h:44:34: warning: ‘struct drm_plane’ declared inside parameter list will not be visible outside of this definition or declaration
       int drm_fb_cma_prepare_fb(struct drm_plane *plane,
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161115105529.3227-1-marex@denx.de
      196594ef
    • R
      drm: don't let crtc_ww_class leak out · 35cf0350
      Rob Clark 提交于
      kbuild spotted this error, with drm/msm patches that add a new
      modeset-lock in the driver and driver built as a module:
      
        ERROR: "crtc_ww_class" [drivers/gpu/drm/msm/msm.ko] undefined!
      
      Really the only reason for crtc_ww_class not being internal to
      drm_modeset_lock.c is that drm_modeset_lock_init() was static-inline
      (for no particularly good reason).
      
      Fix that, and move crtc_ww_class into drm_modeset_lock.c.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1479163257-18703-1-git-send-email-robdclark@gmail.com
      35cf0350
    • C
      dma-buf: Use fence_get_rcu_safe() for retrieving the exclusive fence · 6bfec6d9
      Chris Wilson 提交于
      The current code is subject to a race where we may try to acquire a
      reference on a stale fence:
      
      [13703.335118] WARNING: CPU: 1 PID: 14975 at ./include/linux/kref.h:46 i915_gem_object_wait+0x1a3/0x1c0
      [13703.335184] Modules linked in:
      [13703.335202] CPU: 1 PID: 14975 Comm: gem_concurrent_ Not tainted 4.9.0-rc4+ #26
      [13703.335216] Hardware name:                  /        , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
      [13703.335233]  ffffc90002f5bcc8 ffffffff812807de 0000000000000000 0000000000000000
      [13703.335257]  ffffc90002f5bd08 ffffffff81073811 0000002e80000000 ffff88026bf7c780
      [13703.335279]  7fffffffffffffff 0000000000000001 ffff88027045a550 ffff88026bf7c780
      [13703.335301] Call Trace:
      [13703.335316]  [<ffffffff812807de>] dump_stack+0x4d/0x6f
      [13703.335331]  [<ffffffff81073811>] __warn+0xc1/0xe0
      [13703.335343]  [<ffffffff810738e8>] warn_slowpath_null+0x18/0x20
      [13703.335355]  [<ffffffff813ac443>] i915_gem_object_wait+0x1a3/0x1c0
      [13703.335367]  [<ffffffff813ae8ec>] i915_gem_set_domain_ioctl+0xcc/0x330
      [13703.335386]  [<ffffffff813534ab>] drm_ioctl+0x1cb/0x410
      [13703.335400]  [<ffffffff813ae820>] ? i915_gem_obj_prepare_shmem_write+0x1d0/0x1d0
      [13703.335416]  [<ffffffff8135359b>] ? drm_ioctl+0x2bb/0x410
      [13703.335429]  [<ffffffff8117d32f>] do_vfs_ioctl+0x8f/0x5c0
      [13703.335442]  [<ffffffff8117d89c>] SyS_ioctl+0x3c/0x70
      [13703.335456]  [<ffffffff815a07a4>] entry_SYSCALL_64_fastpath+0x17/0x98
      [13703.335558] ---[ end trace fd24176416ba6981 ]---
      [13703.382778] general protection fault: 0000 [#1] SMP
      [13703.382802] Modules linked in:
      [13703.382816] CPU: 1 PID: 14967 Comm: gem_concurrent_ Tainted: G        W       4.9.0-rc4+ #26
      [13703.382828] Hardware name:                  /        , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
      [13703.382841] task: ffff880275458000 task.stack: ffffc90002f18000
      [13703.382849] RIP: 0010:[<ffffffff813b3534>]  [<ffffffff813b3534>] i915_gem_request_retire+0x2b4/0x320
      [13703.382870] RSP: 0018:ffffc90002f1bbc8  EFLAGS: 00010293
      [13703.382878] RAX: dead000000000200 RBX: ffff88026bf7dce8 RCX: dead000000000100
      [13703.382887] RDX: dead000000000100 RSI: ffff88026bf7c930 RDI: ffff88026bf7dd00
      [13703.382897] RBP: ffffc90002f1bbf8 R08: 00000000ffffffff R09: ffff88026b89a000
      [13703.382905] R10: 0000000000000001 R11: ffff88026bbe8fe0 R12: ffff88026bf7c000
      [13703.382913] R13: ffff880275af8000 R14: ffff88026bf7c180 R15: dead000000000200
      [13703.382922] FS:  00007f89e787d740(0000) GS:ffff88027fd00000(0000) knlGS:0000000000000000
      [13703.382934] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [13703.382942] CR2: 00007f9053d2e000 CR3: 000000026d414000 CR4: 00000000001006e0
      [13703.382951] Stack:
      [13703.382958]  ffff880275413000 ffffc90002f1bde8 ffff880275af8000 ffff880274e8a600
      [13703.382976]  ffff880276a06000 ffffc90002f1bde8 ffffc90002f1bc38 ffffffff813b48c5
      [13703.382995]  ffffc90002f1bc00 ffffc90002f1bde8 ffff88026972a440 0000000000000000
      [13703.383021] Call Trace:
      [13703.383032]  [<ffffffff813b48c5>] i915_gem_request_alloc+0xa5/0x350
      [13703.383043]  [<ffffffff813a17c3>] i915_gem_do_execbuffer.isra.41+0x7b3/0x18b0
      [13703.383055]  [<ffffffff813b144c>] ? i915_gem_object_get_sg+0x25c/0x2b0
      [13703.383065]  [<ffffffff813b1d4d>] ? i915_gem_object_get_page+0x1d/0x50
      [13703.383076]  [<ffffffff813b28cc>] ? i915_gem_pwrite_ioctl+0x66c/0x6d0
      [13703.383086]  [<ffffffff813a2c25>] i915_gem_execbuffer2+0x95/0x1e0
      [13703.383096]  [<ffffffff813534ab>] drm_ioctl+0x1cb/0x410
      [13703.383105]  [<ffffffff813a2b90>] ? i915_gem_execbuffer+0x2d0/0x2d0
      [13703.383117]  [<ffffffff810c3df0>] ? hrtimer_start_range_ns+0x1a0/0x310
      [13703.383128]  [<ffffffff8117d32f>] do_vfs_ioctl+0x8f/0x5c0
      [13703.383140]  [<ffffffff810c60e8>] ? SyS_timer_settime+0x118/0x1a0
      [13703.383150]  [<ffffffff8117d89c>] SyS_ioctl+0x3c/0x70
      [13703.383162]  [<ffffffff815a07a4>] entry_SYSCALL_64_fastpath+0x17/0x98
      [13703.383172] Code: 49 39 c6 48 8d 70 e8 48 8d 5f e8 75 16 eb 47 48 8d 43 18 48 8b 53 18 48 89 de 49 39 c6 48 8d 5a e8 74 33 48 8b 56 08 48 8b 46 10 <48> 89 42 08 48 89 10 f6 46 38 01 48 89 4e 08 4c 89 7e 10 74 cf
      [13703.383557] RIP  [<ffffffff813b3534>] i915_gem_request_retire+0x2b4/0x320
      [13703.383570]  RSP <ffffc90002f1bbc8>
      [13703.383586] ---[ end trace fd24176416ba6982 ]---
      
      This is fixed by using the kref_get_unless_zero() as a full memory
      barrier to validate the fence is still the current exclusive fence before
      returning it back to the caller. (Note the fix only requires using
      dma_fence_get_rcu() and correct handling, but we may as well use the
      helper rather than inline equivalent code.)
      
      Note: Issue can only be hit with the i915 driver.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Sumit Semwal <sumit.semwal@linaro.org
      Fixes: d07f0e59 ("drm/i915: Move GEM activity tracking into a common struct reservation_object")
      Reviewed-by: Christian König <christian.koenig@amd.com>.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161114115540.31155-1-chris@chris-wilson.co.uk
      6bfec6d9
  2. 14 11月, 2016 2 次提交
  3. 12 11月, 2016 1 次提交
  4. 09 11月, 2016 7 次提交
  5. 08 11月, 2016 5 次提交
  6. 07 11月, 2016 1 次提交
  7. 02 11月, 2016 2 次提交
  8. 30 10月, 2016 6 次提交
  9. 29 10月, 2016 1 次提交
  10. 28 10月, 2016 4 次提交
    • J
      perf/powerpc: Don't call perf_event_disable() from atomic context · 5aab90ce
      Jiri Olsa 提交于
      The trinity syscall fuzzer triggered following WARN() on powerpc:
      
        WARNING: CPU: 9 PID: 2998 at arch/powerpc/kernel/hw_breakpoint.c:278
        ...
        NIP [c00000000093aedc] .hw_breakpoint_handler+0x28c/0x2b0
        LR [c00000000093aed8] .hw_breakpoint_handler+0x288/0x2b0
        Call Trace:
        [c0000002f7933580] [c00000000093aed8] .hw_breakpoint_handler+0x288/0x2b0 (unreliable)
        [c0000002f7933630] [c0000000000f671c] .notifier_call_chain+0x7c/0xf0
        [c0000002f79336d0] [c0000000000f6abc] .__atomic_notifier_call_chain+0xbc/0x1c0
        [c0000002f7933780] [c0000000000f6c40] .notify_die+0x70/0xd0
        [c0000002f7933820] [c00000000001a74c] .do_break+0x4c/0x100
        [c0000002f7933920] [c0000000000089fc] handle_dabr_fault+0x14/0x48
      
      Followed by a lockdep warning:
      
        ===============================
        [ INFO: suspicious RCU usage. ]
        4.8.0-rc5+ #7 Tainted: G        W
        -------------------------------
        ./include/linux/rcupdate.h:556 Illegal context switch in RCU read-side critical section!
      
        other info that might help us debug this:
      
        rcu_scheduler_active = 1, debug_locks = 0
        2 locks held by ls/2998:
         #0:  (rcu_read_lock){......}, at: [<c0000000000f6a00>] .__atomic_notifier_call_chain+0x0/0x1c0
         #1:  (rcu_read_lock){......}, at: [<c00000000093ac50>] .hw_breakpoint_handler+0x0/0x2b0
      
        stack backtrace:
        CPU: 9 PID: 2998 Comm: ls Tainted: G        W       4.8.0-rc5+ #7
        Call Trace:
        [c0000002f7933150] [c00000000094b1f8] .dump_stack+0xe0/0x14c (unreliable)
        [c0000002f79331e0] [c00000000013c468] .lockdep_rcu_suspicious+0x138/0x180
        [c0000002f7933270] [c0000000001005d8] .___might_sleep+0x278/0x2e0
        [c0000002f7933300] [c000000000935584] .mutex_lock_nested+0x64/0x5a0
        [c0000002f7933410] [c00000000023084c] .perf_event_ctx_lock_nested+0x16c/0x380
        [c0000002f7933500] [c000000000230a80] .perf_event_disable+0x20/0x60
        [c0000002f7933580] [c00000000093aeec] .hw_breakpoint_handler+0x29c/0x2b0
        [c0000002f7933630] [c0000000000f671c] .notifier_call_chain+0x7c/0xf0
        [c0000002f79336d0] [c0000000000f6abc] .__atomic_notifier_call_chain+0xbc/0x1c0
        [c0000002f7933780] [c0000000000f6c40] .notify_die+0x70/0xd0
        [c0000002f7933820] [c00000000001a74c] .do_break+0x4c/0x100
        [c0000002f7933920] [c0000000000089fc] handle_dabr_fault+0x14/0x48
      
      While it looks like the first WARN() is probably valid, the other one is
      triggered by disabling event via perf_event_disable() from atomic context.
      
      The event is disabled here in case we were not able to emulate
      the instruction that hit the breakpoint. By disabling the event
      we unschedule the event and make sure it's not scheduled back.
      
      But we can't call perf_event_disable() from atomic context, instead
      we need to use the event's pending_disable irq_work method to disable it.
      Reported-by: NJan Stancek <jstancek@redhat.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20161026094824.GA21397@kravaSigned-off-by: NIngo Molnar <mingo@kernel.org>
      5aab90ce
    • B
      mtd: nand: Fix data interface configuration logic · 73f907fd
      Boris Brezillon 提交于
      When changing from one data interface setting to another, one has to
      ensure a specific sequence which is described in the ONFI spec.
      
      One of these constraints is that the CE line has go high after a reset
      before a command can be sent with the new data interface setting, which
      is not guaranteed by the current implementation.
      
      Rework the nand_reset() function and all the call sites to make sure the
      CE line is asserted and released when required.
      
      Also make sure to actually apply the new data interface setting on the
      first die.
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Fixes: d8e725dd ("mtd: nand: automate NAND timings selection")
      Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de>
      Tested-by: NMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
      73f907fd
    • M
      kconfig.h: remove config_enabled() macro · c0a0aba8
      Masahiro Yamada 提交于
      The use of config_enabled() is ambiguous.  For config options,
      IS_ENABLED(), IS_REACHABLE(), etc.  will make intention clearer.
      Sometimes config_enabled() has been used for non-config options because
      it is useful to check whether the given symbol is defined or not.
      
      I have been tackling on deprecating config_enabled(), and now is the
      time to finish this work.
      
      Some new users have appeared for v4.9-rc1, but it is trivial to replace
      them:
      
       - arch/x86/mm/kaslr.c
        replace config_enabled() with IS_ENABLED() because
        CONFIG_X86_ESPFIX64 and CONFIG_EFI are boolean.
      
       - include/asm-generic/export.h
        replace config_enabled() with __is_defined().
      
      Then, config_enabled() can be removed now.
      
      Going forward, please use IS_ENABLED(), IS_REACHABLE(), etc. for config
      options, and __is_defined() for non-config symbols.
      
      Link: http://lkml.kernel.org/r/1476616078-32252-1-git-send-email-yamada.masahiro@socionext.comSigned-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Garnier <thgarnie@google.com>
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c0a0aba8
    • D
      net: ipv6: Do not consider link state for nexthop validation · d5d32e4b
      David Ahern 提交于
      Similar to IPv4, do not consider link state when validating next hops.
      
      Currently, if the link is down default routes can fail to insert:
       $ ip -6 ro add vrf blue default via 2100:2::64 dev eth2
       RTNETLINK answers: No route to host
      
      With this patch the command succeeds.
      
      Fixes: 8c14586f ("net: ipv6: Use passed in table for nexthop lookups")
      Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5d32e4b