diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2014-08-28 09:07:34 (GMT) |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2014-09-19 15:56:12 (GMT) |
commit | 8aa99dd3762b67e6555a9f3ef015989bbace39a5 (patch) | |
tree | 5f20b73752bdef21a22f8e4573f4a0f846fb0ab8 | |
parent | 05afb1ac5391a65b0f7e024064ab8f56397f6559 (diff) | |
download | linux-8aa99dd3762b67e6555a9f3ef015989bbace39a5.tar.xz |
drm/exynos/ipp: stop hardware before freeing memory
Memory shouldn't be freed when hardware is still running.
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>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index fff3509..341db52 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -1282,12 +1282,15 @@ 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("prop_id[%d]\n", 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) { @@ -1303,16 +1306,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) |