From patchwork Mon Sep 22 22:23:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 4950941 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02028BEEA6 for ; Mon, 22 Sep 2014 22:23:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 400AE2024F for ; Mon, 22 Sep 2014 22:23:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5F2E02024C for ; Mon, 22 Sep 2014 22:23:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5AF86E4FE; Mon, 22 Sep 2014 15:23:26 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f178.google.com (mail-qc0-f178.google.com [209.85.216.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 69BFF6E4F8; Mon, 22 Sep 2014 15:23:25 -0700 (PDT) Received: by mail-qc0-f178.google.com with SMTP id x13so878450qcv.37 for ; Mon, 22 Sep 2014 15:23:24 -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=+DxAPXwb4YTsFyOqfdnIOa1xE0SDBWH1fUuS6lPWnMw=; b=NCy6x/F5l19zpKAFoc6zekRX9VOzsyOtmwnIaaBMcLrdsCtWWxmsNXow0kFvKbIEzH DNoi4vZfxSMukASc6AFL1/mjPyAS44XEgFvMC84RTLSJXXJU7wyBl4MEW2eRHcDd9qhI qjigRptr9XSwTla3ipsPm7YQ3ket5qv01PKJIHs71XHS7Pr4xAGp++EKXCAJEU8V4U/P s9yRmzFg+GsZXghWF3X9bXqylsK2WmPqzTcCFVTxaZIKtwX7WQyBety3BMhTqqs4urOW MEDR9KC8tWibbBaB+xvEp5n3IlkRYW8ZUelxDhJTVdC2RuvId6uYGEwvWGUxRg7Vwoyq Ml9Q== X-Received: by 10.140.96.86 with SMTP id j80mr4531497qge.106.1411424604912; Mon, 22 Sep 2014 15:23:24 -0700 (PDT) Received: from localhost.localdomain ([179.110.222.152]) by mx.google.com with ESMTPSA id o7sm8903631qay.4.2014.09.22.15.23.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Sep 2014 15:23:24 -0700 (PDT) From: Gustavo Padovan To: intel-gfx@lists.freedesktop.org Date: Mon, 22 Sep 2014 19:23:09 -0300 Message-Id: <1411424597-31662-2-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1411424597-31662-1-git-send-email-gustavo@padovan.org> References: <1411424597-31662-1-git-send-email-gustavo@padovan.org> MIME-Version: 1.0 Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v2 02/10] 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=-5.2 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 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bef37dc..2ef1836 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8362,8 +8362,7 @@ static bool cursor_size_ok(struct drm_device *dev, /* * 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 + * 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, @@ -8395,8 +8394,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 */ @@ -8485,8 +8483,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; }