Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163967
b: refs/heads/master
c: c05422d
h: refs/heads/master
i:
  163965: d81fa8e
  163963: 75d203d
  163959: 09eb800
  163951: 770359c
  163935: 6a57a17
  163903: f869842
  163839: 820908f
v: v3
  • Loading branch information
Daniel Vetter authored and Eric Anholt committed Sep 4, 2009
1 parent 3a5d057 commit 45012aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 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: 67cf781bea52d461b7c8b63b23be19e87c33d7bf
refs/heads/master: c05422d52ee6b4cff8b63eab1a7351780518fc5e
20 changes: 8 additions & 12 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -3557,30 +3557,26 @@ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
{
drm_i915_private_t *dev_priv = dev->dev_private;
struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data;
struct drm_crtc *crtc = NULL;
int pipe = -1;
struct drm_mode_object *drmmode_obj;
struct intel_crtc *crtc;

if (!dev_priv) {
DRM_ERROR("called with no initialization\n");
return -EINVAL;
}

list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
if (crtc->base.id == pipe_from_crtc_id->crtc_id) {
pipe = intel_crtc->pipe;
break;
}
}
drmmode_obj = drm_mode_object_find(dev, pipe_from_crtc_id->crtc_id,
DRM_MODE_OBJECT_CRTC);

if (pipe == -1) {
if (!drmmode_obj) {
DRM_ERROR("no such CRTC id\n");
return -EINVAL;
}

pipe_from_crtc_id->pipe = pipe;
crtc = to_intel_crtc(obj_to_crtc(drmmode_obj));
pipe_from_crtc_id->pipe = crtc->pipe;

return 0;
return 0;
}

struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe)
Expand Down

0 comments on commit 45012aa

Please sign in to comment.