Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174580
b: refs/heads/master
c: 22fd0fa
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Barnes authored and Eric Anholt committed Dec 7, 2009
1 parent 1189f90 commit 3372cf1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e36595a2131e7ed5ee2674be54b2713ba7f0490
refs/heads/master: 22fd0fab3b512b5fcb4fd0b0668deeaa701511f9
16 changes: 13 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,6 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev, struct drm_gem_object *obj)
BUG();
}

alignment = 256 * 1024;
ret = i915_gem_object_pin(obj, alignment);
if (ret != 0)
return ret;
Expand Down Expand Up @@ -4227,8 +4226,13 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
OUT_RING(MI_DISPLAY_FLIP |
MI_DISPLAY_FLIP_PLANE(intel_crtc->plane));
OUT_RING(fb->pitch);
OUT_RING(obj_priv->gtt_offset | obj_priv->tiling_mode);
OUT_RING((fb->width << 16) | fb->height);
if (IS_I965G(dev)) {
OUT_RING(obj_priv->gtt_offset | obj_priv->tiling_mode);
OUT_RING((fb->width << 16) | fb->height);
} else {
OUT_RING(obj_priv->gtt_offset);
OUT_RING(MI_NOOP);
}
ADVANCE_LP_RING();

mutex_unlock(&dev->struct_mutex);
Expand Down Expand Up @@ -4258,6 +4262,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {

static void intel_crtc_init(struct drm_device *dev, int pipe)
{
drm_i915_private_t *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc;
int i;

Expand All @@ -4284,6 +4289,11 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
intel_crtc->plane = ((pipe == 0) ? 1 : 0);
}

BUG_ON(pipe >= ARRAY_SIZE(dev_priv->plane_to_crtc_mapping) ||
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] != NULL);
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;

intel_crtc->cursor_addr = 0;
intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF;
drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
Expand Down

0 comments on commit 3372cf1

Please sign in to comment.