1. 27 Mar, 2017 3 commits
    • Daniel Vetter's avatar
      drm/atomic: Introduce drm_atomic_helper_shutdown · 18dddadc
      Daniel Vetter authored
      The trouble here is that it does multiple atomic commits under one
      drm_modeset_lock_all, which breaks the behind-the-scenes acquire
      context magic that function pulls off. It's much better to have one
      overall atomic commit. That we still have multiple atomic commits
      prevents us from adding some pretty useful debug checks to the atomic
      machinery.
      
      Hence it is really a bad idea to call the legacy
      drm_crtc_force_disable_all() function. There's 2 atomic drivers using
      this still, nouveau and tinydrm. To fix this, introduce a new
      drm_atomic_helper_shutdown() by extracting the code from i915.
      
      While at it improve kernel-doc and catch future offenders by
      sprinkling a WARN_ON into the legacy function. We should probably move
      those into the legacy modeset helpers, too ...
      
      v2: Make it compile on arm drivers too (Noralf).
      
      v3: Correct kerneldoc to point at _disable_all().
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Tested-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170321164149.31531-1-daniel.vetter@ffwll.ch
      18dddadc
    • Noralf Trønnes's avatar
      drm/tinydrm: Fix drm_driver.fops.owner · 79b85d2b
      Noralf Trønnes authored
      drm_driver.fops can't be shared since the owner then becomes tinydrm.ko.
      Move the fops declaration to the driver.
      
      v2: Use DEFINE_DRM_GEM_CMA_FOPS
      Reported-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170326142529.16938-1-noralf@tronnes.org
      79b85d2b
    • Romain Perier's avatar
      drm: dw_hdmi: Don't rely on the status of the bridge for updating HPD · 187697a4
      Romain Perier authored
      Currently, the irq handler that monitors changes for HPD and RX_SENSE
      relies on the status of the bridge for updating the status of the HPD.
      The update is done only when the bridge is enabled.
      
      However, on Rockchip platforms we have found use cases where it could be
      a problem. When HDMI is being used, turning off/on the screen or
      unplugging/re-plugging the cable, the following simplified code path
      will happen:
      
      - dw_hdmi_irq() will be triggered by an HPD event, as the bridge is on
      hdmi->disabled is false, then the handler will update the rxsense flag
      accordingly.
      - dw_hdmi_update_power() will be invoked with the mode
      DRM_FORCE_UNSPECIFIED and rxsense == 1, so dw_hdmi_poweroff() will be
      called and the PHY will be desactivated (its pixel clocks and TMDS)
      
      [...]
      
      - dw_hdmi_bridge_disable() will be invoked, the bridge will be marked as
      disabled.
      
      - dw_hdmi_irq() will be triggered by an HPD event, as the bridge is
      currently disabled the HPD status won't be updated, so hdmi->rxsense
      won't be changed. Even if the data part of the PHY is disabled, this
      information coming from the HDMI Transmitter is correct and should be
      saved.
      
      [...]
      
      - dw_hdmi_bridge_enable() will be invoked, the bridge will be marked as
      enabled.
      - dw_hdmi_update_power() will be called. When hdmi->force is equal to
      DRM_FORCE_UNSPECIFIED the function will rely on hdmi->rxsense. If this
      field has not been updated by the irq handler, it will be false and
      DRM_FORCE_ON won't be put to hdmi->force.
      
      Consequently, most of the time dw_hdmi_poweron() won't be called in this
      use case, TMDS won't be re-enabled the PHY won't be re-initialized,
      resulting in a "Signal not found".
      
      This commit fixes the issue by removing the check for "!hdmi->disabled".
      As already explained, even if the PHY is partially disabled, information
      coming from HDMI Transmitter about HPD should be saved for a later use.
      Signed-off-by: default avatarRomain Perier <romain.perier@collabora.com>
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Link: https://patchwork.freedesktop.org/patch/143602/
      187697a4
  2. 25 Mar, 2017 4 commits
  3. 24 Mar, 2017 9 commits
  4. 23 Mar, 2017 3 commits
  5. 22 Mar, 2017 10 commits
  6. 21 Mar, 2017 6 commits
  7. 20 Mar, 2017 5 commits
    • Arnd Bergmann's avatar
      drm/msm: add stubs for msm_{perf,rd}_debugfs_cleanup · 3a270e4d
      Arnd Bergmann authored
      We now call those two functions even when they are not defined
      or declared anywhere because DEBUG_FS is disabled:
      
      drivers/gpu/drm/msm/msm_drv.c: In function 'msm_drm_uninit':
      drivers/gpu/drm/msm/msm_drv.c:244:2: error: implicit declaration of function 'msm_perf_debugfs_cleanup';did you mean 'msm_framebuffer_cleanup'? [-Werror=implicit-function-declaration]
      drivers/gpu/drm/msm/msm_drv.c:245:2: error: implicit declaration of function 'msm_rd_debugfs_cleanup';did you mean 'msm_framebuffer_cleanup'? [-Werror=implicit-function-declaration]
      
      This adds empty stub implementations for that case.
      
      Fixes: 85eac470 ("drm/msm: Remove msm_debugfs_cleanup()")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170320093936.1255573-1-arnd@arndb.de
      3a270e4d
    • Gabriel Krisman Bertazi's avatar
      drm: bochs: Don't remove uninitialized fbdev framebuffer · 4fa13dbe
      Gabriel Krisman Bertazi authored
      In the same spirit of the fix for QXL in commit 86107838 ("drm: qxl:
      Don't alloc fbdev if emulation is not supported"), prevent the Oops in
      the unbind path of Bochs if fbdev emulation is disabled.
      
      [  112.176009] Oops: 0002 [#1] SMP
      [  112.176009] Modules linked in: bochs_drm
      [  112.176009] CPU: 0 PID: 3002 Comm: bash Not tainted 4.11.0-rc1+ #111
      [  112.176009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
      [  112.176009] task: ffff8800743bbac0 task.stack: ffffc90000b5c000
      [  112.176009] RIP: 0010:mutex_lock+0x18/0x30
      [  112.176009] RSP: 0018:ffffc90000b5fc78 EFLAGS: 00010246
      [  112.176009] RAX: 0000000000000000 RBX: 0000000000000260 RCX: 0000000000000000
      [  112.176009] RDX: ffff8800743bbac0 RSI: ffff8800787176e0 RDI: 0000000000000260
      [  112.176009] RBP: ffffc90000b5fc80 R08: ffffffff00000000 R09: 00000000ffffffff
      [  112.176009] R10: ffff88007b463650 R11: 0000000000000000 R12: 0000000000000260
      [  112.176009] R13: ffff8800787176e0 R14: ffffffffa0003068 R15: 0000000000000060
      [  112.176009] FS:  00007f20564c7b40(0000) GS:ffff88007ce00000(0000) knlGS:0000000000000000
      [  112.176009] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  112.176009] CR2: 0000000000000260 CR3: 000000006b89c000 CR4: 00000000000006f0
      [  112.176009] Call Trace:
      [  112.176009]  drm_mode_object_unregister+0x1e/0x50
      [  112.176009]  drm_framebuffer_unregister_private+0x15/0x20
      [  112.176009]  bochs_fbdev_fini+0x57/0x70 [bochs_drm]
      [  112.176009]  bochs_unload+0x16/0x50 [bochs_drm]
      [  112.176009]  drm_dev_unregister+0x37/0xd0
      [  112.176009]  drm_put_dev+0x31/0x60
      [  112.176009]  bochs_pci_remove+0x10/0x20 [bochs_drm]
      [  112.176009]  pci_device_remove+0x34/0xb0
      [  112.176009]  device_release_driver_internal+0x150/0x200
      [  112.176009]  device_release_driver+0xd/0x10
      [  112.176009]  unbind_store+0x108/0x150
      [  112.176009]  drv_attr_store+0x20/0x30
      [  112.176009]  sysfs_kf_write+0x32/0x40
      [  112.176009]  kernfs_fop_write+0x10b/0x190
      [  112.176009]  __vfs_write+0x23/0x120
      [  112.176009]  ? security_file_permission+0x36/0xb0
      [  112.176009]  ? rw_verify_area+0x49/0xb0
      [  112.176009]  vfs_write+0xb0/0x190
      [  112.176009]  SyS_write+0x41/0xa0
      [  112.176009]  entry_SYSCALL_64_fastpath+0x1a/0xa9
      [  112.176009] RIP: 0033:0x7f2055bd5620
      [  112.176009] RSP: 002b:00007ffed2f487d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
      [  112.176009] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2055bd5620
      [  112.176009] RDX: 000000000000000d RSI: 0000000000ee0008 RDI: 0000000000000001
      [  112.176009] RBP: 0000000000000001 R08: 00007f2055e94760 R09: 00007f20564c7b40
      [  112.176009] R10: 0000000000000073 R11: 0000000000000246 R12: 0000000000000000
      [  112.176009] R13: 00007ffed2f48d70 R14: 0000000000000000 R15: 0000000000000000
      [  112.176009] Code: 00 00 00 55 be 02 00 00 00 48 89 e5 e8 62 fb ff ff 5d c3 55 48 89 e5 53 48 89 fb e8 53 e9 ff ff 65 48 8b 14 25 40 c4 00 00 31 c0 <f0> 48 0f b1 13 48 85 c0 74 08 48 89 df e8c6 ff ff ff 5b 5d c3
      [  112.176009] RIP: mutex_lock+0x18/0x30 RSP: ffffc90000b5fc78
      [  112.176009] CR2: 0000000000000260
      [  112.205622] ---[ end trace 76189cd7a9bdd155 ]---
      Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170317181409.4183-1-krisman@collabora.co.ukSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      4fa13dbe
    • Daniel Vetter's avatar
      c5bd2e14
    • Dave Airlie's avatar
      Merge tag 'imx-drm-next-2017-03-17' of git://git.pengutronix.de/git/pza/linux into drm-next · 33d5f513
      Dave Airlie authored
      imx-drm PRE/PRG support, deferred plane disabling, separate alpha support
      
      - Initial support for the Prefetch Resolve Engine/Gasket on i.MX6QP,
        improving linear scanout buffer memory bandwidth utilization. This
        will in the future grow reordering support and allow direct scanout
        of Vivante tiled renderbuffers from the GPU.
      - Deferred plane disabling gets rid of some busy waiting in the atomic
        plane disable and crtc disable paths that lead to wait_for_vblank
        timeouts.
      - Add support for RGBA formats with a separate alpha plane, that can
        reduce memory bandwidth utilization for mostly transparent overlay
        planes by skipping color reads for completely transparent regions.
      - Allow moving an active overlay plane without enforcing a modeset.
      - Add 8-bit and 16-bit bayer formats to ipu_cpmem_set_image.
      - Set the base address in ipu_cpmem_set_image even for invalid formats
        to increase robustness against errors.
      - Use drm_plane_helper_check_state in plane atomic_check.
      - Some cleanup.
      
      * tag 'imx-drm-next-2017-03-17' of git://git.pengutronix.de/git/pza/linux: (22 commits)
        drm/imx: Remove unneeded definition for structure imx_drm_component
        drm/imx: use PRG/PRE when possible
        drm/imx: enable/disable PRG on CRTC enable/disable
        gpu: ipu-v3: only set non-zero AXI ID for IC when PRG is absent
        gpu: ipu-v3: hook up PRG unit
        gpu: ipu-v3: document valid IPUv3 compatibles and extend for i.MX6 QuadPlus
        gpu: ipu-v3: add driver for Prefetch Resolve Gasket
        gpu: ipu-v3: add DT binding for the Prefetch Resolve Gasket
        gpu: ipu-v3: add driver for Prefetch Resolve Engine
        gpu: ipu-v3: add DT binding for the Prefetch Resolve Engine
        drm/imx: ipuv3-plane: add support for separate alpha planes
        drm/imx: extend drm_plane_state_to_eba for separate channel support
        gpu: ipu-v3: add support for separate alpha channels
        drm: add RGB formats with separate alpha plane
        drm/imx: add deferred plane disabling
        drm/imx: don't wait for vblank and stop calling cleanup_planes in commit_tail
        gpu: ipu-v3: add unsynchronised DP channel disabling
        gpu: ipu-v3: remove IRQ dance on DC channel disable
        gpu: ipu-cpmem: add bayer formats to ipu_cpmem_set_image
        gpu: ipu-cpmem: set image base address even for incorrect formats
        ...
      33d5f513
    • Linus Torvalds's avatar
      Linux 4.11-rc3 · 97da3854
      Linus Torvalds authored
      97da3854