Merge tag 'i3c/for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux
[linux-2.6-block.git] / drivers / gpu / drm / imx / ipuv3-plane.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
b8d181e4
PZ
2#ifndef __IPUV3_PLANE_H__
3#define __IPUV3_PLANE_H__
4
5#include <drm/drm_crtc.h> /* drm_plane */
6
7struct drm_plane;
8struct drm_device;
9struct ipu_soc;
10struct drm_crtc;
11struct drm_framebuffer;
12
13struct ipuv3_channel;
14struct dmfc_channel;
15struct ipu_dp;
16
17struct ipu_plane {
18 struct drm_plane base;
19
20 struct ipu_soc *ipu;
21 struct ipuv3_channel *ipu_ch;
f6b50ef1 22 struct ipuv3_channel *alpha_ch;
b8d181e4
PZ
23 struct dmfc_channel *dmfc;
24 struct ipu_dp *dp;
25
26 int dma;
27 int dp_flow;
eb8c8880
PZ
28
29 bool disabling;
b8d181e4
PZ
30};
31
32struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
33 int dma, int dp, unsigned int possible_crtcs,
43895599 34 enum drm_plane_type type);
b8d181e4
PZ
35
36/* Init IDMAC, DMFC, DP */
37int ipu_plane_mode_set(struct ipu_plane *plane, struct drm_crtc *crtc,
38 struct drm_display_mode *mode,
39 struct drm_framebuffer *fb, int crtc_x, int crtc_y,
40 unsigned int crtc_w, unsigned int crtc_h,
41 uint32_t src_x, uint32_t src_y, uint32_t src_w,
dd7fa6d8 42 uint32_t src_h, bool interlaced);
b8d181e4 43
b8d181e4
PZ
44int ipu_plane_irq(struct ipu_plane *plane);
45
eb8c8880
PZ
46void ipu_plane_disable(struct ipu_plane *ipu_plane, bool disable_dp_channel);
47void ipu_plane_disable_deferred(struct drm_plane *plane);
70e8a0c7 48bool ipu_plane_atomic_update_pending(struct drm_plane *plane);
eb8c8880 49
b8d181e4 50#endif