Displaying 20 results from an estimated 55 matches for "nouveau_user_framebuffer_create".
2024 Aug 12
1
[PATCH v2 4/9] drm/nouveau: Do not set struct drm_mode_config_funcs.output_poll_changed
...ispnv50/disp.c
index e4c8ce6dd40a..eed579a6c858 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -2648,7 +2648,6 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
static const struct drm_mode_config_funcs
nv50_disp_func = {
.fb_create = nouveau_user_framebuffer_create,
- .output_poll_changed = drm_fb_helper_output_poll_changed,
.atomic_check = nv50_disp_atomic_check,
.atomic_commit = nv50_disp_atomic_commit,
.atomic_state_alloc = nv50_disp_atomic_state_alloc,
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c...
2018 Aug 14
1
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...2f6..a0772389ed90 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -2049,7 +2049,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
> static const struct drm_mode_config_funcs
> nv50_disp_func = {
> .fb_create = nouveau_user_framebuffer_create,
> - .output_poll_changed = drm_fb_helper_output_poll_changed,
> + .output_poll_changed = nouveau_fbcon_output_poll_changed,
> .atomic_check = nv50_disp_atomic_check,
> .atomic_commit = nv50_disp_atomic_commit,
> .atomic_state_alloc = nv50_disp_atomic_state_alloc,
> diff --g...
2017 Mar 29
1
[PATCH 1/6] drm/nouveau: Fail fb creation from imported dma-bufs.
...| 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 72fdba1a1c5d..e8e6bc7b6d51 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -286,6 +286,10 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
return ERR_PTR(-ENOENT);
nvbo = nouveau_gem_object(gem);
+ /* Handle is an imported dma-buf, so cannot be migrated to VRAM */
+ if (gem->import_attach)
+ return ERR_PTR(-EINVAL);
+
ret = nouveau_framebuffer_new(dev, mode_cmd, nvbo, &fb);
if (ret == 0)
r...
2018 Jul 17
1
[PATCH 2/5] drm/nouveau: Grab RPM ref while probing outputs
...ut_poll_changed(struct drm_device *dev)
> +{
> + pm_runtime_get_sync(dev->dev);
> + drm_fb_helper_hotplug_event(dev->fb_helper);
> + pm_runtime_put_autosuspend(dev->dev);
> +}
> +
> static const struct drm_mode_config_funcs
> nv50_disp_func = {
> .fb_create = nouveau_user_framebuffer_create,
> - .output_poll_changed = drm_fb_helper_output_poll_changed,
> + .output_poll_changed = nouveau_output_poll_changed,
It might make sense to provide a generic DRM helper for this.
Same for patch 3 in this series.
Thanks,
Lukas
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_display.c | 15 ++++++++++-----
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 +++++++
drivers/gpu/drm/nouveau/nv50_display.c | 13 +++++++++++++
3 file...
2020 Feb 06
5
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...fb, mode_cmd);
> + fb->obj[0] = gem;
>
> - ret = drm_framebuffer_init(dev, &fb->base, &nouveau_framebuffer_funcs);
> + ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
> if (ret)
> kfree(fb);
> return ret;
> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
> struct drm_file *file_priv,
> const struct drm_mode_fb_cmd2 *mode_cmd)
> {
> - struct nouveau_framebuffer *fb;
> + struct drm_framebuffer *fb;
> struct drm_gem_object *gem;
> int ret;
>
> @@ -260,7 +260,7 @@ nouveau_user_fr...
2020 Feb 06
2
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...amebuffer_init(dev, &fb->base,
>>> &nouveau_framebuffer_funcs);
>>> +??? ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
>>> ????? if (ret)
>>> ????????? kfree(fb);
>>> ????? return ret;
>>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
>>> *dev,
>>> ????????????????? struct drm_file *file_priv,
>>> ????????????????? const struct drm_mode_fb_cmd2 *mode_cmd)
>>> ? {
>>> -??? struct nouveau_framebuffer *fb;
>>> +??? struct drm_framebuffer *fb;
>>> ?...
2013 Sep 04
4
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...; Here, have a completely untested patch to fix things...
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -138,17 +143,26 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
> {
> struct nouveau_framebuffer *nouveau_fb;
> struct drm_gem_object *gem;
> + struct nouveau_bo *nvbo;
> int ret = -ENOMEM;
>
> gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
> if...
2018 Aug 13
0
[PATCH v7 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...ispnv50/disp.c
index 8b522a9b12f6..a0772389ed90 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -2049,7 +2049,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
static const struct drm_mode_config_funcs
nv50_disp_func = {
.fb_create = nouveau_user_framebuffer_create,
- .output_poll_changed = drm_fb_helper_output_poll_changed,
+ .output_poll_changed = nouveau_fbcon_output_poll_changed,
.atomic_check = nv50_disp_atomic_check,
.atomic_commit = nv50_disp_atomic_commit,
.atomic_state_alloc = nv50_disp_atomic_state_alloc,
diff --git a/drivers/gpu/drm/nouveau/n...
2018 Aug 13
0
[PATCH v6 3/5] drm/nouveau: Fix deadlock with fb_helper with async RPM requests
...ispnv50/disp.c
index 8b522a9b12f6..a0772389ed90 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -2049,7 +2049,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
static const struct drm_mode_config_funcs
nv50_disp_func = {
.fb_create = nouveau_user_framebuffer_create,
- .output_poll_changed = drm_fb_helper_output_poll_changed,
+ .output_poll_changed = nouveau_fbcon_output_poll_changed,
.atomic_check = nv50_disp_atomic_check,
.atomic_commit = nv50_disp_atomic_commit,
.atomic_state_alloc = nv50_disp_atomic_state_alloc,
diff --git a/drivers/gpu/drm/nouveau/n...
2020 Feb 06
2
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...framebuffer_init(dev, &fb->base,
>>> &nouveau_framebuffer_funcs);
>>> +??? ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
>>> ????? if (ret)
>>> ????????? kfree(fb);
>>> ????? return ret;
>>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
>>> *dev,
>>> ????????????????? struct drm_file *file_priv,
>>> ????????????????? const struct drm_mode_fb_cmd2 *mode_cmd)
>>> ? {
>>> -??? struct nouveau_framebuffer *fb;
>>> +??? struct drm_framebuffer *fb;
>>> ????...
2013 Sep 25
3
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...ix things...
> >>
> >> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> >> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> >> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> >> @@ -138,17 +143,26 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
> >> {
> >> struct nouveau_framebuffer *nouveau_fb;
> >> struct drm_gem_object *gem;
> >> + struct nouveau_bo *nvbo;
> >> int ret = -ENOMEM;
> >>
> >> gem = drm_gem_object_l...
2020 Feb 10
2
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...;> &nouveau_framebuffer_funcs);
> >>>> + ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
> >>>> if (ret)
> >>>> kfree(fb);
> >>>> return ret;
> >>>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
> >>>> *dev,
> >>>> struct drm_file *file_priv,
> >>>> const struct drm_mode_fb_cmd2 *mode_cmd)
> >>>> {
> >>>> - struct nouveau_framebuffer *fb;
> >>>...
2020 Feb 10
2
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...>>>>>>> + ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
>>>>>>> if (ret)
>>>>>>> kfree(fb);
>>>>>>> return ret;
>>>>>>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
>>>>>>> *dev,
>>>>>>> struct drm_file *file_priv,
>>>>>>> const struct drm_mode_fb_cmd2 *mode_cmd)
>>>>>>> {
>>>>>>> - struct nou...
2020 Feb 06
0
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...= gem;
+ drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd);
+ fb->obj[0] = gem;
- ret = drm_framebuffer_init(dev, &fb->base, &nouveau_framebuffer_funcs);
+ ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
if (ret)
kfree(fb);
return ret;
@@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
struct drm_file *file_priv,
const struct drm_mode_fb_cmd2 *mode_cmd)
{
- struct nouveau_framebuffer *fb;
+ struct drm_framebuffer *fb;
struct drm_gem_object *gem;
int ret;
@@ -260,7 +260,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
ret =...
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()
2020 Feb 06
0
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...>> -??? ret = drm_framebuffer_init(dev, &fb->base,
>> &nouveau_framebuffer_funcs);
>> +??? ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
>> ????? if (ret)
>> ????????? kfree(fb);
>> ????? return ret;
>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
>> *dev,
>> ????????????????? struct drm_file *file_priv,
>> ????????????????? const struct drm_mode_fb_cmd2 *mode_cmd)
>> ? {
>> -??? struct nouveau_framebuffer *fb;
>> +??? struct drm_framebuffer *fb;
>> ????? struct drm_gem_object *gem...
2020 Feb 06
0
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...gt;> ? -??? ret = drm_framebuffer_init(dev, &fb->base,
>> &nouveau_framebuffer_funcs);
>> +??? ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
>> ????? if (ret)
>> ????????? kfree(fb);
>> ????? return ret;
>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
>> *dev,
>> ????????????????? struct drm_file *file_priv,
>> ????????????????? const struct drm_mode_fb_cmd2 *mode_cmd)
>> ? {
>> -??? struct nouveau_framebuffer *fb;
>> +??? struct drm_framebuffer *fb;
>> ????? struct drm_gem_object *gem;...
2020 Feb 07
0
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...;fb->base,
>>>> &nouveau_framebuffer_funcs);
>>>> +??? ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
>>>> ?????? if (ret)
>>>> ?????????? kfree(fb);
>>>> ?????? return ret;
>>>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
>>>> *dev,
>>>> ?????????????????? struct drm_file *file_priv,
>>>> ?????????????????? const struct drm_mode_fb_cmd2 *mode_cmd)
>>>> ?? {
>>>> -??? struct nouveau_framebuffer *fb;
>>>> +??? struct drm_framebuf...
2020 Feb 06
0
[PATCH 4/4] drm/nouveau: Remove struct nouveau_framebuffer
...->base,
> >>> &nouveau_framebuffer_funcs);
> >>> + ret = drm_framebuffer_init(dev, fb, &nouveau_framebuffer_funcs);
> >>> if (ret)
> >>> kfree(fb);
> >>> return ret;
> >>> @@ -250,7 +250,7 @@ nouveau_user_framebuffer_create(struct drm_device
> >>> *dev,
> >>> struct drm_file *file_priv,
> >>> const struct drm_mode_fb_cmd2 *mode_cmd)
> >>> {
> >>> - struct nouveau_framebuffer *fb;
> >>> + struct drm_frame...