1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * RZ/G2L Display Unit Encoder 4 * 5 * Copyright (C) 2023 Renesas Electronics Corporation 6 * 7 * Based on rcar_du_encoder.h 8 */ 9 10 #ifndef __RZG2L_DU_ENCODER_H__ 11 #define __RZG2L_DU_ENCODER_H__ 12 13 #include <drm/drm_encoder.h> 14 #include <linux/container_of.h> 15 16 struct rzg2l_du_device; 17 18 struct rzg2l_du_encoder { 19 struct drm_encoder base; 20 enum rzg2l_du_output output; 21 }; 22 to_rzg2l_encoder(struct drm_encoder * e)23static inline struct rzg2l_du_encoder *to_rzg2l_encoder(struct drm_encoder *e) 24 { 25 return container_of(e, struct rzg2l_du_encoder, base); 26 } 27 28 int rzg2l_du_encoder_init(struct rzg2l_du_device *rcdu, 29 enum rzg2l_du_output output, 30 struct device_node *enc_node); 31 32 #endif /* __RZG2L_DU_ENCODER_H__ */ 33