From patchwork Wed Aug 7 14:52:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 170761 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp7246453ile; Wed, 7 Aug 2019 07:53:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTW7JC2PvUFwyyD4w2GYquyMZOWJ5AOe2le0uo7Ha8TK8uQ3824mnqwmzsPSY3sHv0qZj4 X-Received: by 2002:a17:902:1a6:: with SMTP id b35mr8587457plb.190.1565189582606; Wed, 07 Aug 2019 07:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565189582; cv=none; d=google.com; s=arc-20160816; b=UXI1vK4ZBB2Om/UGWMDExm+uunjAthf8np9LqMVRJKJjwuCYUa1CXeUJBYCbfS2/09 JKLIBUPfe8aLSNQeGSX1Wi6PAHSolXPA2OoMS/uDStDuKBZRmZRkGhhvoLBWZwG4ghH9 mvB9NCWpPak53IjwHSL5B5PWAQhmf36R1ybmG7OqEHyRSxHglttvxHn/3arUvkRZMSn0 CQqdQAN1+ZYSsftTfp7BuTGIIgzqFwrc4QoFzTCF9iZyCPDO2Js8Df1+uYW8kkoqgx8E 3SQyesc/QkFEr6AMH7k68kp+2zHoerWXLFhrS5FsLAPmXC8B5/X0L6ZWUPhZVhwUtfJv 6CNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=em8rRmEq3vZD1Bs9hzynsE/+MUtKwLDqvq07IHWz6/Y=; b=a4RMOUoBcD9Chj1Hdw7iLNpHTAJW0br3QTH9H47GtmjfXwEHvhbJbVeDUPm8IxhA/i id4nLEC7HsoORWJnd1sixbPihQKPukda74nuMJLNCbF6cx0o1fijhTlBnPTXyhCXdvXq QeP4b4EJl9bKQtrIggkslezGT6jWaaERZCdOyJSVh9XTSNAeaVNAAcVNPJw5jHBaV+Rx 3z5UTedYRXHErrszzkanlbnSyl7Iv0z8Md+0AFGB6NoQ+Lb5RIJ4zXPITmatY1q+dz0B ou29ijWk0d7m0gJVDFTqVJ+i6C0kllhf5f9WHyRJNrdf8pfNIC1pkxqanb+QFrnCryb5 yP7g== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id i13si49668386pgf.335.2019.08.07.07.53.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Aug 2019 07:53:02 -0700 (PDT) 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 491886E71A; Wed, 7 Aug 2019 14:53:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc41.google.com (mail-yw1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A2636E71A for ; Wed, 7 Aug 2019 14:53:00 +0000 (UTC) Received: by mail-yw1-xc41.google.com with SMTP id n205so32467550ywb.10 for ; Wed, 07 Aug 2019 07:53:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OXnz5Y6FmMzGTJW0pmoQIwRQ3acEgsMeVGem1PKXG30=; b=JKOh92gjVbWshVYIT/+7zLuhoN5Vn6PM6PMxeQiWK11EcUX6C4h4HZgrLyekF+bw9L yuUNrhCXAeLFIvQH+CZNc4lFvL0QAUWrJKnBfxnlmpPmUb1lQin6PmNNlOLhxHNxVsfA e/zrEb3Z1ln6MOjqp0z+/8VNDMLTmqtFg7K4gBEz6WNNgqWWcADoJd1tPF1m+EvxYhHp HAMe2ZDRNnBf7PgwexGQhnXBjQ3aj//BYNrTJLOKs4rdFRxbBM3lyC9H51NDqNqBA+Os uaiROsNW4t7IU3dD5v8hVft5SLtzhenQn7M4ff6bWOJ741FbXZWIf3lh2T4OhE4SvXmE Q6eg== X-Gm-Message-State: APjAAAWZpueN/YLEjt0u0wMsjBHrwjWWWDBXfdjFSaES54Y7Y5zO8nB6 WO5zK/zcDpZGj9lkXUY/IdSfjcZu4g8= X-Received: by 2002:a0d:c247:: with SMTP id e68mr6351749ywd.17.1565189579591; Wed, 07 Aug 2019 07:52:59 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id c123sm712935ywf.25.2019.08.07.07.52.59 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 07 Aug 2019 07:52:59 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org, daniel@ffwll.ch, airlied@gmail.com, mripard@kernel.org, robh@kernel.org, emil.velikov@collabora.com Subject: [PATCH 1/2] Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()" Date: Wed, 7 Aug 2019 10:52:47 -0400 Message-Id: <20190807145253.2037-2-sean@poorly.run> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog In-Reply-To: <20190807145253.2037-1-sean@poorly.run> References: <20190807145253.2037-1-sean@poorly.run> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OXnz5Y6FmMzGTJW0pmoQIwRQ3acEgsMeVGem1PKXG30=; b=QQEswqWyqBP0XfCdFLUBmC5o330rwujw5pqbA6/85i82cLILMXGwrKK0z9novGdTu6 VidBx4OhdHUyLEyPE52oY2X+/ywf+g1XXJi1E9YJkuBz8d3LKvZsWTJmxHjzqLilZwFa Qxh0p3atdf1PTymJfv1sotBTWCisyj9Ka+1jamzZSEzvEV0ykT0Q/GDNMRPgFhBvfxt5 zEKvLhjtHzWdC4C28wbDdRLXYQVpgiDDMpieXyYMWE0g2CTa0KLcMsQ3JIXn84cB6FL3 zBXhyPEg7Nu1Sx0gtBzcc32I4oAWPq4cTTLKfrKatHqc89iFZhKV0kOZYLrflLtrkxnI 8i2Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Rob Herring This reverts commit 220df83a5394fbf7c1486ba7848794b7b351d598. Turns out drm_gem_dumb_map_offset really only worked for the dumb buffer case, so revert the name change. Signed-off-by: Rob Herring Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_dumb_buffers.c | 4 ++-- drivers/gpu/drm/drm_gem.c | 10 +++------- drivers/gpu/drm/exynos/exynos_drm_gem.c | 3 ++- include/drm/drm_gem.h | 4 ++-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c index b55cfc9e8772..d18a740fe0f1 100644 --- a/drivers/gpu/drm/drm_dumb_buffers.c +++ b/drivers/gpu/drm/drm_dumb_buffers.c @@ -48,7 +48,7 @@ * To support dumb objects drivers must implement the &drm_driver.dumb_create * operation. &drm_driver.dumb_destroy defaults to drm_gem_dumb_destroy() if * not set and &drm_driver.dumb_map_offset defaults to - * drm_gem_map_offset(). See the callbacks for further details. + * drm_gem_dumb_map_offset(). See the callbacks for further details. * * Note that dumb objects may not be used for gpu acceleration, as has been * attempted on some ARM embedded platforms. Such drivers really must have @@ -127,7 +127,7 @@ int drm_mode_mmap_dumb_ioctl(struct drm_device *dev, args->handle, &args->offset); else - return drm_gem_map_offset(file_priv, dev, args->handle, + return drm_gem_dumb_map_offset(file_priv, dev, args->handle, &args->offset); } diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 8cbfd60e09c0..afc38cece3f5 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -298,7 +298,7 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle) EXPORT_SYMBOL(drm_gem_handle_delete); /** - * drm_gem_map_offset - return the fake mmap offset for a gem object + * drm_gem_dumb_map_offset - return the fake mmap offset for a gem object * @file: drm file-private structure containing the gem object * @dev: corresponding drm_device * @handle: gem object handle @@ -307,14 +307,10 @@ EXPORT_SYMBOL(drm_gem_handle_delete); * This implements the &drm_driver.dumb_map_offset kms driver callback for * drivers which use gem to manage their backing storage. * - * It can also be used by drivers using GEM BO implementations which - * have same restriction that imported objects cannot be mapped. The - * shmem backend is one example. - * * Returns: * 0 on success or a negative error code on failure. */ -int drm_gem_map_offset(struct drm_file *file, struct drm_device *dev, +int drm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, u32 handle, u64 *offset) { struct drm_gem_object *obj; @@ -340,7 +336,7 @@ int drm_gem_map_offset(struct drm_file *file, struct drm_device *dev, return ret; } -EXPORT_SYMBOL_GPL(drm_gem_map_offset); +EXPORT_SYMBOL_GPL(drm_gem_dumb_map_offset); /** * drm_gem_dumb_destroy - dumb fb callback helper for gem based drivers diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index bf0ad8e5a02b..d734d9d51762 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -273,7 +273,8 @@ int exynos_drm_gem_map_ioctl(struct drm_device *dev, void *data, { struct drm_exynos_gem_map *args = data; - return drm_gem_map_offset(file_priv, dev, args->handle, &args->offset); + return drm_gem_dumb_map_offset(file_priv, dev, args->handle, + &args->offset); } struct exynos_drm_gem *exynos_drm_gem_get(struct drm_file *filp, diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index 0d6445fa9541..ae693c0666cd 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -401,8 +401,8 @@ int drm_gem_fence_array_add(struct xarray *fence_array, int drm_gem_fence_array_add_implicit(struct xarray *fence_array, struct drm_gem_object *obj, bool write); -int drm_gem_map_offset(struct drm_file *file, struct drm_device *dev, - u32 handle, u64 *offset); +int drm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, + u32 handle, u64 *offset); int drm_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev, uint32_t handle);