diff mbox series

[v5,1/7] drm/i915: Unregister in-kernel clients

Message ID 20230927102808.18650-2-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm/i915: Convert fbdev to DRM client | expand

Commit Message

Thomas Zimmermann Sept. 27, 2023, 10:26 a.m. UTC
Unregister all in-kernel clients before unloading the i915 driver. For
other drivers, drm_dev_unregister() does this automatically. As i915
does not use this helper, it has to perform the call by itself.

Note that there are currently no in-kernel clients in i915. The patch
prepares the driver for a related update of its fbdev support.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/i915/i915_driver.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jouni Högander Oct. 25, 2023, 7:28 a.m. UTC | #1
On Wed, 2023-09-27 at 12:26 +0200, Thomas Zimmermann wrote:
> Unregister all in-kernel clients before unloading the i915 driver.
> For
> other drivers, drm_dev_unregister() does this automatically. As i915
> does not use this helper, it has to perform the call by itself.
> 
> Note that there are currently no in-kernel clients in i915. The patch
> prepares the driver for a related update of its fbdev support.

Hi Thomas. You need to move patch 3/7 before this one. Otherwise this
doesn't build.

BR,

Jouni Högander

> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/i915/i915_driver.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_driver.c
> b/drivers/gpu/drm/i915/i915_driver.c
> index d50347e5773a3..de19197d2e052 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -41,6 +41,7 @@
>  
>  #include <drm/drm_aperture.h>
>  #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_client.h>
>  #include <drm/drm_ioctl.h>
>  #include <drm/drm_managed.h>
>  #include <drm/drm_probe_helper.h>
> @@ -855,6 +856,8 @@ void i915_driver_remove(struct drm_i915_private
> *i915)
>  {
>         intel_wakeref_t wakeref;
>  
> +       drm_client_dev_unregister(&i915->drm);
> +
>         wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>  
>         i915_driver_unregister(i915);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index d50347e5773a3..de19197d2e052 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -41,6 +41,7 @@ 
 
 #include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_client.h>
 #include <drm/drm_ioctl.h>
 #include <drm/drm_managed.h>
 #include <drm/drm_probe_helper.h>
@@ -855,6 +856,8 @@  void i915_driver_remove(struct drm_i915_private *i915)
 {
 	intel_wakeref_t wakeref;
 
+	drm_client_dev_unregister(&i915->drm);
+
 	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
 
 	i915_driver_unregister(i915);