12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef __UBWCP_HW_H_
- #define __UBWCP_HW_H_
- #define HW_BUFFER_FORMAT_RGBA 0x0
- #define HW_BUFFER_FORMAT_NV12 0x2
- #define HW_BUFFER_FORMAT_NV124R 0x4
- #define HW_BUFFER_FORMAT_P010 0x6
- #define HW_BUFFER_FORMAT_TP10 0x8
- #define HW_BUFFER_FORMAT_P016 0xA
- #define HW_BUFFER_FORMAT_LINEAR 0xF
- #define INTERRUPT_READ_ERROR 0
- #define INTERRUPT_WRITE_ERROR 1
- #define INTERRUPT_DECODE_ERROR 2
- #define INTERRUPT_ENCODE_ERROR 3
- struct ubwcp_dev {
- void __iomem *base;
- struct device *dev;
- int irq;
- struct clk *clk;
- struct clk *pclk;
-
- };
- struct __packed ubwcp_hw_meta_metadata {
- u64 uv_start_addr : 48;
- u16 format : 16;
- u16 stride;
- u16 stride_ubwcp;
- u32 metadata_base_y;
- u32 metadata_base_uv;
- u16 buffer_y_offset;
- u16 buffer_uv_offset;
- u32 width_height;
- };
- void ubwcp_hw_version(void __iomem *base, u32 *major, u32 *minor);
- void ubwcp_hw_set_buf_desc(void __iomem *base, u64 desc_addr, u16 desc_stride);
- void ubwcp_hw_enable_range_check(void __iomem *base, u16 index);
- int ubwcp_hw_disable_range_check_with_flush(void __iomem *base, u16 index);
- void ubwcp_hw_set_range_check(void __iomem *base, u16 index, phys_addr_t pa, size_t size);
- u64 ubwcp_hw_interrupt_src_address(void __iomem *base, u16 interrupt);
- void ubwcp_hw_interrupt_clear(void __iomem *base, u16 interrupt);
- void ubwcp_hw_interrupt_enable(void __iomem *base, u16 interrupt, bool enable);
- void ubwcp_hw_power_on(void __iomem *pwr_ctrl, bool power_on);
- void ubwcp_hw_one_time_init(void __iomem *base);
- int ubwcp_hw_flush(void __iomem *base);
- void ubwcp_hw_trace_set(bool value);
- void ubwcp_hw_trace_get(bool *value);
- void ubwcp_hw_single_tile(void __iomem *base, bool en);
- #endif
|