From patchwork Thu Dec 7 15:48:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 120994 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8523110qgn; Thu, 7 Dec 2017 07:49:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMb2U2Sh7pFk6KrZ/PM5brPGNfVEhDnObeysqtjNgwo+1ato2eBY9zuvIWXQE+FUERlE9tOq X-Received: by 10.99.124.73 with SMTP id l9mr26037776pgn.308.1512661772936; Thu, 07 Dec 2017 07:49:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512661772; cv=none; d=google.com; s=arc-20160816; b=XpFVLB1WMJd/KIbxkgBfkn661/Djt6FORqvHxlUN+H3a9TaZNPk80hPmgR0Hew2Dyu 3J5s0SUj/sl5e+Om+/VfLOMJUjnhP02Zqn+Jz9YXSOCQayY+8Oq+ycqwcYf2p09Ws4Ds txqt4oXSU48QglQZDq4cTmctpxvx7ZBViUUTV91Q8wwfGKDbshBmz4lpxDlJWXXde/u5 22ioXTgCEbrIbrK/41LhQScA6mY78Nc3zEesx2paKce7l4MfEd/S32X+YDNSAbMTzW1I C9XeKE6KK6o5v6EYwSv63xnxKDlKJ9icsBO+MI/dbulzPgvUwN49rHjdnHG9nEBh61g9 Xwwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=Zf75/OkUuifU9CQqmfmFxLH+RMe9/s+l9EgWqVjHjtU=; b=hFsLarC1QfgBGV6h3M8VNAfP2wAD7Q0zZ6lwTvJRuuKkj649WrqHrOt3D+MN6A7aig eqMbZnN4t0YJMfx5L0QvN3aMhb9LxQ5KgfyrByYIbu2Iix42GB9viZf9ADMXLdtjyWeD KAXFAmZj+odQbW2fanE7IEJ6CpGVA7mrybSZqXCCvyvwotb3kYx6mpsKGqArgprPaTeq TIIfB7Ic4VoEsm/qWOHHHTCXlHw+04Gg6GqcaNAZymjewc+gcKMv9Om1K5CPYb/oxg0c KT+K3q4/YpQ+CkWTowktO8YxWZ8JNOb683rE/Hhk97otTTKdM6aVYOnWAydvzDOGkYLG N26Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=eyHW+fkf; dkim=fail header.i=@verizon.com header.s=corp header.b=P2jVDzhD; dkim=fail header.i=@verizon.com header.s=corp header.b=YdVl+9cu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si3901740pgo.140.2017.12.07.07.49.32; Thu, 07 Dec 2017 07:49:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=eyHW+fkf; dkim=fail header.i=@verizon.com header.s=corp header.b=P2jVDzhD; dkim=fail header.i=@verizon.com header.s=corp header.b=YdVl+9cu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756040AbdLGPt3 (ORCPT + 22 others); Thu, 7 Dec 2017 10:49:29 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:60692 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754830AbdLGPtY (ORCPT ); Thu, 7 Dec 2017 10:49:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512661764; x=1544197764; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=j4vSok4OsTCDnW49Umw78d1NJo1wApJcSk50tCvryMQ=; b=eyHW+fkffKb5FstxX6cdh8Ybq8/yq7vmVK4DJVDv+MCM6+1qZuEwsD9a a1GQCaoIEh+TyYRf+81+e2QAH1UvJOPQuNHONMpHpDWhsHgT+CUua6EoM lQ7RjtRpEcSe7gdV9+kQwFMHakX3AR2eBc4bw7GEE8SCB5h/ojvUmL0d6 0=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by fldsmtpe03.verizon.com with ESMTP; 07 Dec 2017 15:49:23 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Dec 2017 15:49:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512661759; x=1544197759; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=j4vSok4OsTCDnW49Umw78d1NJo1wApJcSk50tCvryMQ=; b=P2jVDzhDCg/D7yoxd/QLGAJ0Wr+o35Y6cHnG7ypPwVHtQyfrRJIaKSF/ HrH1GwYFIVKd5MEGJXfu4i2kAxf9IbgEdklz64bwu+6k0XJdSCeAuiCvB M8zLC8X9AXyjIvU56nQDq5zhvM3mgbMmI2Kn+R0c61GZX52TiDLV18Dko s=; Received: from endeavour.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.163]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Dec 2017 10:49:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512661749; x=1544197749; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=j4vSok4OsTCDnW49Umw78d1NJo1wApJcSk50tCvryMQ=; b=YdVl+9cu6H21/DISJF5tsSYZ8LIJNTKmgi7eM5v1ZuOSrd3VUGUmbRx+ k1+V4cF62UdO0oQXGVUMm+Hc+GZh3I/gvcuffIi0ODJa/89duSeiu+nDt et3XTEznBdGACXFwY6xUQbPMSDti/bK9EIJAfVCB5R7esk8lU34nD9Qiz s=; From: alexander.levin@verizon.com Cc: Tomi Valkeinen , alexander.levin@verizon.com X-Host: endeavour.tdc.vzwcorp.com Received: from ohtwi1exh003.uswin.ad.vzwcorp.com ([10.144.218.45]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 07 Dec 2017 15:49:09 +0000 Received: from tbwexch12apd.uswin.ad.vzwcorp.com (153.114.162.36) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 7 Dec 2017 10:49:09 -0500 Received: from OMZP1LUMXCA20.uswin.ad.vzwcorp.com (144.8.22.198) by tbwexch12apd.uswin.ad.vzwcorp.com (153.114.162.36) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 7 Dec 2017 10:49:09 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA20.uswin.ad.vzwcorp.com (144.8.22.198) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 7 Dec 2017 09:49:08 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Thu, 7 Dec 2017 09:49:08 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 023/156] drm/omap: fix dmabuf mmap for dma_alloc'ed buffers Thread-Topic: [PATCH AUTOSEL for 4.9 023/156] drm/omap: fix dmabuf mmap for dma_alloc'ed buffers Thread-Index: AQHTb3Lme55fq4sQrUmJ6YNxgdIQCg== Date: Thu, 7 Dec 2017 15:48:59 +0000 Message-ID: <20171207154845.4814-23-alexander.levin@verizon.com> References: <20171207154845.4814-1-alexander.levin@verizon.com> In-Reply-To: <20171207154845.4814-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomi Valkeinen [ Upstream commit 9fa1d7537242bd580ffa99c4725a0407096aad26 ] omap_gem_dmabuf_mmap() returns an error (with a WARN) when called for a buffer which is allocated with dma_alloc_*(). This prevents dmabuf mmap from working on SoCs without DMM, e.g. AM4 and OMAP3. I could not find any reason for omap_gem_dmabuf_mmap() rejecting such buffers, and just removing the if() fixes the limitation. Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 3 --- 1 file changed, 3 deletions(-) -- 2.11.0 diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c index af267c35d813..ee5883f59be5 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c @@ -147,9 +147,6 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, struct drm_gem_object *obj = buffer->priv; int ret = 0; - if (WARN_ON(!obj->filp)) - return -EINVAL; - ret = drm_gem_mmap_obj(obj, omap_gem_mmap_size(obj), vma); if (ret < 0) return ret;