From patchwork Tue Nov 12 14:04:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11239339 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 684061920 for ; Tue, 12 Nov 2019 14:04:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E46D206B6 for ; Tue, 12 Nov 2019 14:04:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727348AbfKLOEg (ORCPT ); Tue, 12 Nov 2019 09:04:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:43898 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727324AbfKLOEg (ORCPT ); Tue, 12 Nov 2019 09:04:36 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D9A2EB2BA; Tue, 12 Nov 2019 14:04:34 +0000 (UTC) From: Thomas Zimmermann To: airlied@redhat.com, sean@poorly.run, daniel@ffwll.ch, b.zolnierkie@samsung.com, noralf@tronnes.org, kraxel@redhat.com, sam@ravnborg.org, emil.velikov@collabora.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v3 3/5] drm/udl: Remove udl implementation of GEM's free_object() Date: Tue, 12 Nov 2019 15:04:29 +0100 Message-Id: <20191112140431.7895-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191112140431.7895-1-tzimmermann@suse.de> References: <20191112140431.7895-1-tzimmermann@suse.de> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Udl used to have a custom implementation for free_object() of struct drm_gem_object_funcs. It unmapped the memory buffer of the fbdev emulation. With the switch to generic fbdev emulation, this is now handled by the fbdev code internally. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/udl/udl_gem.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c index 6eade6b4b0dc..b6e26f98aa0a 100644 --- a/drivers/gpu/drm/udl/udl_gem.c +++ b/drivers/gpu/drm/udl/udl_gem.c @@ -17,22 +17,6 @@ * GEM object funcs */ -static void udl_gem_object_free_object(struct drm_gem_object *obj) -{ - struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); - - /* Fbdev emulation vmaps the buffer. Unmap it here for consistency - * with the original udl GEM code. - * - * TODO: Switch to generic fbdev emulation and release the - * GEM object with drm_gem_shmem_free_object(). - */ - if (shmem->vaddr) - drm_gem_shmem_vunmap(obj, shmem->vaddr); - - drm_gem_shmem_free_object(obj); -} - static int udl_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) { @@ -91,7 +75,7 @@ static void *udl_gem_object_vmap(struct drm_gem_object *obj) } static const struct drm_gem_object_funcs udl_gem_object_funcs = { - .free = udl_gem_object_free_object, + .free = drm_gem_shmem_free_object, .print_info = drm_gem_shmem_print_info, .pin = drm_gem_shmem_pin, .unpin = drm_gem_shmem_unpin,