diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 00:19:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-15 00:19:54 -0500 |
commit | 049ffa8ab33a63b3bff672d1a0ee6a35ad253fe8 (patch) | |
tree | 70f4c684818b1c9871fa800088427e40d260592e /drivers/gpu/host1x/syncpt.h | |
parent | c681427e5ca22925fcc1be76a2e260a11e0a8498 (diff) | |
parent | 0846c728e20a0cd1e43fb75a3015f3b176a26466 (diff) |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
"This is a combo of -next and some -fixes that came in in the
intervening time.
Highlights:
New drivers:
ARM Armada driver for Marvell Armada 510 SOCs
Intel:
Broadwell initial support under a default off switch,
Stereo/3D HDMI mode support
Valleyview improvements
Displayport improvements
Haswell fixes
initial mipi dsi panel support
CRC support for debugging
build with CONFIG_FB=n
Radeon:
enable DPM on a number of GPUs by default
secondary GPU powerdown support
enable HDMI audio by default
Hawaii support
Nouveau:
dynamic pm code infrastructure reworked, does nothing major yet
GK208 modesetting support
MSI fixes, on by default again
PMPEG improvements
pageflipping fixes
GMA500:
minnowboard SDVO support
VMware:
misc fixes
MSM:
prime, plane and rendernodes support
Tegra:
rearchitected to put the drm driver into the drm subsystem.
HDMI and gr2d support for tegra 114 SoC
QXL:
oops fix, and multi-head fixes
DRM core:
sysfs lifetime fixes
client capability ioctl
further cleanups to device midlayer
more vblank timestamp fixes"
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (789 commits)
drm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add
drm/nvc0-/gr: shift wrapping bug in nvc0_grctx_generate_r406800
drm/nouveau/pwr: fix missing mutex unlock in a failure path
drm/nv40/therm: fix slowing down fan when pstate undefined
drm/nv11-: synchronise flips to vblank, unless async flip requested
drm/nvc0-: remove nasty fifo swmthd hack for flip completion method
drm/nv10-: we no longer need to create nvsw object on user channels
drm/nouveau: always queue flips relative to kernel channel activity
drm/nouveau: there is no need to reserve/fence the new fb when flipping
drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
drm/nouveau: allow nouveau_fence_ref() to be a noop
drm/nvc8/mc: msi rearm is via the nvc0 method
drm/ttm: Fix vma page_prot bit manipulation
drm/vmwgfx: Fix a couple of compile / sparse warnings and errors
drm/vmwgfx: Resource evict fixes
drm/edid: compare actual vrefresh for all modes for quirks
drm: shmob_drm: Convert to clk_prepare/unprepare
drm/nouveau: fix 32-bit build
drm/i915/opregion: fix build error on CONFIG_ACPI=n
Revert "drm/radeon/audio: don't set speaker allocation on DCE4+"
...
Diffstat (limited to 'drivers/gpu/host1x/syncpt.h')
-rw-r--r-- | drivers/gpu/host1x/syncpt.h | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/drivers/gpu/host1x/syncpt.h b/drivers/gpu/host1x/syncpt.h index 267c0b9d3647..9056465ecd3f 100644 --- a/drivers/gpu/host1x/syncpt.h +++ b/drivers/gpu/host1x/syncpt.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define __HOST1X_SYNCPT_H | 20 | #define __HOST1X_SYNCPT_H |
21 | 21 | ||
22 | #include <linux/atomic.h> | 22 | #include <linux/atomic.h> |
23 | #include <linux/host1x.h> | ||
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
25 | 26 | ||
@@ -30,6 +31,11 @@ struct host1x; | |||
30 | /* Reserved for replacing an expired wait with a NOP */ | 31 | /* Reserved for replacing an expired wait with a NOP */ |
31 | #define HOST1X_SYNCPT_RESERVED 0 | 32 | #define HOST1X_SYNCPT_RESERVED 0 |
32 | 33 | ||
34 | struct host1x_syncpt_base { | ||
35 | unsigned int id; | ||
36 | bool requested; | ||
37 | }; | ||
38 | |||
33 | struct host1x_syncpt { | 39 | struct host1x_syncpt { |
34 | int id; | 40 | int id; |
35 | atomic_t min_val; | 41 | atomic_t min_val; |
@@ -39,6 +45,7 @@ struct host1x_syncpt { | |||
39 | bool client_managed; | 45 | bool client_managed; |
40 | struct host1x *host; | 46 | struct host1x *host; |
41 | struct device *dev; | 47 | struct device *dev; |
48 | struct host1x_syncpt_base *base; | ||
42 | 49 | ||
43 | /* interrupt data */ | 50 | /* interrupt data */ |
44 | struct host1x_syncpt_intr intr; | 51 | struct host1x_syncpt_intr intr; |
@@ -50,25 +57,6 @@ int host1x_syncpt_init(struct host1x *host); | |||
50 | /* Free sync point array */ | 57 | /* Free sync point array */ |
51 | void host1x_syncpt_deinit(struct host1x *host); | 58 | void host1x_syncpt_deinit(struct host1x *host); |
52 | 59 | ||
53 | /* | ||
54 | * Read max. It indicates how many operations there are in queue, either in | ||
55 | * channel or in a software thread. | ||
56 | * */ | ||
57 | static inline u32 host1x_syncpt_read_max(struct host1x_syncpt *sp) | ||
58 | { | ||
59 | smp_rmb(); | ||
60 | return (u32)atomic_read(&sp->max_val); | ||
61 | } | ||
62 | |||
63 | /* | ||
64 | * Read min, which is a shadow of the current sync point value in hardware. | ||
65 | */ | ||
66 | static inline u32 host1x_syncpt_read_min(struct host1x_syncpt *sp) | ||
67 | { | ||
68 | smp_rmb(); | ||
69 | return (u32)atomic_read(&sp->min_val); | ||
70 | } | ||
71 | |||
72 | /* Return number of sync point supported. */ | 60 | /* Return number of sync point supported. */ |
73 | int host1x_syncpt_nb_pts(struct host1x *host); | 61 | int host1x_syncpt_nb_pts(struct host1x *host); |
74 | 62 | ||
@@ -112,9 +100,6 @@ static inline bool host1x_syncpt_idle(struct host1x_syncpt *sp) | |||
112 | return (min == max); | 100 | return (min == max); |
113 | } | 101 | } |
114 | 102 | ||
115 | /* Return pointer to struct denoting sync point id. */ | ||
116 | struct host1x_syncpt *host1x_syncpt_get(struct host1x *host, u32 id); | ||
117 | |||
118 | /* Load current value from hardware to the shadow register. */ | 103 | /* Load current value from hardware to the shadow register. */ |
119 | u32 host1x_syncpt_load(struct host1x_syncpt *sp); | 104 | u32 host1x_syncpt_load(struct host1x_syncpt *sp); |
120 | 105 | ||
@@ -130,16 +115,9 @@ void host1x_syncpt_restore(struct host1x *host); | |||
130 | /* Read current wait base value into shadow register and return it. */ | 115 | /* Read current wait base value into shadow register and return it. */ |
131 | u32 host1x_syncpt_load_wait_base(struct host1x_syncpt *sp); | 116 | u32 host1x_syncpt_load_wait_base(struct host1x_syncpt *sp); |
132 | 117 | ||
133 | /* Request incrementing a sync point. */ | ||
134 | int host1x_syncpt_incr(struct host1x_syncpt *sp); | ||
135 | |||
136 | /* Indicate future operations by incrementing the sync point max. */ | 118 | /* Indicate future operations by incrementing the sync point max. */ |
137 | u32 host1x_syncpt_incr_max(struct host1x_syncpt *sp, u32 incrs); | 119 | u32 host1x_syncpt_incr_max(struct host1x_syncpt *sp, u32 incrs); |
138 | 120 | ||
139 | /* Wait until sync point reaches a threshold value, or a timeout. */ | ||
140 | int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, | ||
141 | long timeout, u32 *value); | ||
142 | |||
143 | /* Check if sync point id is valid. */ | 121 | /* Check if sync point id is valid. */ |
144 | static inline int host1x_syncpt_is_valid(struct host1x_syncpt *sp) | 122 | static inline int host1x_syncpt_is_valid(struct host1x_syncpt *sp) |
145 | { | 123 | { |
@@ -149,14 +127,4 @@ static inline int host1x_syncpt_is_valid(struct host1x_syncpt *sp) | |||
149 | /* Patch a wait by replacing it with a wait for syncpt 0 value 0 */ | 127 | /* Patch a wait by replacing it with a wait for syncpt 0 value 0 */ |
150 | int host1x_syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr); | 128 | int host1x_syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr); |
151 | 129 | ||
152 | /* Return id of the sync point */ | ||
153 | u32 host1x_syncpt_id(struct host1x_syncpt *sp); | ||
154 | |||
155 | /* Allocate a sync point for a device. */ | ||
156 | struct host1x_syncpt *host1x_syncpt_request(struct device *dev, | ||
157 | bool client_managed); | ||
158 | |||
159 | /* Free a sync point. */ | ||
160 | void host1x_syncpt_free(struct host1x_syncpt *sp); | ||
161 | |||
162 | #endif | 130 | #endif |