Displaying 13 results from an estimated 13 matches for "nouveau_framebuffer_init".
2013 Aug 22
6
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
The code expects non-VRAM mem nodes to have a pages list. If that's not
set, it will do a null deref down the line. Warn on that condition and
return an error.
See https://bugs.freedesktop.org/show_bug.cgi?id=64774
Reported-by: Pasi K?rkk?inen <pasik at iki.fi>
Tested-by: Pasi K?rkk?inen <pasik at iki.fi>
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: <stable
2013 Aug 22
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...nv_warn(nouveau_drm(dev), "Trying to create a fb in vram with"
+ " valid_domains=%08x\n", nvbo->valid_domains);
+ ret = -EINVAL;
+ goto err_unref;
+ }
+
nouveau_fb = kzalloc(sizeof(struct nouveau_framebuffer), GFP_KERNEL);
if (!nouveau_fb)
goto err_unref;
- ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nouveau_gem_object(gem));
+ ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nvbo);
if (ret)
goto err;
2013 Aug 28
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...object_unreference(gem);
> + return ERR_PTR(ret);
> + }
> +
> nouveau_fb = kzalloc(sizeof(struct nouveau_framebuffer), GFP_KERNEL);
> - if (!nouveau_fb)
> + if (!nouveau_fb) {
> + drm_gem_object_unreference(gem);
> return ERR_PTR(-ENOMEM);
> + }
>
> - ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nouveau_gem_object(gem));
> + ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nvbo);
> if (ret) {
> + kfree(nouveau_fb);
> drm_gem_object_unreference(gem);
> return ERR_PTR(ret);
> }
> ____________________________________________...
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...state.crtc->x *
+ state.bpp / 8);
}
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 24273ba..0420ee8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -28,7 +28,8 @@ int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
struct nouveau_page_flip_state {
struct list_head head;
struct drm_pending_vblank_event *event;
- int crtc, bpp, pitch, x, y;
+ struct drm_crtc *crtc;
+ int bpp, pitch;
u64 offset;
};
--
2.5.5
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...state.crtc->x *
+ state.bpp / 8);
}
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 24273ba..0420ee8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -28,7 +28,8 @@ int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
struct nouveau_page_flip_state {
struct list_head head;
struct drm_pending_vblank_event *event;
- int crtc, bpp, pitch, x, y;
+ struct drm_crtc *crtc;
+ int bpp, pitch;
u64 offset;
};
--
2.5.5
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...state.crtc->x *
+ state.bpp / 8);
}
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 24273ba..0420ee8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -28,7 +28,8 @@ int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
struct nouveau_page_flip_state {
struct list_head head;
struct drm_pending_vblank_event *event;
- int crtc, bpp, pitch, x, y;
+ struct drm_crtc *crtc;
+ int bpp, pitch;
u64 offset;
};
--
2.5.5
2013 Aug 23
2
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
On Thu, Aug 22, 2013 at 09:12:40AM +0200, Maarten Lankhorst wrote:
> Op 22-08-13 02:10, Ilia Mirkin schreef:
> > The code expects non-VRAM mem nodes to have a pages list. If that's not
> > set, it will do a null deref down the line. Warn on that condition and
> > return an error.
> >
> > See https://bugs.freedesktop.org/show_bug.cgi?id=64774
> >
> >
2013 Aug 07
0
[PATCH] drm/nouveau: require contiguous bo for framebuffer
...khorst <maarten.lankhorst at canonical.com>
---
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 73cf240..ddb065c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -107,6 +107,11 @@ nouveau_framebuffer_init(struct drm_device *dev,
return -EINVAL;
}
+ if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) {
+ NV_ERROR(drm, "framebuffer requires contiguous bo\n");
+ return -EINVAL;
+ }
+
if (nv_device(drm->device)->chipset == 0x50)
nv_fb->r_format |= (tile_fl...
2013 Jul 02
0
[PATCH] drm/nouveau: handle framebuffer pinning correctly
...veau_display.c
@@ -142,17 +142,22 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
if (!gem)
return ERR_PTR(-ENOENT);
+ ret = -ENOMEM;
nouveau_fb = kzalloc(sizeof(struct nouveau_framebuffer), GFP_KERNEL);
if (!nouveau_fb)
- return ERR_PTR(-ENOMEM);
+ goto err_unref;
ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nouveau_gem_object(gem));
- if (ret) {
- drm_gem_object_unreference(gem);
- return ERR_PTR(ret);
- }
+ if (ret)
+ goto err;
return &nouveau_fb->base;
+
+err:
+ kfree(nouveau_fb);
+err_unref:
+ drm_gem_object_unreference(gem);
+ return ERR_PTR(ret);
}
sta...
2016 Jun 07
0
[PATCH 01/10] drm/nouveau: replace legacy vblank helpers
...state.crtc->x *
+ state.bpp / 8);
}
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 24273ba..0420ee8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -28,7 +28,8 @@ int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
struct nouveau_page_flip_state {
struct list_head head;
struct drm_pending_vblank_event *event;
- int crtc, bpp, pitch, x, y;
+ struct drm_crtc *crtc;
+ int bpp, pitch;
u64 offset;
};
--
2.5.5
2016 Jun 06
0
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
...;
> }
> }
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
> index 24273ba..0420ee8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.h
> @@ -28,7 +28,8 @@ int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
> struct nouveau_page_flip_state {
> struct list_head head;
> struct drm_pending_vblank_event *event;
> - int crtc, bpp, pitch, x, y;
> + struct drm_crtc *crtc;
> + int bpp, pitch;
> u64 offset;
> };
>
> --...
2013 Sep 04
4
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...efensive" part) is to bail in nouveau_bo_move() on attempts to move
a DMA-BUF backed object into VRAM.
Sound OK?
Ben.
> nouveau_fb = kzalloc(sizeof(struct nouveau_framebuffer), GFP_KERNEL);
> if (!nouveau_fb)
> goto err_unref;
>
> - ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nouveau_gem_object(gem));
> + ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nvbo);
> if (ret)
> goto err;
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists....
2012 Dec 12
43
[PATCH 00/37] [RFC] revamped modeset locking
Hi all,
First thing first: It works, I now no longer have a few dropped frames every 10s
on my testbox here with the pageflip i-g-t tests.
Random notes:
- New design has per-crtc locks to protect the crtc input-side (pageflip,
cursor) for r/w and the output state of the crtc (mode, dpms) as read-only. It
also required completely revamped fb lifecycle management, those are now
refcounted