diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2014-08-28 05:07:34 -0400 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2014-09-19 11:56:12 -0400 |
commit | 8aa99dd3762b67e6555a9f3ef015989bbace39a5 (patch) | |
tree | 5f20b73752bdef21a22f8e4573f4a0f846fb0ab8 | |
parent | 05afb1ac5391a65b0f7e024064ab8f56397f6559 (diff) |
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 fff3509f7b97..341db52e3939 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, | |||
1282 | struct drm_exynos_ipp_cmd_node *c_node) | 1282 | struct drm_exynos_ipp_cmd_node *c_node) |
1283 | { | 1283 | { |
1284 | struct drm_exynos_ipp_property *property = &c_node->property; | 1284 | struct drm_exynos_ipp_property *property = &c_node->property; |
1285 | int ret = 0, i; | 1285 | int i; |
1286 | 1286 | ||
1287 | DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id); | 1287 | DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id); |
1288 | 1288 | ||
1289 | /* put event */ | 1289 | /* put event */ |
1290 | ipp_put_event(c_node, NULL); | 1290 | ipp_put_event(c_node, NULL); |
1291 | /* stop operations */ | ||
1292 | if (ippdrv->stop) | ||
1293 | ippdrv->stop(ippdrv->dev, property->cmd); | ||
1291 | 1294 | ||
1292 | /* check command */ | 1295 | /* check command */ |
1293 | switch (property->cmd) { | 1296 | switch (property->cmd) { |
@@ -1303,16 +1306,10 @@ static int ipp_stop_property(struct drm_device *drm_dev, | |||
1303 | break; | 1306 | break; |
1304 | default: | 1307 | default: |
1305 | DRM_ERROR("invalid operations.\n"); | 1308 | DRM_ERROR("invalid operations.\n"); |
1306 | ret = -EINVAL; | 1309 | return -EINVAL; |
1307 | goto err_clear; | ||
1308 | } | 1310 | } |
1309 | 1311 | ||
1310 | err_clear: | 1312 | return 0; |
1311 | /* stop operations */ | ||
1312 | if (ippdrv->stop) | ||
1313 | ippdrv->stop(ippdrv->dev, property->cmd); | ||
1314 | |||
1315 | return ret; | ||
1316 | } | 1313 | } |
1317 | 1314 | ||
1318 | void ipp_sched_cmd(struct work_struct *work) | 1315 | void ipp_sched_cmd(struct work_struct *work) |