Displaying 20 results from an estimated 24 matches for "nouveau_fbcon_accel_restore".
2016 Jul 12
6
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...+ true);
+}
+
void
-nouveau_fbcon_set_suspend(struct drm_device *dev, int state)
+nouveau_fbcon_set_suspend(struct drm_device *dev, int state, bool synchronous)
{
struct nouveau_drm *drm = nouveau_drm(dev);
- if (drm->fbcon) {
- console_lock();
- if (state == FBINFO_STATE_RUNNING)
- nouveau_fbcon_accel_restore(dev);
- drm_fb_helper_set_suspend(&drm->fbcon->helper, state);
+ if (!drm->fbcon)
+ return;
+
+ if (synchronous) {
+ /* Flush any pending work to turn the console on, and then
+ * wait to turn it off. It must be synchronous as we are
+ * about to suspend or unload the driver.
+...
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...bcon_set_suspend(struct drm_device *dev, int state)
> +nouveau_fbcon_set_suspend(struct drm_device *dev, int state, bool synchronous)
> {
> struct nouveau_drm *drm = nouveau_drm(dev);
> - if (drm->fbcon) {
> - console_lock();
> - if (state == FBINFO_STATE_RUNNING)
> - nouveau_fbcon_accel_restore(dev);
> - drm_fb_helper_set_suspend(&drm->fbcon->helper, state);
> + if (!drm->fbcon)
> + return;
> +
> + if (synchronous) {
> + /* Flush any pending work to turn the console on, and then
> + * wait to turn it off. It must be synchronous as we are
> + * a...
2017 Jan 12
2
[PATCH v2 1/2] drm/nouveau: Don't enabling polling twice on runtime resume
As it turns out, on cards that actually have CRTCs on them we're already
calling drm_kms_helper_poll_enable(drm_dev) from
nouveau_display_resume() before we call it in
nouveau_pmops_runtime_resume(). This leads us to accidentally trying to
enable polling twice, which results in a potential deadlock between the
RPM locks and drm_dev->mode_config.mutex if we end up trying to enable
polling
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...bcon_set_suspend(struct drm_device *dev, int state)
> +nouveau_fbcon_set_suspend(struct drm_device *dev, int state, bool synchronous)
> {
> struct nouveau_drm *drm = nouveau_drm(dev);
> - if (drm->fbcon) {
> - console_lock();
> - if (state == FBINFO_STATE_RUNNING)
> - nouveau_fbcon_accel_restore(dev);
> - drm_fb_helper_set_suspend(&drm->fbcon->helper, state);
> + if (!drm->fbcon)
> + return;
> +
> + if (synchronous) {
> + /* Flush any pending work to turn the console on, and then
> + * wait to turn it off. It must be synchronous as we are
> + * a...
2016 Jul 13
2
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...lock is fixed in a different way.
My current plan is to move stuff out of the lock and allow (just)
resuming the console to be delayed. Some drivers (nouveau,
radeon/amdgpu, i915) do unnecessary stuff under the console lock:
- nouveau: I *think* that cleraing/setting FBINFO_HWACCEL_DISABLED
(nouveau_fbcon_accel_restore) is safe outside the lock as the fb is
already suspended before clearing/after setting the flag.
- radeon: since the console is suspended, I don't think that that all
of the code is radeon_resume_kms is really needed.
- amdgpu: same as radeon. Btw, console_lock is leaked on an error pat...
2017 Jan 12
0
[PATCH 2/2] drm/nouveau: Handle fbcon suspend/resume in seperate worker
..._suspend_work(struct work_struct *work)
+{
+ struct nouveau_drm *drm = container_of(work, typeof(*drm), fbcon_work);
+ int state = drm->fbcon_new_state;
+
+ if (state == FBINFO_STATE_RUNNING)
+ pm_runtime_get_sync(drm->dev->dev);
+
+ console_lock();
+ if (state == FBINFO_STATE_RUNNING)
+ nouveau_fbcon_accel_restore(drm->dev);
+ drm_fb_helper_set_suspend(&drm->fbcon->helper, state);
+ if (state != FBINFO_STATE_RUNNING)
+ nouveau_fbcon_accel_save_disable(drm->dev);
+ console_unlock();
+
+ if (state == FBINFO_STATE_RUNNING) {
+ pm_runtime_mark_last_busy(drm->dev->dev);
+ pm_runtime_put_s...
2015 Jan 05
2
drm/nouveau: dont switch vt on suspend
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 3ed12a8cfc91..a4a586807903 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -370,6 +370,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
ret = -ENOMEM;
goto
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...bcon_set_suspend(struct drm_device *dev, int state)
> +nouveau_fbcon_set_suspend(struct drm_device *dev, int state, bool synchronous)
> {
> struct nouveau_drm *drm = nouveau_drm(dev);
> - if (drm->fbcon) {
> - console_lock();
> - if (state == FBINFO_STATE_RUNNING)
> - nouveau_fbcon_accel_restore(dev);
> - drm_fb_helper_set_suspend(&drm->fbcon->helper, state);
> + if (!drm->fbcon)
> + return;
> +
> + if (synchronous) {
> + /* Flush any pending work to turn the console on, and then
> + * wait to turn it off. It must be synchronous as we are
> + * a...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...*dev, int state)
> > +nouveau_fbcon_set_suspend(struct drm_device *dev, int state, bool synchronous)
> > {
> > struct nouveau_drm *drm = nouveau_drm(dev);
> > - if (drm->fbcon) {
> > - console_lock();
> > - if (state == FBINFO_STATE_RUNNING)
> > - nouveau_fbcon_accel_restore(dev);
> > - drm_fb_helper_set_suspend(&drm->fbcon->helper, state);
> > + if (!drm->fbcon)
> > + return;
> > +
> > + if (synchronous) {
> > + /* Flush any pending work to turn the console on, and then
> > + * wait to turn it off. It must be...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...struct drm_device *dev)
-{
- struct nouveau_drm *drm = nouveau_drm(dev);
- if (drm->fbcon && drm->fbcon->helper.info) {
- drm->fbcon->saved_flags = drm->fbcon->helper.info->flags;
- drm->fbcon->helper.info->flags |= FBINFO_HWACCEL_DISABLED;
- }
-}
-
-void
-nouveau_fbcon_accel_restore(struct drm_device *dev)
-{
- struct nouveau_drm *drm = nouveau_drm(dev);
- if (drm->fbcon && drm->fbcon->helper.info)
- drm->fbcon->helper.info->flags = drm->fbcon->saved_flags;
-}
-
-static void
-nouveau_fbcon_accel_fini(struct drm_device *dev)
-{
- struct nouveau_...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...- if (drm->fbcon && drm->fbcon->helper.info) {
> - drm->fbcon->saved_flags = drm->fbcon->helper.info->flags;
> - drm->fbcon->helper.info->flags |= FBINFO_HWACCEL_DISABLED;
> - }
> -}
> -
> -void
> -nouveau_fbcon_accel_restore(struct drm_device *dev)
> -{
> - struct nouveau_drm *drm = nouveau_drm(dev);
> - if (drm->fbcon && drm->fbcon->helper.info)
> - drm->fbcon->helper.info->flags = drm->fbcon->saved_flags;
> -}
> -
> -static void
> -nouv...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...mp;& drm->fbcon->helper.info) {
>> - drm->fbcon->saved_flags = drm->fbcon->helper.info->flags;
>> - drm->fbcon->helper.info->flags |= FBINFO_HWACCEL_DISABLED;
>> - }
>> -}
>> -
>> -void
>> -nouveau_fbcon_accel_restore(struct drm_device *dev)
>> -{
>> - struct nouveau_drm *drm = nouveau_drm(dev);
>> - if (drm->fbcon && drm->fbcon->helper.info)
>> - drm->fbcon->helper.info->flags = drm->fbcon->saved_flags;
>> -}
>> -
>...
2016 Jul 15
1
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...is to move stuff out of the lock and allow (just)
> > resuming the console to be delayed. Some drivers (nouveau,
> > radeon/amdgpu, i915) do unnecessary stuff under the console lock:
> >
> > - nouveau: I *think* that cleraing/setting FBINFO_HWACCEL_DISABLED
> > (nouveau_fbcon_accel_restore) is safe outside the lock as the fb is
> > already suspended before clearing/after setting the flag.
> > - radeon: since the console is suspended, I don't think that that all
> > of the code is radeon_resume_kms is really needed.
> > - amdgpu: same as radeon. Btw...
2016 Jul 13
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...ws.
> My current plan is to move stuff out of the lock and allow (just)
> resuming the console to be delayed. Some drivers (nouveau,
> radeon/amdgpu, i915) do unnecessary stuff under the console lock:
>
> - nouveau: I *think* that cleraing/setting FBINFO_HWACCEL_DISABLED
> (nouveau_fbcon_accel_restore) is safe outside the lock as the fb is
> already suspended before clearing/after setting the flag.
> - radeon: since the console is suspended, I don't think that that all
> of the code is radeon_resume_kms is really needed.
> - amdgpu: same as radeon. Btw, console_lock is le...
2014 Aug 18
0
[PATCH] drm: Display Nouveau boot options at launch
...module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400);
static void
diff --git a/drm/nouveau_fbcon.h b/drm/nouveau_fbcon.h
index 34658cf..1e2e9e2 100644
--- a/drm/nouveau_fbcon.h
+++ b/drm/nouveau_fbcon.h
@@ -72,5 +72,8 @@ void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
void nouveau_fbcon_accel_restore(struct drm_device *dev);
void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
+
+extern int nouveau_nofbaccel;
+
#endif /* __NV50_FBCON_H__ */
diff --git a/drm/nouveau_sysfs.c b/drm/nouveau_sysfs.c
index 3c6962d..8fbbf30 100644
--- a/drm/nouveau_sysfs.c
+++ b/drm/nouveau_sysfs.c
@@...
2023 Jan 10
1
[PATCH v2] drm/nouveau: Remove file nouveau_fbcon.c
...struct drm_device *dev)
-{
- struct nouveau_drm *drm = nouveau_drm(dev);
- if (drm->fbcon && drm->fbcon->helper.info) {
- drm->fbcon->saved_flags = drm->fbcon->helper.info->flags;
- drm->fbcon->helper.info->flags |= FBINFO_HWACCEL_DISABLED;
- }
-}
-
-void
-nouveau_fbcon_accel_restore(struct drm_device *dev)
-{
- struct nouveau_drm *drm = nouveau_drm(dev);
- if (drm->fbcon && drm->fbcon->helper.info)
- drm->fbcon->helper.info->flags = drm->fbcon->saved_flags;
-}
-
-static void
-nouveau_fbcon_accel_fini(struct drm_device *dev)
-{
- struct nouveau_...
2018 Aug 13
0
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...uct nvif_object blit;
struct nvif_object twod;
+
+ struct mutex hotplug_lock;
+ bool hotplug_waiting;
};
void nouveau_fbcon_restore(void);
@@ -68,6 +71,8 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state);
void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
void nouveau_fbcon_accel_restore(struct drm_device *dev);
+void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
+void nouveau_fbcon_hotplug_resume(struct nouveau_fbdev *fbcon);
extern int nouveau_nofbaccel;
#endif /* __NV50_FBCON_H__ */
--
2.17.1
2018 Aug 13
0
[PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...ct nvif_object blit;
struct nvif_object twod;
+
+ struct mutex hotplug_lock;
+ bool hotplug_waiting;
};
void nouveau_fbcon_restore(void);
@@ -68,6 +71,10 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state);
void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
void nouveau_fbcon_accel_restore(struct drm_device *dev);
+void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
+void nouveau_fbcon_hotplug_resume(struct nouveau_fbdev *fbcon);
+bool nouveau_fbcon_hotplugged_in_suspend(struct nouveau_fbdev *fbcon);
+
extern int nouveau_nofbaccel;
#endif /* __NV50_FBCON_H__ */
--...
2018 Aug 13
6
[PATCH v7 0/5] Fix connector probing deadlocks from RPM bugs
Latest version of https://patchwork.freedesktop.org/series/46815/ , with
one small change re: ilia
Lyude Paul (5):
drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement
drm/nouveau: Remove duplicate poll_enable() in pmops_runtime_suspend()
drm/nouveau: Fix deadlock with fb_helper with async RPM requests
drm/nouveau: Use pm_runtime_get_noresume() in connector_detect()
2018 Aug 14
1
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...od;
> +
> + struct mutex hotplug_lock;
> + bool hotplug_waiting;
> };
>
> void nouveau_fbcon_restore(void);
> @@ -68,6 +71,8 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state);
> void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
> void nouveau_fbcon_accel_restore(struct drm_device *dev);
>
> +void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
> +void nouveau_fbcon_hotplug_resume(struct nouveau_fbdev *fbcon);
> extern int nouveau_nofbaccel;
>
> #endif /* __NV50_FBCON_H__ */
> --
> 2.17.1
>
--
Daniel Vetter
So...