2 * Copyright (C) 2012 Russell King
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
11 #include <drm/drm_crtc.h>
13 struct armada_gem_object;
21 #define armada_reg_queue_mod(_r, _i, _v, _m, _o) \
23 struct armada_regs *__reg = _r; \
24 __reg[_i].offset = _o; \
25 __reg[_i].mask = ~(_m); \
30 #define armada_reg_queue_set(_r, _i, _v, _o) \
31 armada_reg_queue_mod(_r, _i, _v, ~0, _o)
33 #define armada_reg_queue_end(_r, _i) \
34 armada_reg_queue_mod(_r, _i, 0, 0, ~0)
37 struct armada_variant;
41 const struct armada_variant *variant;
45 struct clk *extclk[2];
47 uint32_t spu_v_h_total;
54 struct armada_gem_object *cursor_obj;
57 uint32_t cursor_hw_pos;
58 uint32_t cursor_hw_sz;
62 uint32_t cfg_dumb_ctrl;
63 uint32_t spu_iopad_ctrl;
69 struct drm_pending_vblank_event *event;
70 struct armada_regs atomic_regs[32];
71 struct armada_regs *regs;
72 unsigned int regs_idx;
74 #define drm_to_armada_crtc(c) container_of(c, struct armada_crtc, crtc)
76 void armada_drm_crtc_update_regs(struct armada_crtc *, struct armada_regs *);
78 extern struct platform_driver armada_lcd_platform_driver;