Merge i915_emit_box_p and i915_emit_box as done in linux 3.8
Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D3495
This commit is contained in:
parent
b5ec0fa7ab
commit
4660922bc1
@ -410,21 +410,8 @@ static int i915_emit_cmds(struct drm_device * dev, int *buffer, int dwords)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int i915_emit_box(struct drm_device * dev,
|
||||
struct drm_clip_rect *boxes,
|
||||
int i, int DR1, int DR4)
|
||||
{
|
||||
struct drm_clip_rect box;
|
||||
|
||||
if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return (i915_emit_box_p(dev, &box, DR1, DR4));
|
||||
}
|
||||
|
||||
int
|
||||
i915_emit_box_p(struct drm_device *dev,
|
||||
i915_emit_box(struct drm_device *dev,
|
||||
struct drm_clip_rect *box,
|
||||
int DR1, int DR4)
|
||||
{
|
||||
@ -506,8 +493,8 @@ static int i915_dispatch_cmdbuffer(struct drm_device * dev,
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (i < nbox) {
|
||||
ret = i915_emit_box_p(dev, &cmd->cliprects[i],
|
||||
cmd->DR1, cmd->DR4);
|
||||
ret = i915_emit_box(dev, &cliprects[i],
|
||||
cmd->DR1, cmd->DR4);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@ -542,8 +529,8 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev,
|
||||
count = nbox ? nbox : 1;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (i < nbox) {
|
||||
int ret = i915_emit_box_p(dev, &cliprects[i],
|
||||
batch->DR1, batch->DR4);
|
||||
ret = i915_emit_box(dev, &cliprects[i],
|
||||
batch->DR1, batch->DR4);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
@ -1120,11 +1120,8 @@ extern int i915_driver_device_is_agp(struct drm_device * dev);
|
||||
extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
extern int i915_emit_box(struct drm_device *dev,
|
||||
struct drm_clip_rect __user *boxes,
|
||||
int i, int DR1, int DR4);
|
||||
int i915_emit_box_p(struct drm_device *dev, struct drm_clip_rect *box,
|
||||
int DR1, int DR4);
|
||||
|
||||
struct drm_clip_rect *box,
|
||||
int DR1, int DR4);
|
||||
unsigned long i915_chipset_val(struct drm_i915_private *dev_priv);
|
||||
unsigned long i915_mch_val(struct drm_i915_private *dev_priv);
|
||||
void i915_update_gfx_val(struct drm_i915_private *dev_priv);
|
||||
|
@ -1372,7 +1372,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
|
||||
|
||||
if (cliprects) {
|
||||
for (i = 0; i < args->num_cliprects; i++) {
|
||||
ret = i915_emit_box_p(dev, &cliprects[i],
|
||||
ret = i915_emit_box(dev, &cliprects[i],
|
||||
args->DR1, args->DR4);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
Loading…
Reference in New Issue
Block a user