forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/media/platform/rockchip/rga/rga-buf.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2017 Fuzhou Rockchip Electronics Co.Ltd
34 * Author: Jacob Chen <jacob-chen@iotwrt.com>
4
- *
5
- * This software is licensed under the terms of the GNU General Public
6
- * License version 2, as published by the Free Software Foundation, and
7
- * may be copied, distributed, and modified under those terms.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #include <linux/pm_runtime.h>
....@@ -87,9 +79,8 @@
8779 struct rockchip_rga *rga = ctx->rga;
8880 int ret;
8981
90
- ret = pm_runtime_get_sync(rga->dev);
82
+ ret = pm_runtime_resume_and_get(rga->dev);
9183 if (ret < 0) {
92
- pm_runtime_put_noidle(rga->dev);
9384 rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED);
9485 return ret;
9586 }