hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/gpu/ipu-v3/ipu-prg.c
....@@ -1,14 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2016-2017 Lucas Stach, Pengutronix
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms and conditions of the GNU General Public License,
6
- * version 2, as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope it will be useful, but WITHOUT
9
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
- * more details.
124 */
135
146 #include <drm/drm_fourcc.h>
....@@ -347,6 +339,22 @@
347339 }
348340 EXPORT_SYMBOL_GPL(ipu_prg_channel_configure);
349341
342
+bool ipu_prg_channel_configure_pending(struct ipuv3_channel *ipu_chan)
343
+{
344
+ int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);
345
+ struct ipu_prg *prg = ipu_chan->ipu->prg_priv;
346
+ struct ipu_prg_channel *chan;
347
+
348
+ if (prg_chan < 0)
349
+ return false;
350
+
351
+ chan = &prg->chan[prg_chan];
352
+ WARN_ON(!chan->enabled);
353
+
354
+ return ipu_pre_update_pending(prg->pres[chan->used_pre]);
355
+}
356
+EXPORT_SYMBOL_GPL(ipu_prg_channel_configure_pending);
357
+
350358 static int ipu_prg_probe(struct platform_device *pdev)
351359 {
352360 struct device *dev = &pdev->dev;