Lines Matching refs:hwdev
138 int (*query_hw)(struct malidp_hw_device *hwdev);
143 void (*enter_config_mode)(struct malidp_hw_device *hwdev);
148 void (*leave_config_mode)(struct malidp_hw_device *hwdev);
153 bool (*in_config_mode)(struct malidp_hw_device *hwdev);
162 void (*set_config_valid)(struct malidp_hw_device *hwdev, u8 value);
168 void (*modeset)(struct malidp_hw_device *hwdev, struct videomode *m);
174 int (*rotmem_required)(struct malidp_hw_device *hwdev, u16 w, u16 h, u32 fmt);
176 int (*se_set_scaling_coeffs)(struct malidp_hw_device *hwdev,
180 long (*se_calc_mclk)(struct malidp_hw_device *hwdev,
193 int (*enable_memwrite)(struct malidp_hw_device *hwdev, dma_addr_t *addrs,
200 void (*disable_memwrite)(struct malidp_hw_device *hwdev);
246 static inline u32 malidp_hw_read(struct malidp_hw_device *hwdev, u32 reg) in malidp_hw_read() argument
248 WARN_ON(hwdev->pm_suspended); in malidp_hw_read()
249 return readl(hwdev->regs + reg); in malidp_hw_read()
252 static inline void malidp_hw_write(struct malidp_hw_device *hwdev, in malidp_hw_write() argument
255 WARN_ON(hwdev->pm_suspended); in malidp_hw_write()
256 writel(value, hwdev->regs + reg); in malidp_hw_write()
259 static inline void malidp_hw_setbits(struct malidp_hw_device *hwdev, in malidp_hw_setbits() argument
262 u32 data = malidp_hw_read(hwdev, reg); in malidp_hw_setbits()
265 malidp_hw_write(hwdev, data, reg); in malidp_hw_setbits()
268 static inline void malidp_hw_clearbits(struct malidp_hw_device *hwdev, in malidp_hw_clearbits() argument
271 u32 data = malidp_hw_read(hwdev, reg); in malidp_hw_clearbits()
274 malidp_hw_write(hwdev, data, reg); in malidp_hw_clearbits()
277 static inline u32 malidp_get_block_base(struct malidp_hw_device *hwdev, in malidp_get_block_base() argument
282 return hwdev->hw->map.se_base; in malidp_get_block_base()
284 return hwdev->hw->map.dc_base; in malidp_get_block_base()
290 static inline void malidp_hw_disable_irq(struct malidp_hw_device *hwdev, in malidp_hw_disable_irq() argument
293 u32 base = malidp_get_block_base(hwdev, block); in malidp_hw_disable_irq()
295 malidp_hw_clearbits(hwdev, irq, base + MALIDP_REG_MASKIRQ); in malidp_hw_disable_irq()
298 static inline void malidp_hw_enable_irq(struct malidp_hw_device *hwdev, in malidp_hw_enable_irq() argument
301 u32 base = malidp_get_block_base(hwdev, block); in malidp_hw_enable_irq()
303 malidp_hw_setbits(hwdev, irq, base + MALIDP_REG_MASKIRQ); in malidp_hw_enable_irq()
307 void malidp_se_irq_hw_init(struct malidp_hw_device *hwdev);
308 void malidp_de_irq_hw_init(struct malidp_hw_device *hwdev);
309 void malidp_de_irq_fini(struct malidp_hw_device *hwdev);
311 void malidp_se_irq_fini(struct malidp_hw_device *hwdev);
316 static inline u8 malidp_hw_get_pitch_align(struct malidp_hw_device *hwdev, bool rotated) in malidp_hw_get_pitch_align() argument
322 if (hwdev->hw->map.bus_align_bytes == 8) in malidp_hw_get_pitch_align()
325 return hwdev->hw->map.bus_align_bytes << (rotated ? 2 : 0); in malidp_hw_get_pitch_align()
351 static inline void malidp_se_set_enh_coeffs(struct malidp_hw_device *hwdev) in malidp_se_set_enh_coeffs() argument
358 u32 image_enh = hwdev->hw->map.se_base + in malidp_se_set_enh_coeffs()
359 ((hwdev->hw->map.features & MALIDP_REGMAP_HAS_CLEARIRQ) ? in malidp_se_set_enh_coeffs()
364 malidp_hw_write(hwdev, val, image_enh); in malidp_se_set_enh_coeffs()
366 malidp_hw_write(hwdev, enhancer_coeffs[i], enh_coeffs + i * 4); in malidp_se_set_enh_coeffs()