Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[deliverable/linux.git] / drivers / gpu / drm / arc / arcpgu.h
1 /*
2 * ARC PGU DRM driver.
3 *
4 * Copyright (C) 2016 Synopsys, Inc. (www.synopsys.com)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17 #ifndef _ARCPGU_H_
18 #define _ARCPGU_H_
19
20 struct arcpgu_drm_private {
21 void __iomem *regs;
22 struct clk *clk;
23 struct drm_fbdev_cma *fbdev;
24 struct drm_framebuffer *fb;
25 struct list_head event_list;
26 struct drm_crtc crtc;
27 struct drm_plane *plane;
28 };
29
30 #define crtc_to_arcpgu_priv(x) container_of(x, struct arcpgu_drm_private, crtc)
31
32 static inline void arc_pgu_write(struct arcpgu_drm_private *arcpgu,
33 unsigned int reg, u32 value)
34 {
35 iowrite32(value, arcpgu->regs + reg);
36 }
37
38 static inline u32 arc_pgu_read(struct arcpgu_drm_private *arcpgu,
39 unsigned int reg)
40 {
41 return ioread32(arcpgu->regs + reg);
42 }
43
44 int arc_pgu_setup_crtc(struct drm_device *dev);
45 int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np);
46 struct drm_fbdev_cma *arcpgu_fbdev_cma_init(struct drm_device *dev,
47 unsigned int preferred_bpp, unsigned int num_crtc,
48 unsigned int max_conn_count);
49
50 #endif
This page took 0.031431 seconds and 5 git commands to generate.