diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 927d2476f60a..8796eb18c9a4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -11738,21 +11738,20 @@ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data, | |||
11738 | struct drm_file *file) | 11738 | struct drm_file *file) |
11739 | { | 11739 | { |
11740 | struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data; | 11740 | struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data; |
11741 | struct drm_mode_object *drmmode_obj; | 11741 | struct drm_crtc *drmmode_crtc; |
11742 | struct intel_crtc *crtc; | 11742 | struct intel_crtc *crtc; |
11743 | 11743 | ||
11744 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 11744 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) |
11745 | return -ENODEV; | 11745 | return -ENODEV; |
11746 | 11746 | ||
11747 | drmmode_obj = drm_mode_object_find(dev, pipe_from_crtc_id->crtc_id, | 11747 | drmmode_crtc = drm_crtc_find(dev, pipe_from_crtc_id->crtc_id); |
11748 | DRM_MODE_OBJECT_CRTC); | ||
11749 | 11748 | ||
11750 | if (!drmmode_obj) { | 11749 | if (!drmmode_crtc) { |
11751 | DRM_ERROR("no such CRTC id\n"); | 11750 | DRM_ERROR("no such CRTC id\n"); |
11752 | return -ENOENT; | 11751 | return -ENOENT; |
11753 | } | 11752 | } |
11754 | 11753 | ||
11755 | crtc = to_intel_crtc(obj_to_crtc(drmmode_obj)); | 11754 | crtc = to_intel_crtc(drmmode_crtc); |
11756 | pipe_from_crtc_id->pipe = crtc->pipe; | 11755 | pipe_from_crtc_id->pipe = crtc->pipe; |
11757 | 11756 | ||
11758 | return 0; | 11757 | return 0; |