From patchwork Tue Jul 18 06:33:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9847029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46D22600CC for ; Tue, 18 Jul 2017 06:33:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EA0128429 for ; Tue, 18 Jul 2017 06:33:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 335872853B; Tue, 18 Jul 2017 06:33:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF28728429 for ; Tue, 18 Jul 2017 06:33:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 366D26E2ED; Tue, 18 Jul 2017 06:33:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F2B26E2ED for ; Tue, 18 Jul 2017 06:33:46 +0000 (UTC) Received: by mail-wr0-x241.google.com with SMTP id w4so2277730wrb.1 for ; Mon, 17 Jul 2017 23:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=BoeYWmdh07Kz2H1TaUo/18bP/fBiZk9lAltEvTa8GvQ=; b=i/j7imn+7Yq6sKUnP38Q2xdTHaJBvzcYv6CIaTewmY1EWY7oULjMn1bQSq9dCaBLsb hPNLSSvlGhqfJwtlWPq2FOcVjEkbMYWarAVkKRltaD6PbAeg94hqnYxjTLns3+znaaSf oVQuFsgEyJudV5DdwxO3dt5toYE3Ux1U8X+9Q= 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; bh=BoeYWmdh07Kz2H1TaUo/18bP/fBiZk9lAltEvTa8GvQ=; b=aF3eODnkcUUFp/tOXoCGGhe4qaUj9jpDwR5r9Cs6sPumuk04/3MsvFAm6Pd/SPBJOh ZcNGLX+b6dgfyIeBXFirqVZnJTy5rTjEevJC7SykX5xhXKYzD+XoLzYA0XZq+WHh24qz X2/6MxVtnX6HQcBOBVioJoHQ/01QNhPiIVQYh26SbwdKoo7fbcwQQC7Y+ZB1fUfnNpqU OcA2P7BOkTRxKtoNGAjQDZV8mrBp3wxMyl+1yDhAhBr05RIv4peCxRNHR8A/mWgi1StR VFNLj8Lu06PFfSZugSaQSn0e1HHTLyIpAdXtWJAQeJUjFAHSEGAhrqLBnzgkI7gkyAbg H1og== X-Gm-Message-State: AIVw112udG/Tf69RKhFyL+b13eTR0DWQEZVW0VfoRvZBaz7aZWZ1NZqI hrmb7UMnwsIVAgecjjY= X-Received: by 10.80.129.227 with SMTP id 90mr609908ede.43.1500359625053; Mon, 17 Jul 2017 23:33:45 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id f48sm1218519edf.30.2017.07.17.23.33.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 23:33:44 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm: Update docs around gem_free_object Date: Tue, 18 Jul 2017 08:33:37 +0200 Message-Id: <20170718063337.31942-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.13.2 Cc: Daniel Vetter , Daniel Vetter 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" X-Virus-Scanned: ClamAV using ClamSMTP Not all places correctly stated that gem_free_object_unlocked is the one to use. Reported-by: Eric Anholt Reviewed-by: Eric Anholt --- Documentation/gpu/drm-mm.rst | 2 +- drivers/gpu/drm/drm_gem_cma_helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst index 9412798645c1..ce115caea06f 100644 --- a/Documentation/gpu/drm-mm.rst +++ b/Documentation/gpu/drm-mm.rst @@ -191,7 +191,7 @@ acquired and release by :c:func:`calling drm_gem_object_get()` and holding the lock. When the last reference to a GEM object is released the GEM core calls -the :c:type:`struct drm_driver ` gem_free_object +the :c:type:`struct drm_driver ` gem_free_object_unlocked operation. That operation is mandatory for GEM-enabled drivers and must free the GEM object and all associated resources. diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c index bc28e7575254..275ab872b34f 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -177,7 +177,7 @@ drm_gem_cma_create_with_handle(struct drm_file *file_priv, * This function frees the backing memory of the CMA GEM object, cleans up the * GEM object state and frees the memory used to store the object itself. * Drivers using the CMA helpers should set this as their - * &drm_driver.gem_free_object callback. + * &drm_driver.gem_free_object_unlocked callback. */ void drm_gem_cma_free_object(struct drm_gem_object *gem_obj) {