intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Thomas Zimmermann" <tzimmermann@suse.de>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Oded Gabbay" <ogabbay@kernel.org>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	<joonas.lahtinen@linux.intel.com>,
	<tvrtko.ursulin@linux.intel.com>, <ville.syrjala@linux.intel.com>,
	<imre.deak@intel.com>, <tejas.upadhyay@intel.com>,
	<jouni.hogander@intel.com>, <javierm@redhat.com>,
	 <airlied@gmail.com>, <daniel@ffwll.ch>,
	<lucas.demarchi@intel.com>, <ogabbay@kernel.org>,
	<thomas.hellstrom@linux.intel.com>,
	<intel-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v7 2/6] drm/i915: Unregister in-kernel clients
Date: Fri, 8 Mar 2024 10:28:13 -0500	[thread overview]
Message-ID: <ZesujXc8R5-ovjTL@intel.com> (raw)
In-Reply-To: <a562fc9c-7e11-4149-b20c-f65347fa8032@suse.de>

On Wed, Mar 06, 2024 at 04:11:54PM +0100, Thomas Zimmermann wrote:
> Hi
> 
> Am 05.03.24 um 17:25 schrieb Jani Nikula:
> > On Tue, 05 Mar 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > > On Fri, Mar 01, 2024 at 02:42:55PM +0100, 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. For xe,
> > > > do the same in xe_device_remove()
> > > > 
> > > > Note that there are currently no in-kernel clients in i915 or xe. The
> > > > patch prepares the drivers for a related update of their fbdev support.
> > > > 
> > > > v7:
> > > > 	* update xe driver
> > > > 
> > > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> > > > ---
> > > >   drivers/gpu/drm/i915/i915_driver.c | 3 +++
> > > >   drivers/gpu/drm/xe/xe_device.c     | 3 +++
> > > >   2 files changed, 6 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> > > > index 9ee902d5b72c4..97910a85e3917 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>
> > > > @@ -852,6 +853,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 --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> > > > index 919ad88f0495a..7f41f0ec819f0 100644
> > > > --- a/drivers/gpu/drm/xe/xe_device.c
> > > > +++ b/drivers/gpu/drm/xe/xe_device.c
> > > probably deserves a separate patch since this is one here is named 'drm/i915:'
> > Or do this for both in intel_display_driver_unregister()?
> 
> Ok, sure. I'll update this. I also have to update i915 and xe in patches 5
> and 6. I don't see how I can change them individually. How would I best log
> against both of them? drm/{i915,xe}? or drm/intel?

hmmm... though one...

drm-intel is the name of the i915 repository

well, perhaps drm/{i915,xe} works
or maybe just drm/i915/display: because since display is shared, that
kind of "tag" would be an indication that xe needs it as well anyway.

> 
> Best regards
> Thomas
> 
> > 
> > BR,
> > Jani.
> > 
> > 
> > > > @@ -9,6 +9,7 @@
> > > >   #include <drm/drm_aperture.h>
> > > >   #include <drm/drm_atomic_helper.h>
> > > > +#include <drm/drm_client.h>
> > > >   #include <drm/drm_gem_ttm_helper.h>
> > > >   #include <drm/drm_ioctl.h>
> > > >   #include <drm/drm_managed.h>
> > > > @@ -614,6 +615,8 @@ void xe_device_remove(struct xe_device *xe)
> > > >   	struct xe_gt *gt;
> > > >   	u8 id;
> > > > +	drm_client_dev_unregister(&xe->drm);
> > > > +
> > > >   	xe_device_remove_display(xe);
> > > >   	xe_display_fini(xe);
> > > > -- 
> > > > 2.43.2
> > > > 
> 
> -- 
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstrasse 146, 90461 Nuernberg, Germany
> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
> HRB 36809 (AG Nuernberg)
> 

  reply	other threads:[~2024-03-08 15:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 13:42 [PATCH v7 0/6] drm/i915: Convert fbdev to DRM client Thomas Zimmermann
2024-03-01 13:42 ` [PATCH v7 1/6] drm/client: Export drm_client_dev_unregister() Thomas Zimmermann
2024-03-08 15:49   ` Rodrigo Vivi
2024-04-08 12:07     ` Thomas Zimmermann
2024-03-01 13:42 ` [PATCH v7 2/6] drm/i915: Unregister in-kernel clients Thomas Zimmermann
2024-03-05 16:06   ` Rodrigo Vivi
2024-03-05 16:25     ` Jani Nikula
2024-03-06 15:11       ` Thomas Zimmermann
2024-03-08 15:28         ` Rodrigo Vivi [this message]
2024-03-01 13:42 ` [PATCH v7 3/6] drm/i915: Move fbdev functions Thomas Zimmermann
2024-03-01 13:42 ` [PATCH v7 4/6] drm/i915: Initialize fbdev DRM client with callback functions Thomas Zimmermann
2024-04-05  8:59   ` Hogander, Jouni
2024-03-01 13:42 ` [PATCH v7 5/6] drm/i915: Implement fbdev client callbacks Thomas Zimmermann
2024-04-05  8:31   ` Hogander, Jouni
2024-03-01 13:42 ` [PATCH v7 6/6] drm/i915: Implement fbdev emulation as in-kernel client Thomas Zimmermann
2024-04-05  8:34   ` Hogander, Jouni
2024-04-05  8:59     ` Thomas Zimmermann
2024-04-05  9:04       ` Hogander, Jouni
2024-04-08  7:41         ` Thomas Zimmermann
2024-04-08 12:27     ` Thomas Zimmermann
2024-03-01 13:49 ` ✓ CI.Patch_applied: success for drm/i915: Convert fbdev to DRM client Patchwork
2024-03-01 13:50 ` ✓ CI.checkpatch: " Patchwork
2024-03-01 13:51 ` ✓ CI.KUnit: " Patchwork
2024-03-01 14:02 ` ✓ CI.Build: " Patchwork
2024-03-01 14:03 ` ✓ CI.Hooks: " Patchwork
2024-03-01 14:04 ` ✗ CI.checksparse: warning " Patchwork
2024-03-01 14:22 ` ✓ CI.BAT: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZesujXc8R5-ovjTL@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=javierm@redhat.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=jouni.hogander@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=ogabbay@kernel.org \
    --cc=tejas.upadhyay@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).