From patchwork Mon Jan 20 19:26:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 3514201 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 2E4689F1C3 for ; Mon, 20 Jan 2014 19:27:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 625B22010E for ; Mon, 20 Jan 2014 19:27:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A3676200FF for ; Mon, 20 Jan 2014 19:27:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC7D0FAF0F; Mon, 20 Jan 2014 11:26:58 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f42.google.com (mail-bk0-f42.google.com [209.85.214.42]) by gabe.freedesktop.org (Postfix) with ESMTP id D902DFAC2E for ; Mon, 20 Jan 2014 11:26:49 -0800 (PST) Received: by mail-bk0-f42.google.com with SMTP id 6so547844bkj.1 for ; Mon, 20 Jan 2014 11:26:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=6ltaxbaZkD6FA9DVExaGhDKD8K6tSVq3PJZx80NATcg=; b=GtB4GfRrQhbdaECHQ1tu8ezxdj3KimR4i8cQyvAaqJmR1HTHmXjeotu2lQH2omKxhC BTHvnyAJlQka/92lDnO0m5o2+NDDaoWtbS4o1qYHbWBCfULLD96x6BHjRuszKj7KrryY idK0/iwhcHGyaAwqd/OvBpTOOxh07zm0zjJsReRdAy9eDmphh54jOEc97g+ZkBMuRb49 nsGAMEO1wUBP79drh6hXJCsvmVG7hr+F37hbjTqlN9XSCqvdp/G39aOc2Wz+ytKFqdr/ D/eJ4ILr8h4f2ks3ABG55ScQW+AeVserOkDcBvo+oS/aTbmGg7O0HEJr0BFUqLMcj4If N0nw== X-Received: by 10.205.12.133 with SMTP id pi5mr69866bkb.54.1390246007325; Mon, 20 Jan 2014 11:26:47 -0800 (PST) Received: from david-ub.localdomain (stgt-5f7292c1.pool.mediaWays.net. [95.114.146.193]) by mx.google.com with ESMTPSA id tf11sm1780282bkb.17.2014.01.20.11.26.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jan 2014 11:26:46 -0800 (PST) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/7] drm/udl: fix error-path when damage-req fails Date: Mon, 20 Jan 2014 20:26:23 +0100 Message-Id: <1390245989-13280-1-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.5.3 Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 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 We need to call dma_buf_end_cpu_access() in case a damage-request. Unlikely, but might happen during device unplug. Signed-off-by: David Herrmann --- drivers/gpu/drm/udl/udl_fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index dbadd49..50f564d 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c @@ -421,9 +421,10 @@ static int udl_user_framebuffer_dirty(struct drm_framebuffer *fb, clips[i].x2 - clips[i].x1, clips[i].y2 - clips[i].y1); if (ret) - goto unlock; + goto end_access; } +end_access: if (ufb->obj->base.import_attach) { dma_buf_end_cpu_access(ufb->obj->base.import_attach->dmabuf, 0, ufb->obj->base.size,