mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 19:24:02 +08:00
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>
This commit is contained in:
parent
05afb1ac53
commit
8aa99dd376
@ -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_cmd_node *c_node)
|
||||||
{
|
{
|
||||||
struct drm_exynos_ipp_property *property = &c_node->property;
|
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);
|
DRM_DEBUG_KMS("prop_id[%d]\n", property->prop_id);
|
||||||
|
|
||||||
/* put event */
|
/* put event */
|
||||||
ipp_put_event(c_node, NULL);
|
ipp_put_event(c_node, NULL);
|
||||||
|
/* stop operations */
|
||||||
|
if (ippdrv->stop)
|
||||||
|
ippdrv->stop(ippdrv->dev, property->cmd);
|
||||||
|
|
||||||
/* check command */
|
/* check command */
|
||||||
switch (property->cmd) {
|
switch (property->cmd) {
|
||||||
@ -1303,16 +1306,10 @@ static int ipp_stop_property(struct drm_device *drm_dev,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DRM_ERROR("invalid operations.\n");
|
DRM_ERROR("invalid operations.\n");
|
||||||
ret = -EINVAL;
|
return -EINVAL;
|
||||||
goto err_clear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err_clear:
|
return 0;
|
||||||
/* stop operations */
|
|
||||||
if (ippdrv->stop)
|
|
||||||
ippdrv->stop(ippdrv->dev, property->cmd);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ipp_sched_cmd(struct work_struct *work)
|
void ipp_sched_cmd(struct work_struct *work)
|
||||||
|
Loading…
Reference in New Issue
Block a user