From patchwork Fri Feb 26 08:50:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 62970 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp594899lbc; Fri, 26 Feb 2016 00:50:34 -0800 (PST) X-Received: by 10.98.70.139 with SMTP id o11mr439011pfi.123.1456476633928; Fri, 26 Feb 2016 00:50:33 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTP id p70si18552680pfj.241.2016.02.26.00.50.33; Fri, 26 Feb 2016 00:50:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF0DB6EA36; Fri, 26 Feb 2016 08:50:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 88D846EA36 for ; Fri, 26 Feb 2016 08:50:31 +0000 (UTC) Received: by mail-wm0-x229.google.com with SMTP id g62so63044333wme.1 for ; Fri, 26 Feb 2016 00:50:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=gGQrcbFgpxE+cZads9pcqRMV1W0ej3o2myE6xXARmAM=; b=SBNk1TG+F4rLfEwYo/Q/x7XZ6d23b4M4wiMqr6RaimFESI4fiLbPBAgXd/5kEsJ/GP 25EL4WJfAerN2djUdpHF7XLkEZhRk68u7+8TtZx3DKhvg//a3R7Hr+PvN37pD/7uro0b lFg82cBqQXs59qUUOSh3ollb33aPHiAMUXzU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gGQrcbFgpxE+cZads9pcqRMV1W0ej3o2myE6xXARmAM=; b=QxA1itv/+coj9Q4NbmRRaoBWSD/N3GgQN0vLEgH+OG3nOuLnX6Shmy1VRo+7X9QGHY Qje1cKKXsKMUY1tcekSkvOOTn8JoC2jXzfttStCVd4wrZv/NqarVGG3To29h2pAZpwe1 t/mIHOS2Ni/xWtDrX4MIHa9Gn0faWp4VW32DE43sKfsKWYGFkM0uVeuNssdIKN3Iyksk dp9A+hMEi8LCKYv0nRT7kyCqaCmoOFXDkVGfVBm/keQeUh2vqjDK6jdSvsO6oKgzFugn o0AACztn/OvEO5occi175bafzQIrMoK30h+VeOTVKqAyptjhBBHFCYD11TDMjTY+7HxH m3Kg== X-Gm-Message-State: AD7BkJI2C8VkR0Qd3ZWbEKS66/GBZo+Isw4P4omAllABIFULmx8Dm200rQpFia6z27/LfdMj X-Received: by 10.194.186.170 with SMTP id fl10mr485812wjc.29.1456476630316; Fri, 26 Feb 2016 00:50:30 -0800 (PST) Received: from lmenx321.st.com. ([80.12.39.182]) by smtp.gmail.com with ESMTPSA id 192sm1934206wmw.0.2016.02.26.00.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Feb 2016 00:50:28 -0800 (PST) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, vincent.abriou@st.com Subject: [PATCH] drm: sti: remove sti_gem_prime_export hack Date: Fri, 26 Feb 2016 09:50:15 +0100 Message-Id: <1456476615-22160-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Thanks to "drm: prime: Honour O_RDWR during prime-handle-to-fd" commit we don't need to hack flags anymore. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_drv.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 506b562..32a3eec 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -181,15 +181,6 @@ static const struct file_operations sti_driver_fops = { .release = drm_release, }; -static struct dma_buf *sti_gem_prime_export(struct drm_device *dev, - struct drm_gem_object *obj, - int flags) -{ - /* we want to be able to write in mmapped buffer */ - flags |= O_RDWR; - return drm_gem_prime_export(dev, obj, flags); -} - static struct drm_driver sti_driver = { .driver_features = DRIVER_HAVE_IRQ | DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, @@ -207,7 +198,7 @@ static struct drm_driver sti_driver = { .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = sti_gem_prime_export, + .gem_prime_export = drm_gem_prime_export, .gem_prime_import = drm_gem_prime_import, .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,