]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: restrict plane loops to legacy planes
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Apr 2014 13:15:32 +0000 (15:15 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 24 Apr 2014 13:04:30 +0000 (15:04 +0200)
commitc5e288a19c85250181f07e58435b1f86aeb5a797
treee85c7af76a25f1c787627ed682bf90f044eab62a
parentc631ce211e8c1b2b974914067b432c886976d7f4
drm/tegra: restrict plane loops to legacy planes

In Matt Ropers primary plane series a set of prep patches like

commit 91d8ee612bbb33e559c287ee3fc81e3ed64edbf1
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Tue Apr 1 15:22:32 2014 -0700

    drm/i915: Restrict plane loops to only operate on overlay planes (v2)

ensured that all exisiting users of the mode_config->plane_list
wouldn't change behaviour. Unfortunately tegra seems to have fallen
through the cracks. Fix it.

This regression was introduced in

commit 22c89b87965b6dc5eb31b965dd09bdb0b3a46d8b
Author: Matt Roper <matthew.d.roper@intel.com>
Date:   Tue Apr 1 15:22:38 2014 -0700

    drm: Add drm_crtc_init_with_planes() (v2)

The result was that we've unref'ed the fb for the primary plane twice,
leading to a use-after free bug. This is because the drm core will
already set crtc->primary->fb to NULL and do the unref for us, and the
crtc disable hook is called by the drm crtc helpers for exactly this
case.

Aside: Now that the fbdev helpers clean up planes there's no longer a
need to do this in drivers. So this could probably be nuked entirely
in linux-next.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c