[Intel-gfx] [PATCH 2/7] drm: delay vblank cleanup until after driver unload

Kristian Høgsberg krh at bitplanet.net
Mon Mar 29 00:30:16 CEST 2010


On Fri, Mar 26, 2010 at 7:07 PM, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> Drivers may use vblank calls now (e.g. drm_vblank_off) in their unload
> paths, so don't clean up the vblank related structures until after
> driver unload.

I haven't tested this specific patch on a recent DRM, but I made the
same patch a while ago, and it fixed module unload for me.  I sent it
to the list and it fell through the cracks, because "vblank is hard"
or something.

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
>  drivers/gpu/drm/drm_stub.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
> index ad73e14..543e79c 100644
> --- a/drivers/gpu/drm/drm_stub.c
> +++ b/drivers/gpu/drm/drm_stub.c
> @@ -515,8 +515,6 @@ void drm_put_dev(struct drm_device *dev)
>        }
>        driver = dev->driver;
>
> -       drm_vblank_cleanup(dev);
> -
>        drm_lastclose(dev);
>
>        if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
> @@ -536,6 +534,8 @@ void drm_put_dev(struct drm_device *dev)
>                dev->agp = NULL;
>        }
>
> +       drm_vblank_cleanup(dev);
> +
>        list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
>                drm_rmmap(dev, r_list->map);
>        drm_ht_remove(&dev->map_hash);
> --
> 1.6.1.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>



More information about the Intel-gfx mailing list