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/hw/channel_hw.c | |
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/hw/channel_hw.c')
-rw-r--r-- | drivers/gpu/host1x/hw/channel_hw.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c index ee199623e365..4608257ab656 100644 --- a/drivers/gpu/host1x/hw/channel_hw.c +++ b/drivers/gpu/host1x/hw/channel_hw.c | |||
@@ -16,15 +16,15 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/host1x.h> | ||
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | |||
20 | #include <trace/events/host1x.h> | 22 | #include <trace/events/host1x.h> |
21 | 23 | ||
22 | #include "host1x.h" | 24 | #include "../channel.h" |
23 | #include "host1x_bo.h" | 25 | #include "../dev.h" |
24 | #include "channel.h" | 26 | #include "../intr.h" |
25 | #include "dev.h" | 27 | #include "../job.h" |
26 | #include "intr.h" | ||
27 | #include "job.h" | ||
28 | 28 | ||
29 | #define HOST1X_CHANNEL_SIZE 16384 | 29 | #define HOST1X_CHANNEL_SIZE 16384 |
30 | #define TRACE_MAX_LENGTH 128U | 30 | #define TRACE_MAX_LENGTH 128U |
@@ -67,6 +67,22 @@ static void submit_gathers(struct host1x_job *job) | |||
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline void synchronize_syncpt_base(struct host1x_job *job) | ||
71 | { | ||
72 | struct host1x *host = dev_get_drvdata(job->channel->dev->parent); | ||
73 | struct host1x_syncpt *sp = host->syncpt + job->syncpt_id; | ||
74 | u32 id, value; | ||
75 | |||
76 | value = host1x_syncpt_read_max(sp); | ||
77 | id = sp->base->id; | ||
78 | |||
79 | host1x_cdma_push(&job->channel->cdma, | ||
80 | host1x_opcode_setclass(HOST1X_CLASS_HOST1X, | ||
81 | HOST1X_UCLASS_LOAD_SYNCPT_BASE, 1), | ||
82 | HOST1X_UCLASS_LOAD_SYNCPT_BASE_BASE_INDX_F(id) | | ||
83 | HOST1X_UCLASS_LOAD_SYNCPT_BASE_VALUE_F(value)); | ||
84 | } | ||
85 | |||
70 | static int channel_submit(struct host1x_job *job) | 86 | static int channel_submit(struct host1x_job *job) |
71 | { | 87 | { |
72 | struct host1x_channel *ch = job->channel; | 88 | struct host1x_channel *ch = job->channel; |
@@ -118,6 +134,10 @@ static int channel_submit(struct host1x_job *job) | |||
118 | host1x_syncpt_read_max(sp))); | 134 | host1x_syncpt_read_max(sp))); |
119 | } | 135 | } |
120 | 136 | ||
137 | /* Synchronize base register to allow using it for relative waiting */ | ||
138 | if (sp->base) | ||
139 | synchronize_syncpt_base(job); | ||
140 | |||
121 | syncval = host1x_syncpt_incr_max(sp, user_syncpt_incrs); | 141 | syncval = host1x_syncpt_incr_max(sp, user_syncpt_incrs); |
122 | 142 | ||
123 | job->syncpt_end = syncval; | 143 | job->syncpt_end = syncval; |