From patchwork Fri Jul 18 03:30:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 4579761 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 77A249F37C for ; Fri, 18 Jul 2014 03:30:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BFC4E2017A for ; Fri, 18 Jul 2014 03:30:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F0F2E200E1 for ; Fri, 18 Jul 2014 03:30:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 195DD6E715; Thu, 17 Jul 2014 20:30:33 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f169.google.com (mail-qc0-f169.google.com [209.85.216.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 404636E71A for ; Thu, 17 Jul 2014 20:30:30 -0700 (PDT) Received: by mail-qc0-f169.google.com with SMTP id m20so2964926qcx.28 for ; Thu, 17 Jul 2014 20:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oFed8m94xQFsU1pHTS36nG9byLVcoa7XcTt0ApMaHCU=; b=FNiNlvcuEiKt8o6R74S4JkjvbaH1hyR865EfgrqQtM+LALkDoJvGLnqaAfMc/3Gob6 487jTgMq0ie+EDYGMRUYz9V1UTya1s/IQHYKz658lZAoUCQXtLKAJqhwZBiVjRBtPQDs l3PmhG/5WvDRxY7J9K5EcVK2hUoxdkRTQCvGyL1fBpz7Bi0RtxGYDR4E9gVly8EFLDS3 xnx7FfHG74Xgv3SvPuAoD/RxX/Xl+lTe5JSiP+6xjpWYlESK1OQl5sAeI9nJDjpyFICF XQDfoCWtjK1Ii5GN0OqY0ZHlvo46PYBpkPsDkerg+NVWzP+rzb721ougzOK6uS3PZ6Sy 0LRQ== X-Received: by 10.140.85.101 with SMTP id m92mr2991843qgd.26.1405654229817; Thu, 17 Jul 2014 20:30:29 -0700 (PDT) Received: from localhost ([172.56.22.126]) by mx.google.com with ESMTPSA id o8sm7805343qai.8.2014.07.17.20.30.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jul 2014 20:30:29 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 07/10] drm/vmwgfx: use helpers Date: Thu, 17 Jul 2014 23:30:02 -0400 Message-Id: <1405654205-30810-8-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405654205-30810-1-git-send-email-robdclark@gmail.com> References: <1405654205-30810-1-git-send-email-robdclark@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rob Clark --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 1a024e3..991e5c8 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -1501,7 +1501,6 @@ int vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data, { struct drm_vmw_cursor_bypass_arg *arg = data; struct vmw_display_unit *du; - struct drm_mode_object *obj; struct drm_crtc *crtc; int ret = 0; @@ -1519,13 +1518,12 @@ int vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data, return 0; } - obj = drm_mode_object_find(dev, arg->crtc_id, DRM_MODE_OBJECT_CRTC); - if (!obj) { + crtc = drm_crtc_find(dev, arg->crtc_id); + if (!crtc) { ret = -ENOENT; goto out; } - crtc = obj_to_crtc(obj); du = vmw_crtc_to_du(crtc); du->hotspot_x = arg->xhot;