/*
* Rockchip drm private crtc funcs.
+ * @loader_protect: protect loader logo crtc's power
* @enable_vblank: enable crtc vblank irq.
* @disable_vblank: disable crtc vblank irq.
*/
struct rockchip_crtc_funcs {
+ int (*loader_protect)(struct drm_crtc *crtc, bool on);
int (*enable_vblank)(struct drm_crtc *crtc);
void (*disable_vblank)(struct drm_crtc *crtc);
void (*wait_for_update)(struct drm_crtc *crtc);
void (*cancel_pending_vblank)(struct drm_crtc *crtc, struct drm_file *file_priv);
+ int (*debugfs_dump)(struct drm_crtc *crtc, struct seq_file *s);
+ enum drm_mode_status (*mode_valid)(struct drm_crtc *crtc,
+ const struct drm_display_mode *mode,
+ int output_type);
};
struct drm_rockchip_subdrv {
struct rockchip_crtc_state {
struct drm_crtc_state base;
+ int left_margin;
+ int right_margin;
+ int top_margin;
+ int bottom_margin;
int afbdc_win_format;
int afbdc_win_width;
int afbdc_win_height;
int dsp_layer_sel;
int output_type;
int output_mode;
+ int bus_format;
};
#define to_rockchip_crtc_state(s) \
struct rockchip_logo {
struct sg_table *sgt;
+ struct drm_mm_node mm;
dma_addr_t dma_addr;
phys_addr_t start;
phys_addr_t size;
+ size_t iommu_map_size;
int count;
};
unsigned int cpu_fence_context;
atomic_t cpu_fence_seqno;
#endif
+ /* protect drm_mm on multi-threads */
+ struct mutex mm_lock;
struct drm_mm mm;
};
+#ifndef MODULE
+void rockchip_free_loader_memory(struct drm_device *drm);
+#endif
void rockchip_drm_atomic_work(struct work_struct *work);
int rockchip_register_crtc_funcs(struct drm_crtc *crtc,
const struct rockchip_crtc_funcs *crtc_funcs);