From patchwork Wed Feb 19 10:21:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11391177 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 853401580 for ; Wed, 19 Feb 2020 10:24:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63C7E24671 for ; Wed, 19 Feb 2020 10:24:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="J/qLx6K7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63C7E24671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none 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 DD0776EBB2; Wed, 19 Feb 2020 10:23:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3EE746EB8B for ; Wed, 19 Feb 2020 10:22:33 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id y11so27506424wrt.6 for ; Wed, 19 Feb 2020 02:22:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HgHKhcPbCn8MTTH1HBBSwF6HlQrehoDXRJeIGVezNgw=; b=J/qLx6K7Dz3w8pGQ3OB+K4un/ruRIULZpEwDmVKRCASiIhEuDri1roasFUGWRjWz+i oyV8dwziI3BkoqM2B1W4DevPMPG9zfNCTuLpvwKIEOIGtpX9qZxv1b+k6dKOjDPi9Na/ CJIxm1neOgEgl+C1oNL8NTNJld/vZDY5D95Ms= 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=HgHKhcPbCn8MTTH1HBBSwF6HlQrehoDXRJeIGVezNgw=; b=qeoyvSKJDolgZPQnj0SWcHBF3stw2OeuSxDsVTy1ZoPE+6zS0kJ2zN2W8x9U4aADyB cEKVsaQYV4tEbAD635baLzJ7YsYuqGHgAgd3hJ0zD6L9XYtfvMRmmfQgV0BrOAn/V6ut JwwGx1dTLK2wVTZyfCadUTesWGfBOOCuYgrz7T4OucXZAuZXzmH23fhkKwAZt2iej+K7 nYi8F9Q+e4uJscd6QssRqAnWqOgxjmTCa/IteZGM1xr+9dWRDRZwuPws2P59HQBmQX3r 4j6Ok8V+srY9F2aq/DfA1QF68Ck8lgQrC5oPSPPrYtPCg3yoTrVLQ75GQs/2WejbZOGw ZDEg== X-Gm-Message-State: APjAAAVDlWOQidvX+usX20HNUTPhkuHGzyXzbwLAFpws+w3KLsMm+UJQ tC9/XvT2b9PVha65SjoMK2GjDYM6QDA= X-Google-Smtp-Source: APXvYqxGjC63FARY3+O9jxeXClheIC85O2WOL3J8YQ2viXw3GUj5knKw292cag4jdDmNilq5lmL0vg== X-Received: by 2002:adf:f44a:: with SMTP id f10mr36413274wrp.16.1582107751529; Wed, 19 Feb 2020 02:22:31 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s23sm2370339wra.15.2020.02.19.02.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 02:22:30 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 51/52] drm/udl: drop drm_driver.release hook Date: Wed, 19 Feb 2020 11:21:21 +0100 Message-Id: <20200219102122.1607365-52-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> References: <20200219102122.1607365-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sam Ravnborg , Daniel Vetter , Intel Graphics Development , Emil Velikov , Gerd Hoffmann , Thomas Zimmermann , Daniel Vetter , Alex Deucher , Dave Airlie , Thomas Gleixner , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There's only two functions called from that: drm_kms_helper_poll_fini() and udl_free_urb_list(). Both of these are also called from the ubs_driver->disconnect hook, so entirely pointless to do the same again in the ->release hook. Furthermore by the time we clean up the drm_driver we really shouldn't be touching hardware anymore, so stopping the poll worker and freeing the urb allocations in ->disconnect is the right thing to do. Now disconnect still cleans things up before unregistering the driver, but that's a different issue. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Sean Paul Cc: Daniel Vetter Cc: Thomas Zimmermann Cc: Emil Velikov Cc: Gerd Hoffmann Cc: "Noralf Trønnes" Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Alex Deucher --- drivers/gpu/drm/udl/udl_drv.c | 6 ------ drivers/gpu/drm/udl/udl_drv.h | 1 - drivers/gpu/drm/udl/udl_main.c | 10 ---------- 3 files changed, 17 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index b447fb053e78..7f140898df3e 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -34,14 +34,8 @@ static int udl_usb_resume(struct usb_interface *interface) DEFINE_DRM_GEM_FOPS(udl_driver_fops); -static void udl_driver_release(struct drm_device *dev) -{ - udl_fini(dev); -} - static struct drm_driver driver = { .driver_features = DRIVER_ATOMIC | DRIVER_GEM | DRIVER_MODESET, - .release = udl_driver_release, /* gem hooks */ .gem_create_object = udl_driver_gem_create_object, diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index 1de7eb1b6aac..2642f94a63fc 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -76,7 +76,6 @@ int udl_submit_urb(struct drm_device *dev, struct urb *urb, size_t len); void udl_urb_completion(struct urb *urb); int udl_init(struct udl_device *udl); -void udl_fini(struct drm_device *dev); int udl_render_hline(struct drm_device *dev, int log_bpp, struct urb **urb_ptr, const char *front, char **urb_buf_ptr, diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 538718919916..f5d27f2a5654 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -351,13 +351,3 @@ int udl_drop_usb(struct drm_device *dev) udl_free_urb_list(dev); return 0; } - -void udl_fini(struct drm_device *dev) -{ - struct udl_device *udl = to_udl(dev); - - drm_kms_helper_poll_fini(dev); - - if (udl->urbs.count) - udl_free_urb_list(dev); -}