diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2014-08-28 11:07:34 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:46 +0900 |
commit | 3819e4d918c2cffcf473153119f3fb113e2612c4 (patch) | |
tree | 7d28dd212d125aeba8153005ca46ca7bd17be12a /drivers/gpu/drm | |
parent | 9518f37ecc2b8feabb0cec12790f8d28ba3b3d17 (diff) | |
download | linux-3.10-3819e4d918c2cffcf473153119f3fb113e2612c4.tar.gz linux-3.10-3819e4d918c2cffcf473153119f3fb113e2612c4.tar.bz2 linux-3.10-3819e4d918c2cffcf473153119f3fb113e2612c4.zip |
drm/exynos/ipp: stop hardware before freeing memory
Memory shouldn't be freed when hardware is still running.
Change-Id: I2ac15beee14bf3d952a15367bf2f4d1366445eac
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 68b8ae34d19..53262563265 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -1387,13 +1387,17 @@ static int ipp_stop_property(struct drm_device *drm_dev, struct drm_exynos_ipp_cmd_node *c_node) { struct drm_exynos_ipp_property *property = &c_node->property; - int ret = 0, i; + int i; DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id); /* put event */ ipp_put_event(c_node, NULL); + /* stop operations */ + if (ippdrv->stop) + ippdrv->stop(ippdrv->dev, property->cmd); + /* check command */ switch (property->cmd) { case IPP_CMD_M2M: @@ -1408,16 +1412,10 @@ static int ipp_stop_property(struct drm_device *drm_dev, break; default: DRM_ERROR("invalid operations.\n"); - ret = -EINVAL; - goto err_clear; + return -EINVAL; } -err_clear: - /* stop operations */ - if (ippdrv->stop) - ippdrv->stop(ippdrv->dev, property->cmd); - - return ret; + return 0; } void ipp_sched_cmd(struct work_struct *work) |