.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
12 | 4 | */ |
---|
13 | 5 | |
---|
14 | 6 | #include <drm/drm_fourcc.h> |
---|
.. | .. |
---|
347 | 339 | } |
---|
348 | 340 | EXPORT_SYMBOL_GPL(ipu_prg_channel_configure); |
---|
349 | 341 | |
---|
| 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 | + |
---|
350 | 358 | static int ipu_prg_probe(struct platform_device *pdev) |
---|
351 | 359 | { |
---|
352 | 360 | struct device *dev = &pdev->dev; |
---|