Skip to content

Commit

Permalink
drm/exynos: added postclose to release resource.
Browse files Browse the repository at this point in the history
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Inki Dae authored and Dave Airlie committed Feb 16, 2012
1 parent bc41eae commit 53ef299
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/gpu/drm/exynos/exynos_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ static void exynos_drm_preclose(struct drm_device *dev,

}

static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
{
DRM_DEBUG_DRIVER("%s\n", __FILE__);

if (!file->driver_priv)
return;

kfree(file->driver_priv);
file->driver_priv = NULL;
}

static void exynos_drm_lastclose(struct drm_device *dev)
{
DRM_DEBUG_DRIVER("%s\n", __FILE__);
Expand Down Expand Up @@ -193,6 +204,7 @@ static struct drm_driver exynos_drm_driver = {
.unload = exynos_drm_unload,
.preclose = exynos_drm_preclose,
.lastclose = exynos_drm_lastclose,
.postclose = exynos_drm_postclose,
.get_vblank_counter = drm_vblank_count,
.enable_vblank = exynos_drm_crtc_enable_vblank,
.disable_vblank = exynos_drm_crtc_disable_vblank,
Expand Down

0 comments on commit 53ef299

Please sign in to comment.