Re: [PATCH 00/23] drm: Eliminate plane->fb/crtc usage for atomic drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Den 22.03.2018 16.22, skrev Ville Syrjala:
From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

I really just wanted to fix i915 to re-enable its planes afer load
detection (a two line patch). This is what I actually ended up with
after I ran into a framebuffer refcount leak with said two line patch.

I've tested this on a few i915 boxes and so far it's looking
good. Everything else is just compile tested.

Entire series available here:
git://github.com/vsyrjala/linux.git plane_fb_crtc_nuke

Cc: Alex Deucher <alexander.deucher@xxxxxxx>
Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxx>
Cc: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxxxxxxx>
Cc: chris@xxxxxxxxxxxxxxxxxx
Cc: "Christian König" <christian.koenig@xxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Cc: Dave Airlie <airlied@xxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: "David (ChunMing) Zhou" <David1.Zhou@xxxxxxx>
Cc: Eric Anholt <eric@xxxxxxxxxx>
Cc: freedreno@xxxxxxxxxxxxxxxxxxxxx
Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Cc: Harry Wentland <harry.wentland@xxxxxxx>
Cc: Inki Dae <inki.dae@xxxxxxxxxxx>
Cc: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
Cc: martin.peres@xxxxxxx
Cc: Rob Clark <robdclark@xxxxxxxxx>
Cc: Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>
Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
Cc: Sinclair Yeh <syeh@xxxxxxxxxx>
Cc: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
Cc: Vincent Abriou <vincent.abriou@xxxxxx>
Cc: virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
Cc: VMware Graphics <linux-graphics-maintainer@xxxxxxxxxx>

Ville Syrjälä (23):
   Revert "drm/atomic-helper: Fix leak in disable_all"
   drm/atomic-helper: Make drm_atomic_helper_disable_all() update the
     plane->fb pointers
   drm: Clear crtc->primary->crtc when disabling the crtc via setcrtc()
   drm/atomic-helper: WARN if legacy plane fb pointers are bogus when
     committing duplicated state
   drm: Add local 'plane' variable for primary/cursor planes
   drm: Adjust whitespace for legibility
   drm: Make the fb refcount handover less magic
   drm: Use plane->state->fb over plane->fb
   drm/i915: Stop consulting plane->fb
   drm/msm: Stop consulting plane->fb
   drm/sti: Stop consulting plane->fb
   drm/vmwgfx: Stop consulting plane->fb
   drm/zte: Stop consulting plane->fb
   drm/atmel-hlcdc: Stop using plane->fb
   drm: Stop updating plane->crtc/fb/old_fb on atomic drivers
   drm/amdgpu/dc: Stop updating plane->fb
   drm/i915: Stop updating plane->fb/crtc
   drm/exynos: Stop updating plane->crtc
   drm/msm: Stop updating plane->fb/crtc
   drm/virtio: Stop updating plane->fb
   drm/vc4: Stop updating plane->fb/crtc
   drm/i915: Restore planes after load detection
   drm/i915: Make force_load_detect effective even w/ DMI quirks/hotplug

tinydrm is also using plane->fb:

$ grep -r "plane\.fb" drivers/gpu/drm/tinydrm/
drivers/gpu/drm/tinydrm/repaper.c:      if (tdev->pipe.plane.fb != fb)
drivers/gpu/drm/tinydrm/mipi-dbi.c:     if (tdev->pipe.plane.fb != fb)
drivers/gpu/drm/tinydrm/mipi-dbi.c:     struct drm_framebuffer *fb = mipi->tinydrm.pipe.plane.fb;
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c: pipe->plane.fb = fb;
drivers/gpu/drm/tinydrm/ili9225.c:      if (tdev->pipe.plane.fb != fb)
drivers/gpu/drm/tinydrm/st7586.c:       if (tdev->pipe.plane.fb != fb)

Noralf.

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  2 -
  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c   | 12 +---
  drivers/gpu/drm/drm_atomic.c                      | 55 ++--------------
  drivers/gpu/drm/drm_atomic_helper.c               | 79 ++++++++++-------------
  drivers/gpu/drm/drm_crtc.c                        | 51 ++++++++++-----
  drivers/gpu/drm/drm_fb_helper.c                   |  7 --
  drivers/gpu/drm/drm_framebuffer.c                 |  5 --
  drivers/gpu/drm/drm_plane.c                       | 64 +++++++++++-------
  drivers/gpu/drm/drm_plane_helper.c                |  4 +-
  drivers/gpu/drm/exynos/exynos_drm_plane.c         |  2 -
  drivers/gpu/drm/i915/intel_crt.c                  |  6 ++
  drivers/gpu/drm/i915/intel_display.c              |  9 +--
  drivers/gpu/drm/i915/intel_fbdev.c                |  2 +-
  drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c         |  3 +-
  drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c        |  2 -
  drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c        |  2 -
  drivers/gpu/drm/sti/sti_plane.c                   |  9 +--
  drivers/gpu/drm/vc4/vc4_crtc.c                    |  3 -
  drivers/gpu/drm/virtio/virtgpu_display.c          |  2 -
  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c               |  6 +-
  drivers/gpu/drm/zte/zx_vou.c                      |  2 +-
  include/drm/drm_atomic.h                          |  3 -
  22 files changed, 143 insertions(+), 187 deletions(-)


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux