All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] drm: Only lastclose on unload for legacy drivers
Date: Wed, 2 Aug 2017 16:50:30 -0400	[thread overview]
Message-ID: <CADnq5_OM834tgFkQuC4WXzxWV+Vjr72+z4rLFRoxBLo6poLdVA@mail.gmail.com> (raw)
In-Reply-To: <20170802115604.12734-4-daniel.vetter@ffwll.ch>

On Wed, Aug 2, 2017 at 7:56 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> The only thing modern drivers are supposed to do in lastclose is
> restore the fb emulation state. Which is entirely optional, and
> there's really no reason to do that. So restrict it to legacy drivers
> (where the driver cleanup essentially happens in lastclose).

vga_switcheroo_process_delayed_switch() gets called in lastclose.
Won't that need to get moved elsewhere for this to work?

Alex

>
> This will also allow us to share the unregister function with
> drm_dev_unplug().
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_drv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 39191e5c240e..694040a240af 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -860,7 +860,8 @@ void drm_dev_unregister(struct drm_device *dev)
>  {
>         struct drm_map_list *r_list, *list_temp;
>
> -       drm_lastclose(dev);
> +       if (drm_core_check_feature(dev, DRIVER_LEGACY))
> +               drm_lastclose(dev);
>
>         dev->registered = false;
>
> --
> 2.13.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-08-02 20:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02 11:56 [PATCH 0/4] drm unplugging docs Daniel Vetter
2017-08-02 11:56 ` [PATCH 1/4] drm: Extract drm_device.h Daniel Vetter
2017-08-02 11:56 ` [PATCH 2/4] drm: Document device unplug infrastructure Daniel Vetter
2017-08-02 11:56 ` [PATCH 3/4] drm: Only lastclose on unload for legacy drivers Daniel Vetter
2017-08-02 20:50   ` Alex Deucher [this message]
2017-08-02 23:17     ` Daniel Vetter
2017-08-03 13:54       ` Daniel Vetter
2017-08-03 17:52         ` Alex Deucher
2017-08-11  8:49           ` Daniel Vetter
2017-08-04  4:12         ` Michel Dänzer
2017-08-04  9:15           ` Daniel Vetter
2017-08-02 11:56 ` [PATCH 4/4] drm: Clean up drm_dev_unplug Daniel Vetter
2017-08-02 12:26 ` ✓ Fi.CI.BAT: success for drm unplugging docs 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=CADnq5_OM834tgFkQuC4WXzxWV+Vjr72+z4rLFRoxBLo6poLdVA@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.