From patchwork Thu Dec 7 15:50:15 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: 121026 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8597393qgn; Thu, 7 Dec 2017 08:54:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMY17EtWfc8l3waXmdpB65y0Ngo0STSr9CF9osUW442eBmI4nKMfJNGVX9rawlCKcl3ay4o+ X-Received: by 10.84.140.131 with SMTP id 3mr26478009plt.394.1512665696036; Thu, 07 Dec 2017 08:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512665696; cv=none; d=google.com; s=arc-20160816; b=Ct0j0tkhdeWNwfkmqD+6XsXNHQxt9wWr9prhrQVv1hdEW2U8i5Mu5KspKYhAohLG3m mltLJKU6tjXwRxaJTNYJJF/tEm8LvU/DOsOEqJ+/cOzfJcD2owJZsvU0PFlgrpZzwFpz rkmWWRs+4KnrP80SLpmjssB/r/AOjsaGmSm9D1gOYqGRIlxTax23TTp4LyV9+54J/S39 yCA21kHtwLbTrn4FkxwqCBJrCGqqv6ZXza2Tw4PfztV2SzH3qBTABQuuykZmJLL92pXo BkwnimwmsQVOtCf/jTi3+NTi9k1i6xAcCr5cBdeETRLSgjji6jjQlY8MTwK2Hi8cyeEw vLxQ== 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=9pX7KZyeB1Km9Op9HSuHOlowYQvJQ0ZY7GqMlcOVLRE=; b=YoGfZDK8K0OnGU+zC9I0lL5nBwNMi9EJJ2FqeZMGWonf62fu+SPkUfauR6edpNTCVO G6kpoHgPHQdZr5QYrEY9UN6e1ZEldu9o2pYU1L3Q6ZhTE7gSZtAXSxKbKvd3gNLCz34j C5r3Sjx9tdIGn2gDZrdbC2B8ORc0Q6uSTLaGZrtHdNMNHetpJUBB0UTusebbqpBTS0pb 8GevJ1m05egkxZEaE7lq5WfPj6/qoZiysP3W1+NXSRV/aXNsC/jghpIcn/UU0jbEH/ZU JGJhiBhdVncK5V7aJXmB4YbB2yoGqu3h2PHRDG6SZgwBmANuQRcwRVGhlkKKpv0n0rCE EOJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=RwjNkSoV; dkim=fail header.i=@verizon.com header.s=corp header.b=SBtv+nnB; dkim=fail header.i=@verizon.com header.s=corp header.b=jAqjPQAh; 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 73si4056239ple.621.2017.12.07.08.54.55; Thu, 07 Dec 2017 08:54:56 -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=RwjNkSoV; dkim=fail header.i=@verizon.com header.s=corp header.b=SBtv+nnB; dkim=fail header.i=@verizon.com header.s=corp header.b=jAqjPQAh; 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 S1754881AbdLGQyY (ORCPT + 22 others); Thu, 7 Dec 2017 11:54:24 -0500 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:16009 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932520AbdLGPxr (ORCPT ); Thu, 7 Dec 2017 10:53:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512662027; x=1544198027; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=65oxsRsoYSwxuyRG4fYTI14inQIe7MjD+Mh6faixlFw=; b=RwjNkSoVtSde0swnH58y85DCn+KK1uEZG0x6W//4kQWS8bQKJxHJ7bzy YYfy/Ef6ede7aYHff8N3xFWtkkgMCCYTSgFEA4Hblkn2aXh0W0+J13iWt ePBOb/eNeQVyzw7d9g19F4g7wbPsocMUZ9pTrxsybMyA9it18BCl1uGgw 0=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by omzsmtpe01.verizonbusiness.com with ESMTP; 07 Dec 2017 15:53:45 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Dec 2017 15:53:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512661992; x=1544197992; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=65oxsRsoYSwxuyRG4fYTI14inQIe7MjD+Mh6faixlFw=; b=SBtv+nnB3NNCNPuSG7Sezzh6xw+WRdikN83iiI2D3ku/++mW0OOLP68f kQsDq0bBGb+iswEWrlF7BYPq0xBU+pMSKr6afTwUy0SfDcPPCGCduwycy gQXTd8Hi0whR+WlGwFDxUsfmj32Y+2RsomAL+vcxYz3TEe7MO4RdDD72E 0=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Dec 2017 10:53:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1512661992; x=1544197992; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=65oxsRsoYSwxuyRG4fYTI14inQIe7MjD+Mh6faixlFw=; b=jAqjPQAh8aEclbB2VTCce/EH9dVi3HU/WEaiVawwNaXa9jNc+XT93Bpo HLSqQ88Q7PgLLO8ubOjYZ/uC/b+xauQ6nTqrMfIfaezPAScYZBRzhf4lQ iy83xKdOyEbiJr7aYspYqqQemWzseN+rHXtlGj4lusfoYnykz+C33Tgzw w=; From: alexander.levin@verizon.com Cc: Tomi Valkeinen , alexander.levin@verizon.com X-Host: mariner.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:53:12 +0000 Received: from tbwexch02apd.uswin.ad.vzwcorp.com (153.114.162.26) 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:53:12 -0500 Received: from OMZP1LUMXCA15.uswin.ad.vzwcorp.com (144.8.22.190) by tbwexch02apd.uswin.ad.vzwcorp.com (153.114.162.26) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 7 Dec 2017 10:53:11 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA15.uswin.ad.vzwcorp.com (144.8.22.190) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 7 Dec 2017 09:53:10 -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:53:11 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.4 014/101] drm/omap: fix dmabuf mmap for dma_alloc'ed buffers Thread-Topic: [PATCH AUTOSEL for 4.4 014/101] drm/omap: fix dmabuf mmap for dma_alloc'ed buffers Thread-Index: AQHTb3MS7xNPsshwfkiZcn0iM+t7Zw== Date: Thu, 7 Dec 2017 15:50:15 +0000 Message-ID: <20171207155005.5852-14-alexander.levin@verizon.com> References: <20171207155005.5852-1-alexander.levin@verizon.com> In-Reply-To: <20171207155005.5852-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 27c297672076..d2d1c9a34da1 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c @@ -142,9 +142,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;