summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-05 10:09:12 -0800
committerOlof Johansson <olof@lixom.net>2012-11-05 10:09:12 -0800
commit6d06721570aa0c38d886e3036796d59983963a27 (patch)
treed674cf54e26837bee89095c211ffa362c8546f03 /drivers/gpu/drm/i915/i915_drv.h
parent148a8698763130c96004ef419b5f0d44a93d413c (diff)
parent54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c (diff)
downloadlinux-6d06721570aa0c38d886e3036796d59983963a27.tar.bz2
Merge branch 'depends/tty' into next/headers
Merging in Greg's tty tree including a cleanup patch needed by the OMAP serial header cleanups. * depends/tty: (305 commits) tty/serial/8250: Make omap hardware workarounds local to 8250.h serial/8250/8250_early: Prevent rounding error in uartclk serial: samsung: use clk_prepare_enable and clk_disable_unprepare TTY: Report warning when low_latency flag is wrongly used console: use might_sleep in console_lock TTY: move tty buffers to tty_port TTY: add port -> tty link TTY: tty_buffer, cache pointer to tty->buf TTY: move TTY_FLUSH* flags to tty_port TTY: n_tty, propagate n_tty_data TTY: move ldisc data from tty_struct: locks TTY: move ldisc data from tty_struct: read_* and echo_* and canon_* stuff TTY: move ldisc data from tty_struct: bitmaps TTY: move ldisc data from tty_struct: simple members TTY: n_tty, add ldisc data to n_tty TTY: audit, stop accessing tty->icount TTY: n_tty, remove bogus checks TTY: n_tty, simplify read_buf+echo_buf allocation TTY: hci_ldisc, remove invalid check in open TTY: ldisc, wait for idle ldisc in release ...
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 4f2831aa5fed..b84f7861e438 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1341,9 +1341,14 @@ int __must_check i915_gem_object_get_pages(struct drm_i915_gem_object *obj);
static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n)
{
struct scatterlist *sg = obj->pages->sgl;
- while (n >= SG_MAX_SINGLE_ALLOC) {
+ int nents = obj->pages->nents;
+ while (nents > SG_MAX_SINGLE_ALLOC) {
+ if (n < SG_MAX_SINGLE_ALLOC - 1)
+ break;
+
sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1);
n -= SG_MAX_SINGLE_ALLOC - 1;
+ nents -= SG_MAX_SINGLE_ALLOC - 1;
}
return sg_page(sg+n);
}
@@ -1427,7 +1432,7 @@ int __must_check i915_gpu_idle(struct drm_device *dev);
int __must_check i915_gem_idle(struct drm_device *dev);
int i915_add_request(struct intel_ring_buffer *ring,
struct drm_file *file,
- struct drm_i915_gem_request *request);
+ u32 *seqno);
int __must_check i915_wait_seqno(struct intel_ring_buffer *ring,
uint32_t seqno);
int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);