From patchwork Wed Sep 24 17:20:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 4968701 Return-Path: X-Original-To: patchwork-intel-gfx@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 BAAB49F2F0 for ; Wed, 24 Sep 2014 17:20:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 822B02022D for ; Wed, 24 Sep 2014 17:20:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0267120274 for ; Wed, 24 Sep 2014 17:20:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CF9B6E64D; Wed, 24 Sep 2014 10:20:43 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 008886E64E; Wed, 24 Sep 2014 10:20:40 -0700 (PDT) Received: by mail-qc0-f176.google.com with SMTP id o8so3804838qcw.21 for ; Wed, 24 Sep 2014 10:20:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=ahtnQW8CsPFFtNfvtDtfqFmrOGBe6KzNoxK2MdVCZQw=; b=HxZ+cEP9DyFYAxmstLD/GON+oHrOPiMWo4g2f6/1lJypGHkntRY7xVfNBoquY5JREz c9K2Z5QzikB+R/4G5YWZCu9yIYBPKqwQUsaOImTAuB5SNydP+JhYLpNfa3ISkXc4CNm7 qyircWBZnKoNfrLqmO2HTWCWlfjQ6HIdmuYEOg4T0N98cVzMAA7doK6lXD5jqj3/2xlo CPhiPMTCMKWGjQDRN+f8B0ipiMvX+m4EM8h97bABi26WRFDt84kE0XR0UjdoOAKqButP OacdY/nt+mdRxWQxcsb1BtpPpGHXp8glRuBMOpoThrPvKsw7AyFY/WmDbfmFnWe61Ifx e3cA== X-Received: by 10.229.235.200 with SMTP id kh8mr10664879qcb.30.1411579240591; Wed, 24 Sep 2014 10:20:40 -0700 (PDT) Received: from localhost.localdomain ([191.255.48.205]) by mx.google.com with ESMTPSA id l46sm13274852qgd.27.2014.09.24.10.20.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Sep 2014 10:20:39 -0700 (PDT) From: Gustavo Padovan To: intel-gfx@lists.freedesktop.org Date: Wed, 24 Sep 2014 14:20:23 -0300 Message-Id: <1411579232-8668-2-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1411579232-8668-1-git-send-email-gustavo@padovan.org> References: <1411579232-8668-1-git-send-email-gustavo@padovan.org> MIME-Version: 1.0 Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v3 02/11] drm/i915: remove leftover from pre-universal planes days X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 From: Gustavo Padovan Now that universal planes are in place we don't need this plane unref on failures. Suggested-by: Ville Syrjälä Signed-off-by: Gustavo Padovan Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 966b9af..b1c2dbf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8457,13 +8457,6 @@ static bool cursor_size_ok(struct drm_device *dev, return true; } -/* - * intel_crtc_cursor_set_obj - Set cursor to specified GEM object - * - * Note that the object's reference will be consumed if the update fails. If - * the update succeeds, the reference of the old object (if any) will be - * consumed. - */ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, struct drm_i915_gem_object *obj, uint32_t width, uint32_t height) @@ -8493,8 +8486,7 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, stride = roundup_pow_of_two(width) * 4; if (obj->base.size < stride * height) { DRM_DEBUG_KMS("buffer is too small\n"); - ret = -ENOMEM; - goto fail; + return -ENOMEM; } /* we only need to pin inside GTT if cursor is non-phy */ @@ -8583,8 +8575,6 @@ fail_unpin: i915_gem_object_unpin_from_display_plane(obj); fail_locked: mutex_unlock(&dev->struct_mutex); -fail: - drm_gem_object_unreference_unlocked(&obj->base); return ret; }