1. 29 Nov, 2016 4 commits
    • Chris Wilson's avatar
      drm: Hold mode_config.lock to prevent hotplug whilst setting up crtcs · 966a6a13
      Chris Wilson authored
      The fb_helper->connector_count is modified when a new connector is
      constructed following a hotplug event (e.g. DP-MST). This causes trouble
      for drm_setup_crtcs() and friends that assume that fb_helper is
      constant:
      
      [ 1250.872997] BUG: KASAN: slab-out-of-bounds in drm_setup_crtcs+0x320/0xf80 at addr ffff88074cdd2608
      [ 1250.873020] Write of size 40 by task kworker/u8:3/480
      [ 1250.873039] CPU: 2 PID: 480 Comm: kworker/u8:3 Tainted: G     U          4.9.0-rc6+ #285
      [ 1250.873043] Hardware name:                  /NUC6i3SYB, BIOS SYSKLi35.86A.0024.2015.1027.2142 10/27/2015
      [ 1250.873050] Workqueue: events_unbound async_run_entry_fn
      [ 1250.873056]  ffff88070f9d78f0 ffffffff814b72aa ffff88074e40c5c0 ffff88074cdd2608
      [ 1250.873067]  ffff88070f9d7918 ffffffff8124ff3c ffff88070f9d79b0 ffff88074cdd2600
      [ 1250.873079]  ffff88074e40c5c0 ffff88070f9d79a0 ffffffff812501e4 0000000000000005
      [ 1250.873090] Call Trace:
      [ 1250.873099]  [<ffffffff814b72aa>] dump_stack+0x67/0x9d
      [ 1250.873106]  [<ffffffff8124ff3c>] kasan_object_err+0x1c/0x70
      [ 1250.873113]  [<ffffffff812501e4>] kasan_report_error+0x204/0x4f0
      [ 1250.873120]  [<ffffffff81698df0>] ? drm_dev_printk+0x140/0x140
      [ 1250.873127]  [<ffffffff81250ac3>] kasan_report+0x53/0x60
      [ 1250.873134]  [<ffffffff81688b40>] ? drm_setup_crtcs+0x320/0xf80
      [ 1250.873142]  [<ffffffff8124f18e>] check_memory_region+0x13e/0x1a0
      [ 1250.873147]  [<ffffffff8124f5f3>] memset+0x23/0x40
      [ 1250.873154]  [<ffffffff81688b40>] drm_setup_crtcs+0x320/0xf80
      [ 1250.873161]  [<ffffffff810be7c5>] ? wake_up_q+0x45/0x80
      [ 1250.873169]  [<ffffffff81b0c180>] ? mutex_lock_nested+0x5a0/0x5a0
      [ 1250.873176]  [<ffffffff8168a0e6>] drm_fb_helper_initial_config+0x206/0x7a0
      [ 1250.873183]  [<ffffffff81689ee0>] ? drm_fb_helper_set_par+0x90/0x90
      [ 1250.873303]  [<ffffffffa0b68690>] ? intel_fbdev_fini+0x140/0x140 [i915]
      [ 1250.873387]  [<ffffffffa0b686b2>] intel_fbdev_initial_config+0x22/0x40 [i915]
      [ 1250.873391]  [<ffffffff810b50ff>] async_run_entry_fn+0x7f/0x270
      [ 1250.873394]  [<ffffffff810a64b0>] process_one_work+0x3d0/0x960
      [ 1250.873398]  [<ffffffff810a641d>] ? process_one_work+0x33d/0x960
      [ 1250.873401]  [<ffffffff810a60e0>] ? max_active_store+0xf0/0xf0
      [ 1250.873406]  [<ffffffff810f6f9d>] ? do_raw_spin_lock+0x10d/0x1a0
      [ 1250.873413]  [<ffffffff810a767d>] worker_thread+0x8d/0x840
      [ 1250.873419]  [<ffffffff810a75f0>] ? create_worker+0x2e0/0x2e0
      [ 1250.873426]  [<ffffffff810b0454>] kthread+0x194/0x1c0
      [ 1250.873432]  [<ffffffff810b02c0>] ? kthread_park+0x60/0x60
      [ 1250.873438]  [<ffffffff810f095d>] ? trace_hardirqs_on+0xd/0x10
      [ 1250.873446]  [<ffffffff810b02c0>] ? kthread_park+0x60/0x60
      [ 1250.873453]  [<ffffffff810b02c0>] ? kthread_park+0x60/0x60
      [ 1250.873457]  [<ffffffff81b12277>] ret_from_fork+0x27/0x40
      [ 1250.873460] Object at ffff88074cdd2608, in cache kmalloc-32 size: 32
      
      However, when holding the mode_config.lock around the fb_helper, we have
      to be careful of any callbacks that may reenter the fb_helper and so try
      to reacquire the mode_config.lock (e.g. register_framebuffer). To avoid
      the mutex recursion, we have to rearrange the sequence to move the
      registration into the caller outside of the mode_config.lock.
      
      v2: drop the 1; following the lockdep assertion inside the for(;;), I
      anticipated an error that doesn't happen!
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98826Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161129120217.7344-1-chris@chris-wilson.co.uk
      966a6a13
    • Chris Wilson's avatar
      drm: Introduce drm_framebuffer_assign() · 389f78b3
      Chris Wilson authored
      In a couple of places currently, and with the intent to add more, we
      update a pointer to a framebuffer to hold a new fb reference (evicting
      the old).
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161125153231.13255-2-chris@chris-wilson.co.uk
      389f78b3
    • Srinivas Kandagatla's avatar
      drm/bridge: adv7511: Enable the audio data and clock pads on adv7533 · b2383fa3
      Srinivas Kandagatla authored
      This patch enables the Audio Data and Clock pads to the adv7533 bridge.
      Without this patch audio can not be played.
      
      Cc: David Airlie <airlied@linux.ie>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Andy Green <andy@warmcat.com>
      Cc: Dave Long <dave.long@linaro.org>
      Cc: Guodong Xu <guodong.xu@linaro.org>
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/1480382552-28219-3-git-send-email-john.stultz@linaro.org
      b2383fa3
    • John Stultz's avatar
      drm/bridge: adv7511: Add Audio support · 53c515be
      John Stultz authored
      This patch adds support to Audio for both adv7511 and adv7533
      bridge chips.
      
      This patch was originally from [1] by Lars-Peter Clausen <lars@metafoo.de>
      and was adapted by Archit Taneja <architt@codeaurora.org> and
      Srinivas Kandagatla <srinivas.kandagatla@linaro.org>.
      
      Then I heavily reworked it to use the hdmi-codec driver. And also
      folded in some audio packet initialization done by Andy Green
      <andy.green@linaro.org>. So credit to them, but blame to me.
      
      [1] https://github.com/analogdevicesinc/linux/blob/xcomm_zynq/drivers/gpu/drm/i2c/adv7511_audio.c
      
      Cc: David Airlie <airlied@linux.ie>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Andy Green <andy@warmcat.com>
      Cc: Dave Long <dave.long@linaro.org>
      Cc: Guodong Xu <guodong.xu@linaro.org>
      Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Cc: dri-devel@lists.freedesktop.org
      Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/1480382552-28219-2-git-send-email-john.stultz@linaro.org
      53c515be
  2. 28 Nov, 2016 7 commits
  3. 25 Nov, 2016 4 commits
  4. 24 Nov, 2016 4 commits
  5. 23 Nov, 2016 1 commit
  6. 22 Nov, 2016 3 commits
  7. 21 Nov, 2016 2 commits
  8. 18 Nov, 2016 4 commits
  9. 17 Nov, 2016 11 commits