mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 09:01:47 +07:00
137caa702f
The current buffer check halves the frame rate on non-plus i.MX6Q,
as the IDMAC current buffer pointer is not yet updated when
ipu_plane_atomic_update_pending is called from the EOF irq handler.
Fixes: 70e8a0c71e
("drm/imx: ipuv3-plane: add function to query atomic update status")
Tested-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: stable@vger.kernel.org
54 lines
1.4 KiB
C
54 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __IPUV3_PLANE_H__
|
|
#define __IPUV3_PLANE_H__
|
|
|
|
#include <drm/drm_crtc.h> /* drm_plane */
|
|
|
|
struct drm_plane;
|
|
struct drm_device;
|
|
struct ipu_soc;
|
|
struct drm_crtc;
|
|
struct drm_framebuffer;
|
|
|
|
struct ipuv3_channel;
|
|
struct dmfc_channel;
|
|
struct ipu_dp;
|
|
|
|
struct ipu_plane {
|
|
struct drm_plane base;
|
|
|
|
struct ipu_soc *ipu;
|
|
struct ipuv3_channel *ipu_ch;
|
|
struct ipuv3_channel *alpha_ch;
|
|
struct dmfc_channel *dmfc;
|
|
struct ipu_dp *dp;
|
|
|
|
int dma;
|
|
int dp_flow;
|
|
|
|
bool disabling;
|
|
};
|
|
|
|
struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
|
|
int dma, int dp, unsigned int possible_crtcs,
|
|
enum drm_plane_type type);
|
|
|
|
/* Init IDMAC, DMFC, DP */
|
|
int ipu_plane_mode_set(struct ipu_plane *plane, struct drm_crtc *crtc,
|
|
struct drm_display_mode *mode,
|
|
struct drm_framebuffer *fb, int crtc_x, int crtc_y,
|
|
unsigned int crtc_w, unsigned int crtc_h,
|
|
uint32_t src_x, uint32_t src_y, uint32_t src_w,
|
|
uint32_t src_h, bool interlaced);
|
|
|
|
int ipu_plane_get_resources(struct ipu_plane *plane);
|
|
void ipu_plane_put_resources(struct ipu_plane *plane);
|
|
|
|
int ipu_plane_irq(struct ipu_plane *plane);
|
|
|
|
void ipu_plane_disable(struct ipu_plane *ipu_plane, bool disable_dp_channel);
|
|
void ipu_plane_disable_deferred(struct drm_plane *plane);
|
|
bool ipu_plane_atomic_update_pending(struct drm_plane *plane);
|
|
|
|
#endif
|