1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 */ 5 6 #ifndef _DPU_WRITEBACK_H 7 #define _DPU_WRITEBACK_H 8 9 #include <drm/drm_crtc.h> 10 #include <drm/drm_file.h> 11 #include <drm/drm_probe_helper.h> 12 #include <drm/drm_writeback.h> 13 14 #include "msm_drv.h" 15 #include "dpu_kms.h" 16 #include "dpu_encoder_phys.h" 17 18 struct dpu_wb_connector { 19 struct drm_writeback_connector base; 20 struct drm_encoder *wb_enc; 21 u32 maxlinewidth; 22 }; 23 to_dpu_wb_conn(struct drm_writeback_connector * conn)24static inline struct dpu_wb_connector *to_dpu_wb_conn(struct drm_writeback_connector *conn) 25 { 26 return container_of(conn, struct dpu_wb_connector, base); 27 } 28 29 int dpu_writeback_init(struct drm_device *dev, struct drm_encoder *enc, 30 const u32 *format_list, u32 num_formats, u32 maxlinewidth); 31 32 #endif /*_DPU_WRITEBACK_H */ 33