1. 26 10月, 2020 1 次提交
  2. 20 7月, 2020 1 次提交
    • P
      drm/imx: fix use after free · ba807c94
      Philipp Zabel 提交于
      Component driver structures allocated with devm_kmalloc() in bind() are
      freed automatically after unbind(). Since the contained drm structures
      are accessed afterwards in drm_mode_config_cleanup(), move the
      allocation into probe() to extend the driver structure's lifetime to the
      lifetime of the device. This should eventually be changed to use drm
      resource managed allocations with lifetime of the drm device.
      
      We also need to ensure that all componets are available during the
      unbind() so we need to call component_unbind_all() before we free
      non-devres resources like planes.
      
      Note this patch fixes the the use after free bug but introduces a
      possible boot loop issue. The issue is triggered if the HDMI support is
      enabled and a component driver always return -EPROBE_DEFER, see
      discussion [1] for more details.
      
      [1] https://lkml.org/lkml/2020/3/24/1467
      
      Fixes: 17b5001b ("imx-drm: convert to componentised device support")
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      [m.felsch@pengutronix: fix imx_tve_probe()]
      [m.felsch@pengutronix: resort component_unbind_all())
      [m.felsch@pengutronix: adapt commit message]
      Signed-off-by: NMarco Felsch <m.felsch@pengutronix.de>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      ba807c94
  3. 10 6月, 2020 2 次提交
  4. 02 4月, 2020 1 次提交
  5. 19 3月, 2020 1 次提交
  6. 17 7月, 2019 1 次提交
  7. 22 6月, 2019 1 次提交
  8. 21 6月, 2019 1 次提交
    • D
      drm/prime: Actually remove DRIVER_PRIME everywhere · 0424fdaf
      Daniel Vetter 提交于
      Split out to make the functional changes stick out more.
      
      All places where DRIVER_PRIME was used have been removed in previous
      patches already.
      
      v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE.
      
      v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE.
      
      v4: Don't add a space in i915_drv.c (Sam)
      
      v5: Add note that previous patches removed all the DRIVER_PRIME users
      already (Emil).
      
      v6: Fixupe ingenic (new driver) while applying.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Reviewed-by: NEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: etnaviv@lists.freedesktop.org
      Cc: freedreno@lists.freedesktop.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: lima@lists.freedesktop.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: linux-aspeed@lists.ozlabs.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-stm32@st-md-mailman.stormreply.com
      Cc: linux-tegra@vger.kernel.org
      Cc: nouveau@lists.freedesktop.org
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: spice-devel@lists.freedesktop.org
      Cc: virtualization@lists.linux-foundation.org
      Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
      Cc: xen-devel@lists.xenproject.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20190617153924.414-1-daniel.vetter@ffwll.ch
      0424fdaf
  9. 22 2月, 2019 1 次提交
    • P
      drm/imx: ipuv3-plane: add zpos property · 74a3dba2
      Philipp Zabel 提交于
      Add a zpos property to planes. Call drm_atomic_helper_check() instead of
      calling drm_atomic_helper_check_modeset() and drm_atomic_check_planes()
      manually. This effectively adds a call to drm_atomic_normalize_zpos()
      before checking planes. Reorder atomic update to allow changing plane
      zpos without modeset.
      
      Note that the initial zpos is set in ipu_plane_state_reset(). The
      initial value set in ipu_plane_init() is just for show. The zpos
      parameter of drm_plane_create_zpos_property() is ignored because
      the newly created plane do not have state yet.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Tested-by: NMarius Vlad <marius.vlad@collabora.com>
      74a3dba2
  10. 19 2月, 2019 1 次提交
  11. 24 1月, 2019 1 次提交
  12. 05 11月, 2018 1 次提交
  13. 05 10月, 2018 1 次提交
  14. 27 9月, 2018 1 次提交
  15. 25 9月, 2018 1 次提交
  16. 01 8月, 2018 1 次提交
  17. 17 7月, 2018 2 次提交
  18. 19 12月, 2017 1 次提交
  19. 08 12月, 2017 1 次提交
  20. 30 11月, 2017 1 次提交
  21. 16 9月, 2017 1 次提交
  22. 29 7月, 2017 1 次提交
  23. 13 7月, 2017 1 次提交
  24. 31 5月, 2017 1 次提交
  25. 04 4月, 2017 1 次提交
  26. 16 3月, 2017 2 次提交
  27. 15 3月, 2017 2 次提交
    • P
      drm/imx: add deferred plane disabling · eb8c8880
      Philipp Zabel 提交于
      The DP (display processor) channel disable code tried to busy wait for
      the DP sync flow end interrupt status bit when disabling the partial
      plane without a full modeset. That never worked reliably, and it was
      disabled completely by the recent "gpu: ipu-v3: remove IRQ dance on DC
      channel disable" patch, causing ipu_wait_interrupt to always time out
      after 50 ms, which in turn would trigger a timeout in
      drm_atomic_helper_wait_for_vblanks.
      
      This patch changes ipu_plane_atomic_disable to only queue a DP channel
      register update at the next frame boundary and set a flag, which can be
      done without any waiting whatsoever. The imx_drm_atomic_commit_tail then
      calls a new ipu_plane_disable_deferred function that does the actual
      IDMAC teardown of the planes that are flagged for deferred disabling,
      after waiting for the vblank.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: NLucas Stach <l.stach@pengutronix.de>
      eb8c8880
    • P
      drm/imx: don't wait for vblank and stop calling cleanup_planes in commit_tail · cf92fefd
      Philipp Zabel 提交于
      drm_atomic_helper_cleanup_planes only calls the cleanup_fb plane
      helpers, which we don't implement as a CMA framebuffer based driver.
      There is no reason to wait for vblanks in commit_tail only to do nothing
      afterwards.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Reviewed-by: NLucas Stach <l.stach@pengutronix.de>
      cf92fefd
  28. 14 3月, 2017 1 次提交
  29. 17 2月, 2017 1 次提交
  30. 12 2月, 2017 1 次提交
  31. 09 2月, 2017 1 次提交
  32. 08 2月, 2017 1 次提交
  33. 03 2月, 2017 1 次提交
    • G
      drm: Rely on mode_config data for fb_helper initialization · e4563f6b
      Gabriel Krisman Bertazi 提交于
      Instead of receiving the num_crts as a parameter, we can read it
      directly from the mode_config structure.  I audited the drivers that
      invoke this helper and I believe all of them initialize the mode_config
      struct accordingly, prior to calling the fb_helper.
      
      I used the following coccinelle hack to make this transformation, except
      for the function headers and comment updates.  The first and second
      rules are split because I couldn't find a way to remove the unused
      temporary variables at the same time I removed the parameter.
      
      // <smpl>
      @r@
      expression A,B,D,E;
      identifier C;
      @@
      (
      - drm_fb_helper_init(A,B,C,D)
      + drm_fb_helper_init(A,B,D)
      |
      - drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
      + drm_fbdev_cma_init_with_funcs(A,B,D,E)
      |
      - drm_fbdev_cma_init(A,B,C,D)
      + drm_fbdev_cma_init(A,B,D)
      )
      
      @@
      expression A,B,C,D,E;
      @@
      (
      - drm_fb_helper_init(A,B,C,D)
      + drm_fb_helper_init(A,B,D)
      |
      - drm_fbdev_cma_init_with_funcs(A,B,C,D,E)
      + drm_fbdev_cma_init_with_funcs(A,B,D,E)
      |
      - drm_fbdev_cma_init(A,B,C,D)
      + drm_fbdev_cma_init(A,B,D)
      )
      
      @@
      identifier r.C;
      type T;
      expression V;
      @@
      - T C;
      <...
      when != C
      - C = V;
      ...>
      // </smpl>
      
      Changes since v1:
       - Rebased on top of the tip of drm-misc-next.
       - Remove mention to sti since a proper fix got merged.
      Suggested-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Reviewed-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170202162640.27261-1-krisman@collabora.co.uk
      e4563f6b
  34. 15 11月, 2016 1 次提交
  35. 08 11月, 2016 1 次提交
  36. 18 10月, 2016 1 次提交