Lines Matching refs:hwdev
147 int (*query_hw)(struct malidp_hw_device *hwdev);
152 void (*enter_config_mode)(struct malidp_hw_device *hwdev);
157 void (*leave_config_mode)(struct malidp_hw_device *hwdev);
162 bool (*in_config_mode)(struct malidp_hw_device *hwdev);
171 void (*set_config_valid)(struct malidp_hw_device *hwdev, u8 value);
177 void (*modeset)(struct malidp_hw_device *hwdev, struct videomode *m);
183 int (*rotmem_required)(struct malidp_hw_device *hwdev, u16 w, u16 h,
186 int (*se_set_scaling_coeffs)(struct malidp_hw_device *hwdev,
190 long (*se_calc_mclk)(struct malidp_hw_device *hwdev,
195 * @param hwdev - malidp_hw_device structure containing the HW description
203 int (*enable_memwrite)(struct malidp_hw_device *hwdev, dma_addr_t *addrs,
210 void (*disable_memwrite)(struct malidp_hw_device *hwdev);
259 static inline u32 malidp_hw_read(struct malidp_hw_device *hwdev, u32 reg)
261 WARN_ON(hwdev->pm_suspended);
262 return readl(hwdev->regs + reg);
265 static inline void malidp_hw_write(struct malidp_hw_device *hwdev,
268 WARN_ON(hwdev->pm_suspended);
269 writel(value, hwdev->regs + reg);
272 static inline void malidp_hw_setbits(struct malidp_hw_device *hwdev,
275 u32 data = malidp_hw_read(hwdev, reg);
278 malidp_hw_write(hwdev, data, reg);
281 static inline void malidp_hw_clearbits(struct malidp_hw_device *hwdev,
284 u32 data = malidp_hw_read(hwdev, reg);
287 malidp_hw_write(hwdev, data, reg);
290 static inline u32 malidp_get_block_base(struct malidp_hw_device *hwdev,
295 return hwdev->hw->map.se_base;
297 return hwdev->hw->map.dc_base;
303 static inline void malidp_hw_disable_irq(struct malidp_hw_device *hwdev,
306 u32 base = malidp_get_block_base(hwdev, block);
308 malidp_hw_clearbits(hwdev, irq, base + MALIDP_REG_MASKIRQ);
311 static inline void malidp_hw_enable_irq(struct malidp_hw_device *hwdev,
314 u32 base = malidp_get_block_base(hwdev, block);
316 malidp_hw_setbits(hwdev, irq, base + MALIDP_REG_MASKIRQ);
320 void malidp_se_irq_hw_init(struct malidp_hw_device *hwdev);
321 void malidp_de_irq_hw_init(struct malidp_hw_device *hwdev);
322 void malidp_de_irq_fini(struct malidp_hw_device *hwdev);
324 void malidp_se_irq_fini(struct malidp_hw_device *hwdev);
331 static inline u8 malidp_hw_get_pitch_align(struct malidp_hw_device *hwdev, bool rotated)
337 if (hwdev->hw->map.bus_align_bytes == 8)
340 return hwdev->hw->map.bus_align_bytes << (rotated ? 2 : 0);
366 static inline void malidp_se_set_enh_coeffs(struct malidp_hw_device *hwdev)
373 u32 image_enh = hwdev->hw->map.se_base +
374 ((hwdev->hw->map.features & MALIDP_REGMAP_HAS_CLEARIRQ) ?
379 malidp_hw_write(hwdev, val, image_enh);
381 malidp_hw_write(hwdev, enhancer_coeffs[i], enh_coeffs + i * 4);