Displaying 20 results from an estimated 44 matches for "nouveau_fbcon_destroy".
2017 Nov 06
0
[PATCH] fbcon: fix NULL pointer access in nouveau_fbcon_destroy
...st at redhat.com>
---
drm/nouveau/nouveau_fbcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drm/nouveau/nouveau_fbcon.c b/drm/nouveau/nouveau_fbcon.c
index c533d8e0..be7357bf 100644
--- a/drm/nouveau/nouveau_fbcon.c
+++ b/drm/nouveau/nouveau_fbcon.c
@@ -429,7 +429,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
drm_fb_helper_unregister_fbi(&fbcon->helper);
drm_fb_helper_fini(&fbcon->helper);
- if (nouveau_fb->nvbo) {
+ if (nouveau_fb && nouveau_fb->nvbo) {
nouveau_vma_del(&nouveau_fb->vma);
nouveau_bo_unmap...
2018 Jul 05
4
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...au module on my optimus notebook machine causes
the system to panic. This started occuring when moving from 4.4
to 4.14.
These patches make it such that the system does not panic
when unloading the module.
4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon: fix NULL
pointer access in nouveau_fbcon_destroy") which was already included in
the 4.18 tree.
These patches make it so I can unload the module without a panic but
there is a warning when unloading the module:
sysfs group 'power' not found for kobject 'nv_backlight'
WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_...
2018 Jul 17
0
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...ne causes
> the system to panic. This started occuring when moving from 4.4
> to 4.14.
>
> These patches make it such that the system does not panic
> when unloading the module.
>
> 4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon: fix NULL
> pointer access in nouveau_fbcon_destroy") which was already included in
> the 4.18 tree.
>
> These patches make it so I can unload the module without a panic but
> there is a warning when unloading the module:
> sysfs group 'power' not found for kobject 'nv_backlight'
> WARNING: CPU: 2 PID: 1434 a...
2013 Jul 02
0
[PATCH] drm/nouveau: handle framebuffer pinning correctly
Unpinning wasn't always handled correctly. The crtc_disable
and nouveau_fbcon_destroy calls needed to unpin but didn't,
resulting in a pin leak.
While debugging this I found some leaks in the error paths of
nouveau_user_framebuffer_create, so I fixed those too.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
---
drivers/gpu/drm/nouveau/nouveau_disp...
2016 Jun 01
2
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...has a WARN_ON if
> > framebuffers are left behind. There's a bunch of options:
> > - nouveau somehow manages to keep the crtc on without a framebuffer
> > - nouveau somehow leaks a drm_framebuffer, but removes it from the fb_list
> > - something else
>
> Found it. nouveau_fbcon_destroy() doesn't call drm_framebuffer_remove().
> If I add that, the crtc gets properly disabled on unload.
>
> It does call drm_framebuffer_cleanup(). That's why there was no WARN,
> drm_mode_config_cleanup() only WARNs if a framebuffer was left on the
> mode_config.fb_list.
>...
2018 Jul 17
2
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...panic. This started occuring when moving from 4.4
>> to 4.14.
>>
>> These patches make it such that the system does not panic
>> when unloading the module.
>>
>> 4.14 also requires commit 34112bf4935d ("drm/nouveau/fbcon: fix NULL
>> pointer access in nouveau_fbcon_destroy") which was already included in
>> the 4.18 tree.
>>
>> These patches make it so I can unload the module without a panic but
>> there is a warning when unloading the module:
>> sysfs group 'power' not found for kobject 'nv_backlight'
>> WAR...
2016 Jun 03
1
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...ehind. There's a bunch of options:
> > > > - nouveau somehow manages to keep the crtc on without a framebuffer
> > > > - nouveau somehow leaks a drm_framebuffer, but removes it from the fb_list
> > > > - something else
> > >
> > > Found it. nouveau_fbcon_destroy() doesn't call drm_framebuffer_remove().
> > > If I add that, the crtc gets properly disabled on unload.
> > >
> > > It does call drm_framebuffer_cleanup(). That's why there was no WARN,
> > > drm_mode_config_cleanup() only WARNs if a framebuffer was lef...
2016 May 25
2
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
On Wed, May 25, 2016 at 12:51 PM, Lukas Wunner <lukas at wunner.de> wrote:
>
> On Tue, May 24, 2016 at 11:30:42PM +0200, Daniel Vetter wrote:
>> On Tue, May 24, 2016 at 06:03:27PM +0200, Lukas Wunner wrote:
>> > When a drm_crtc structure is destroyed with drm_crtc_cleanup(), the DRM
>> > core does not turn off the crtc first and neither do the drivers. With
2018 Jun 18
0
[PATCH 2/4] drm/nouveau: Replace drm_framebuffer_{un/reference} with put, get functions
...2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 85c1f10bc2b6..844498c4267c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -429,7 +429,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
nouveau_vma_del(&nouveau_fb->vma);
nouveau_bo_unmap(nouveau_fb->nvbo);
nouveau_bo_unpin(nouveau_fb->nvbo);
- drm_framebuffer_unreference(&nouveau_fb->base);
+ drm_framebuffer_put(&nouveau_fb->base);
}
r...
2012 Nov 22
0
[resend PATCH] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
..._gem_object_unreference_unlocked(chan->ntfy->gem);
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 67a1a06..f337976 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -429,6 +429,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
if (nouveau_fb->nvbo) {
nouveau_bo_unmap(nouveau_fb->nvbo);
nouveau_bo_vma_del(nouveau_fb->nvbo, &nouveau_fb->vma);
+ nouveau_bo_unpin(nouveau_fb->nvbo);
drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->g...
2020 Feb 06
5
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
..., fb->base.height, nvbo->bo.offset, nvbo);
> + fb->width, fb->height, nvbo->bo.offset, nvbo);
>
> vga_switcheroo_client_fb_set(dev->pdev, info);
> return 0;
> @@ -413,18 +413,18 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
> static int
> nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
> {
> - struct nouveau_framebuffer *nouveau_fb = nouveau_framebuffer(fbcon->helper.fb);
> + struct drm_framebuffer *fb = fbcon->helper.fb;
> struct nouveau_bo *nvbo;
>
> drm_fb_helper_unregister_fbi(&fbcon-&...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...dev))
- vga_switcheroo_client_fb_set(to_pci_dev(dev->dev), info);
-
- return 0;
-
-out_unlock:
- if (chan)
- nouveau_vma_del(&fbcon->vma);
- nouveau_bo_unmap(nvbo);
-out_unpin:
- nouveau_bo_unpin(nvbo);
-out_unref:
- nouveau_bo_ref(NULL, &nvbo);
-out:
- return ret;
-}
-
-static int
-nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
-{
- struct drm_framebuffer *fb = fbcon->helper.fb;
- struct nouveau_bo *nvbo;
-
- drm_fb_helper_unregister_info(&fbcon->helper);
- drm_fb_helper_fini(&fbcon->helper);
-
- if (fb && fb->obj[0]) {
- nvbo = nouveau_gem_...
2012 Oct 12
0
[PATCH 3/3, resend with fixed to field] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
..._gem_object_unreference_unlocked(chan->ntfy->gem);
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 67a1a06..f337976 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -429,6 +429,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
if (nouveau_fb->nvbo) {
nouveau_bo_unmap(nouveau_fb->nvbo);
nouveau_bo_vma_del(nouveau_fb->nvbo, &nouveau_fb->vma);
+ nouveau_bo_unpin(nouveau_fb->nvbo);
drm_gem_object_unreference_unlocked(nouveau_fb->nvbo->g...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...if (chan)
> - nouveau_vma_del(&fbcon->vma);
> - nouveau_bo_unmap(nvbo);
> -out_unpin:
> - nouveau_bo_unpin(nvbo);
> -out_unref:
> - nouveau_bo_ref(NULL, &nvbo);
> -out:
> - return ret;
> -}
> -
> -static int
> -nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
> -{
> - struct drm_framebuffer *fb = fbcon->helper.fb;
> - struct nouveau_bo *nvbo;
> -
> - drm_fb_helper_unregister_info(&fbcon->helper);
> - drm_fb_helper_fini(&fbcon->helper);
> -...
2016 Jun 01
0
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
.... And drm_mode_config_cleanup has a WARN_ON if
> framebuffers are left behind. There's a bunch of options:
> - nouveau somehow manages to keep the crtc on without a framebuffer
> - nouveau somehow leaks a drm_framebuffer, but removes it from the fb_list
> - something else
Found it. nouveau_fbcon_destroy() doesn't call drm_framebuffer_remove().
If I add that, the crtc gets properly disabled on unload.
It does call drm_framebuffer_cleanup(). That's why there was no WARN,
drm_mode_config_cleanup() only WARNs if a framebuffer was left on the
mode_config.fb_list.
radeon and amdgpu have the sa...
2016 Jun 03
0
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...; framebuffers are left behind. There's a bunch of options:
> > > - nouveau somehow manages to keep the crtc on without a framebuffer
> > > - nouveau somehow leaks a drm_framebuffer, but removes it from the fb_list
> > > - something else
> >
> > Found it. nouveau_fbcon_destroy() doesn't call drm_framebuffer_remove().
> > If I add that, the crtc gets properly disabled on unload.
> >
> > It does call drm_framebuffer_cleanup(). That's why there was no WARN,
> > drm_mode_config_cleanup() only WARNs if a framebuffer was left on the
> > m...
2023 Jan 09
1
[PATCH] drm/nouveau: Remove file nouveau_fbcon.c
...ma_del(&fbcon->vma);
>> - nouveau_bo_unmap(nvbo);
>> -out_unpin:
>> - nouveau_bo_unpin(nvbo);
>> -out_unref:
>> - nouveau_bo_ref(NULL, &nvbo);
>> -out:
>> - return ret;
>> -}
>> -
>> -static int
>> -nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
>> -{
>> - struct drm_framebuffer *fb = fbcon->helper.fb;
>> - struct nouveau_bo *nvbo;
>> -
>> - drm_fb_helper_unregister_info(&fbcon->helper);
>> - drm_fb_helper_fini(&fb...
2020 Feb 06
2
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...gt; +??????? fb->width, fb->height, nvbo->bo.offset, nvbo);
>>> ? ????? vga_switcheroo_client_fb_set(dev->pdev, info);
>>> ????? return 0;
>>> @@ -413,18 +413,18 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
>>> ? static int
>>> ? nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev
>>> *fbcon)
>>> ? {
>>> -??? struct nouveau_framebuffer *nouveau_fb =
>>> nouveau_framebuffer(fbcon->helper.fb);
>>> +??? struct drm_framebuffer *fb = fbcon->helper.fb;
>>> ????? struct nouvea...
2016 Jul 12
0
[PATCH] drm/nouveau/fbcon: fix deadlock with FBIOPUT_CON2FBMAP
...er_funcs);
>
> ret = drm_fb_helper_init(dev, &fbcon->helper,
> @@ -571,6 +607,8 @@ nouveau_fbcon_fini(struct drm_device *dev)
> if (!drm->fbcon)
> return;
>
> + flush_work(&drm->fbdev_suspend_work);
> +
> nouveau_fbcon_accel_fini(dev);
> nouveau_fbcon_destroy(dev, drm->fbcon);
> kfree(drm->fbcon);
> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
> index ca77ad0..34b2504 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
> @@ -66,...
2020 Feb 06
5
[PATCH 0/4] drm/nouveau: Remove struct nouveau_framebuffer
All fields in struct nouveau_framebuffer appear to be obsolete. The
data structure can be replaced by struct drm_framebuffer entirely.
Patch 1 removes several unused fields from struct nouveau_framebuffer.
Patch 2 moves the field vma to struct nouveau_fbdev. The information
in vma is only relevant for fbdev emulation, and as such he field is
only used there.
Patch 3 removes nvbo from struct