Message ID | 20241008120652.159190-10-tzimmermann@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: Introduce DRM client library | expand |
-----Original Message----- From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Thomas Zimmermann Sent: Tuesday, October 8, 2024 4:59 AM To: simona@ffwll.ch; airlied@gmail.com; javierm@redhat.com; jfalempe@redhat.com Cc: dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Thomas Zimmermann <tzimmermann@suse.de>; Karol Herbst <kherbst@redhat.com>; Lyude Paul <lyude@redhat.com>; Danilo Krummrich <dakr@redhat.com> Subject: [PATCH v3 09/12] drm/nouveau: Suspend and resume clients with client helpers > > Replace calls to drm_fb_helper_set_suspend_unlocked() with calls > to the client functions drm_client_dev_suspend() and > drm_client_dev_resume(). Any registered in-kernel client will now > receive suspend and resume events. > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Karol Herbst <kherbst@redhat.com> > Cc: Lyude Paul <lyude@redhat.com> > Cc: Danilo Krummrich <dakr@redhat.com> LGTM, though perhaps it's not my place to say this is okay. I'd wait for an expert on nouveau to respond first before jumping to push. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> -Jonathan Cavitt > --- > drivers/gpu/drm/nouveau/nouveau_display.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c > index e2fd561cd23f..619a3efbe8c8 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_display.c > +++ b/drivers/gpu/drm/nouveau/nouveau_display.c > @@ -28,8 +28,8 @@ > > #include <drm/drm_atomic.h> > #include <drm/drm_atomic_helper.h> > +#include <drm/drm_client_event.h> > #include <drm/drm_crtc_helper.h> > -#include <drm/drm_fb_helper.h> > #include <drm/drm_fourcc.h> > #include <drm/drm_gem_framebuffer_helper.h> > #include <drm/drm_probe_helper.h> > @@ -804,8 +804,7 @@ nouveau_display_suspend(struct drm_device *dev, bool runtime) > { > struct nouveau_display *disp = nouveau_display(dev); > > - /* Disable console. */ > - drm_fb_helper_set_suspend_unlocked(dev->fb_helper, true); > + drm_client_dev_suspend(dev, false); > > if (drm_drv_uses_atomic_modeset(dev)) { > if (!runtime) { > @@ -836,8 +835,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) > } > } > > - /* Enable console. */ > - drm_fb_helper_set_suspend_unlocked(dev->fb_helper, false); > + drm_client_dev_resume(dev, false); > } > > int > -- > 2.46.0 > >
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index e2fd561cd23f..619a3efbe8c8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -28,8 +28,8 @@ #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_client_event.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_probe_helper.h> @@ -804,8 +804,7 @@ nouveau_display_suspend(struct drm_device *dev, bool runtime) { struct nouveau_display *disp = nouveau_display(dev); - /* Disable console. */ - drm_fb_helper_set_suspend_unlocked(dev->fb_helper, true); + drm_client_dev_suspend(dev, false); if (drm_drv_uses_atomic_modeset(dev)) { if (!runtime) { @@ -836,8 +835,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) } } - /* Enable console. */ - drm_fb_helper_set_suspend_unlocked(dev->fb_helper, false); + drm_client_dev_resume(dev, false); } int
Replace calls to drm_fb_helper_set_suspend_unlocked() with calls to the client functions drm_client_dev_suspend() and drm_client_dev_resume(). Any registered in-kernel client will now receive suspend and resume events. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Danilo Krummrich <dakr@redhat.com> --- drivers/gpu/drm/nouveau/nouveau_display.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)