1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * R-Car Display Unit Writeback Support 4 * 5 * Copyright (C) 2019 Laurent Pinchart <laurent.pinchart@ideasonboard.com> 6 */ 7 8 #ifndef __RCAR_DU_WRITEBACK_H__ 9 #define __RCAR_DU_WRITEBACK_H__ 10 11 #include <drm/drm_plane.h> 12 13 struct rcar_du_crtc; 14 struct rcar_du_device; 15 struct vsp1_du_atomic_pipe_config; 16 17 #ifdef CONFIG_DRM_RCAR_WRITEBACK 18 int rcar_du_writeback_init(struct rcar_du_device *rcdu, 19 struct rcar_du_crtc *rcrtc); 20 void rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc, 21 struct vsp1_du_writeback_config *cfg); 22 void rcar_du_writeback_complete(struct rcar_du_crtc *rcrtc); 23 #else rcar_du_writeback_init(struct rcar_du_device * rcdu,struct rcar_du_crtc * rcrtc)24static inline int rcar_du_writeback_init(struct rcar_du_device *rcdu, 25 struct rcar_du_crtc *rcrtc) 26 { 27 return -ENXIO; 28 } 29 static inline void rcar_du_writeback_setup(struct rcar_du_crtc * rcrtc,struct vsp1_du_writeback_config * cfg)30rcar_du_writeback_setup(struct rcar_du_crtc *rcrtc, 31 struct vsp1_du_writeback_config *cfg) 32 { 33 } rcar_du_writeback_complete(struct rcar_du_crtc * rcrtc)34static inline void rcar_du_writeback_complete(struct rcar_du_crtc *rcrtc) 35 { 36 } 37 #endif 38 39 #endif /* __RCAR_DU_WRITEBACK_H__ */ 40