1. 27 Jul, 2017 30 commits
  2. 26 Jul, 2017 10 commits
    • Stephen Rothwell's avatar
      drm: linux-next: build failure after merge of the drm-misc tree · e6742e10
      Stephen Rothwell authored
      Hi all,
      
      After merging the drm-misc tree, today's linux-next build (x86_64
      allmodconfig) failed like this:
      
      drivers/staging/vboxvideo/vbox_drv.c:235:2: error: unknown field 'set_busid' specified in initializer
        .set_busid = drm_pci_set_busid,
        ^
      drivers/staging/vboxvideo/vbox_drv.c:235:15: error: 'drm_pci_set_busid' undeclared here (not in a function)
        .set_busid = drm_pci_set_busid,
                     ^
      drivers/staging/vboxvideo/vbox_drv.c: In function 'vbox_init':
      drivers/staging/vboxvideo/vbox_drv.c:273:9: error: implicit declaration of function 'drm_pci_init' [-Werror=implicit-function-declaration]
        return drm_pci_init(&driver, &vbox_pci_driver);
               ^
      drivers/staging/vboxvideo/vbox_drv.c: In function 'vbox_exit':
      drivers/staging/vboxvideo/vbox_drv.c:278:2: error: implicit declaration of function 'drm_pci_exit' [-Werror=implicit-function-declaration]
        drm_pci_exit(&driver, &vbox_pci_driver);
        ^
      
      Caused by commits
      
        5c484cee ("drm: Remove drm_driver->set_busid hook")
        10631d72 ("drm/pci: Deprecate drm_pci_init/exit completely")
      
      interacting with commit
      
        dd55d44f ("staging: vboxvideo: Add vboxvideo to drivers/staging")
      
      from the staging.current tree.
      
      I have applied the following merge fix patch - please check that it
      is correct.
      
      From: Stephen Rothwell <sfr@canb.auug.org.au>
      Date: Wed, 19 Jul 2017 11:41:01 +1000
      Subject: [PATCH] drm: fixes for staging due to API changes in the drm core
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e6742e10
    • Dave Airlie's avatar
      Backmerge tag 'v4.13-rc2' into drm-next · 0eb2c0ae
      Dave Airlie authored
      Linux 4.13-rc2
      
      This is required for drm-misc fixing.
      0eb2c0ae
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2017-07-26' of git://anongit.freedesktop.org/git/drm-misc into drm-next · 542aefb5
      Dave Airlie authored
      drm-misc-next-2017-07-18:
      Core Changes:
      - A couple fixes to only opening crc when needed (Maarten)
      - Change atomic helper swap_state to be interruptible (Maarten)
      - fb_helper: Support waiting for an output before setting up (Daniel)
      - Allow drivers supporting runtime_pm to use helper_commit_tail (Maxime)
      
      Driver Changes:
      - misc: Use %pOF to print device node names (Rob)
      - Miscellaneous fixes
      
      drm-misc-next-2017-07-18:
      UAPI Changes:
      - Fail commits which request an event without including a crtc (Andrey)
      
      Core Changes:
      - Add YCBCR 4:2:0 support (Shashank)
      - s/drm_atomic_replace_property_blob/drm_property_replace_blob/ (Peter)
      - Add proper base class for private objs instead of using void* (Ville)
      - Remove pending_read/write_domains from drm_gem_object (Chris)
      - Add async plane update support (ie: cursor) to atomic helpers (Gustavo)
      - Add old state to .enable and rename to .atomic_enable (Laurent)
      - Add drm_atomic_helper_wait_for_flip_done() (Boris)
      - Remove drm_driver->set_busid hook (Daniel)
      - Migrate vblank documentation into the source files (Daniel)
      - Add fb_helper->lock instead of abusing modeset lock (Thierry/Daniel)
      
      Driver Changes:
      - stm: Add STM32 DSI controller driver (Phillipe)
      - amdgpu: Numerous small/misc fixes
      - bridge: Add Synopsys Designware MIPI DSI host bridge driver (Phillipe)
      - tinydrm: Add support for Pervasive Displays RePaper displays (Noralf)
      - misc: Replace for_each_[obj]_in_state to prep for removal (Maarten)
      - misc: Use .atomic_disable for atomic drivers (Laurent)
      - vgem: Pin pages when mapped/exported (Chris)
      - dw_hdmi: Add support for Rockchip RK3399 (Mark)
      - atmel-hlcdc: Add 8-bit color look-up table format (Peter)
      - vc4: Send vblank event when disabling a crtc (Boris)
      - vc4: Use atomic helpers for fence waits (Eric)
      - misc: drop drm_vblank_cleanup cargo-cult (Daniel)
      
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Philippe CORNU <philippe.cornu@st.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      
      * tag 'drm-misc-next-2017-07-26' of git://anongit.freedesktop.org/git/drm-misc: (171 commits)
        drm/hisilicon: fix build error without fbdev emulation
        drm/atomic: implement drm_atomic_helper_commit_tail for runtime_pm users
        drm: Improve kerneldoc for drm_modeset_lock
        drm/hisilicon: Remove custom FB helper deferred setup
        drm/exynos: Remove custom FB helper deferred setup
        drm/fb-helper: Support deferred setup
        dma-fence: Don't BUG_ON when not absolutely needed
        drm: Convert to using %pOF instead of full_name
        drm/syncobj: Fix kerneldoc
        drm/atomic: Allow drm_atomic_helper_swap_state to fail
        drm/atomic: Add __must_check to drm_atomic_helper_swap_state.
        drm/vc4: Handle drm_atomic_helper_swap_state failure
        drm/tilcdc: Handle drm_atomic_helper_swap_state failure
        drm/tegra: Handle drm_atomic_helper_swap_state failure
        drm/msm: Handle drm_atomic_helper_swap_state failure
        drm/mediatek: Handle drm_atomic_helper_swap_state failure
        drm/i915: Handle drm_atomic_helper_swap_state failure
        drm/atmel-hlcdc: Handle drm_atomic_helper_swap_state failure
        drm/nouveau: Handle drm_atomic_helper_swap_state failure
        drm/atomic: Change drm_atomic_helper_swap_state to return an error.
        ...
      542aefb5
    • Arnd Bergmann's avatar
      drm/hisilicon: fix build error without fbdev emulation · 8bb97773
      Arnd Bergmann authored
      We cannot reference priv->fbdev outside of the #ifdef:
      
      drivers/net/virtio_net.c:1881:12: error: 'virtnet_restore_up' defined but not used [-Werror=unused-function]
       static int virtnet_restore_up(struct virtio_device *vdev)
      drivers/net/virtio_net.c:1859:13: error: 'virtnet_freeze_down' defined but not used [-Werror=unused-function]
       static void virtnet_freeze_down(struct virtio_device *vdev)
      
      As the #ifdef is a bit annoying here, this removes it entirely
      and uses an IS_ENABLED() check in it place where needed.
      
      Fixes: b4dd9f1ffaba ("drm/hisilicon: Remove custom FB helper deferred setup")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      [danvet: One step further, also remove the IS_ENABLED checks, core
      no-ops out the fb helper functions that the cma helpers use. Discussed
      with Arnd on dri-devel.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725180555.3699056-1-arnd@arndb.deSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      8bb97773
    • Maxime Ripard's avatar
      drm/atomic: implement drm_atomic_helper_commit_tail for runtime_pm users · 81a099ac
      Maxime Ripard authored
      The current drm_atomic_helper_commit_tail helper works only if the CRTC is
      accessible, and documents an alternative implementation that is supposed to
      be used if that happens.
      
      That implementation is then duplicated by some drivers. Instead of
      documenting it, let's implement an helper that all the relevant users can
      use directly.
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/a8f92dc70048bab746e94dadd1c23200626aff60.1500555652.git-series.maxime.ripard@free-electrons.comSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      81a099ac
    • Liviu Dudau's avatar
      drm: Improve kerneldoc for drm_modeset_lock · fc2157b6
      Liviu Dudau authored
      Explain better when the drm_modeset_acquire_ctx parameter can
      be skipped for drm_modeset_lock() call.
      Signed-off-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170720160748.12856-1-Liviu.Dudau@arm.comSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      fc2157b6
    • Thierry Reding's avatar
      drm/hisilicon: Remove custom FB helper deferred setup · 14693a08
      Thierry Reding authored
      The FB helper core now supports deferred setup, so the driver's custom
      implementation can be removed.
      
      v2: Dont' resurrect drm_vblank_cleanup.
      
      Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
      Cc: Rongrong Zou <zourongrong@gmail.com>
      Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
      Cc: Chen Feng <puck.chen@hisilicon.com>
      Signed-off-by: Thierry Reding <treding@nvidia.com> (v1)
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170706130023.28417-5-daniel.vetter@ffwll.chSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      14693a08
    • Thierry Reding's avatar
      drm/exynos: Remove custom FB helper deferred setup · 812fc6f2
      Thierry Reding authored
      The FB helper core now supports deferred setup, so the driver's custom
      implementation can be removed.
      
      v2: Drop NULL check, drm_fb_helper_hotplug_event handles that already.
      
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: Thierry Reding <treding@nvidia.com> (v1)
      Reviewed-by: default avatarInki Dae <inki.dae@samsung.com>
      Tested-by: default avatarInki Dae <inki.dae@samsung.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170706130023.28417-4-daniel.vetter@ffwll.chSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      812fc6f2
    • Daniel Vetter's avatar
      drm/fb-helper: Support deferred setup · ca91a275
      Daniel Vetter authored
      FB helper code falls back to a 1024x768 mode if no outputs are connected
      or don't report back any modes upon initialization. This can be annoying
      because outputs that are added to FB helper later on can't be used with
      FB helper if they don't support a matching mode.
      
      The fallback is in place because VGA connectors can happen to report an
      unknown connection status even when they are in fact connected.
      
      Some drivers have custom solutions in place to defer FB helper setup
      until at least one output is connected. But the logic behind these
      solutions is always the same and there is nothing driver-specific about
      it, so a better alterative is to fix the FB helper core and add support
      for all drivers automatically.
      
      This patch adds support for deferred FB helper setup. It checks all the
      connectors for their connection status, and if all of them report to be
      disconnected marks the FB helper as needing deferred setup. Whet setup
      is deferred, the FB helper core will automatically retry setup after a
      hotplug event, and it will keep trying until it succeeds.
      
      v2: Rebase onto my entirely reworked fbdev helper locking. One big
      difference is that this version again drops&reacquires the fbdev lock
      (which is now fb_helper->lock, but before this patch series it was
      mode_config->mutex), because register_framebuffer must be able to
      recurse back into fbdev helper code for the initial screen setup.
      
      v3: __drm_fb_helper_initial_config must hold fb_helper->lock upon
      return, I've fumbled that in the deferred setup case (Liviu).
      
      v4: I was blind, redo this all. __drm_fb_helper_initial_config
      shouldn't need to reacquire fb_helper->lock, that just confuses
      callers. I myself got confused by kernel_fb_helper_lock and somehow
      thought it's the same as fb_helper->lock. Tsk.
      
      Also simplify the logic a bit (we don't need two functions to probe
      connectors), we can stick much closer to the existing code. And update
      some comments I've spotted that are outdated.
      
      v5: Don't pass -EAGAIN to drivers, it's just an internal error code
      (Liviu).
      
      v6: Add _and_unlock suffix to clarify locking (Maarten)
      
      Cc: Liviu Dudau <liviu@dudau.co.uk>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: Thierry Reding <treding@nvidia.com> (v1)
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@intel.com>
      Reviewed-by: default avatarLiviu Dudau <liviu@dudau.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170706130023.28417-3-daniel.vetter@ffwll.chSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ca91a275
    • Daniel Vetter's avatar
      dma-fence: Don't BUG_ON when not absolutely needed · 6ce31263
      Daniel Vetter authored
      It makes debugging a massive pain.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: linux-media@vger.kernel.org
      Cc: linaro-mm-sig@lists.linaro.org
      Reviewed-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Acked-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170720125107.26693-1-daniel.vetter@ffwll.chSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6ce31263