Displaying 20 results from an estimated 41 matches for "valid_domain".
Did you mean:
  valid_domains
  
2010 Mar 18
0
[PATCH] drm/nouveau: Make use of TTM busy_placements.
.../nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -182,40 +182,35 @@ nouveau_gem_set_domain(struct drm_gem_object *gem, uint32_t read_domains,
 {
 	struct nouveau_bo *nvbo = gem->driver_private;
 	struct ttm_buffer_object *bo = &nvbo->bo;
-	uint64_t flags;
+	uint32_t domains = valid_domains &
+		(write_domains ? write_domains : read_domains);
+	uint32_t pref_flags = 0, valid_flags = 0;
 
-	if (!valid_domains || (!read_domains && !write_domains))
+	if (!domains)
 		return -EINVAL;
 
-	if (write_domains) {
-		if ((valid_domains & NOUVEAU_GEM_DOMAIN_VRAM) &&
-...
2015 Oct 16
37
[Bug 92504] New: [NVA5] Corruption in Plasma 5 on resume after changing screen configuration
https://bugs.freedesktop.org/show_bug.cgi?id=92504
            Bug ID: 92504
           Summary: [NVA5] Corruption in Plasma 5 on resume after changing
                    screen configuration
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
        
2013 Sep 04
4
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...+       struct nouveau_bo *nvbo;
>         int ret = -ENOMEM;
>
>         gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
>         if (!gem)
>                 return ERR_PTR(-ENOENT);
>
> +       nvbo = nouveau_gem_object(gem);
> +       if (!(nvbo->valid_domains & NOUVEAU_GEM_DOMAIN_VRAM)) {
> +               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;
> +...
2013 Sep 25
3
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...;
> >>
> >>         gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
> >>         if (!gem)
> >>                 return ERR_PTR(-ENOENT);
> >>
> >> +       nvbo = nouveau_gem_object(gem);
> >> +       if (!(nvbo->valid_domains & NOUVEAU_GEM_DOMAIN_VRAM)) {
> >> +               nv_warn(nouveau_drm(dev), "Trying to create a fb in vram with"
> >> +                       " valid_domains=%08x\n", nvbo->valid_domains);
> >> +               ret = -EINVAL;
> >> +...
2013 Aug 28
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...'ve attached the modified copy that applies to 3.10.9, hopefully I did the backport correctly.
> 
> With Linux 3.10.9 and the patch applied the kernel doesn't crash anymore, and I get this error in dmesg:
> 
> [   76.105643] nouveau W[     DRM] Trying to create a fb in vram with valid_domains=00000004
> 
> Does that help? 
>
Any comments? 
Maarten's patch works for me, I get that warning instead of a kernel crash,
but it's also a bigger change that doesn't apply to older kernels as-is. 
Ilia's original patch in this thread can be applied to older kernels as-...
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 23
2
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...it apply there.. 
I've attached the modified copy that applies to 3.10.9, hopefully I did the backport correctly.
With Linux 3.10.9 and the patch applied the kernel doesn't crash anymore, and I get this error in dmesg:
[   76.105643] nouveau W[     DRM] Trying to create a fb in vram with valid_domains=00000004
Does that help? 
-- Pasi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nouveau_test_fix_null_deref_v3.10.patch
Type: text/x-diff
Size: 1202 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20130823/b13e0...
2013 Aug 22
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...ice *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 (!gem)
 		return ERR_PTR(-ENOENT);
 
+	nvbo = nouveau_gem_object(gem);
+	if (!(nvbo->valid_domains & NOUVEAU_GEM_DOMAIN_VRAM)) {
+		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 (!no...
2017 Mar 29
2
[PATCH 2/6] drm/nouveau: Pin bos from imported dma-bufs to GTT.
...gpu/drm/nouveau/nouveau_prime.c
index 1fefc93af1d7..5f474ebb4d6d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_prime.c
+++ b/drivers/gpu/drm/nouveau/nouveau_prime.c
@@ -76,6 +76,8 @@ struct drm_gem_object *nouveau_gem_prime_import_sg_table(struct drm_device *dev,
 		return ERR_PTR(ret);
 
 	nvbo->valid_domains = NOUVEAU_GEM_DOMAIN_GART;
+	/* pin imported buffer to GTT */
+	nouveau_bo_pin(nvbo, TTM_PL_FLAG_TT, false);
 
 	/* Initialize the embedded gem-object. We return a single gem-reference
 	 * to the caller, instead of a normal nouveau_bo ttm reference. */
-- 
2.11.0
2013 Sep 25
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...>>         gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
>> >>         if (!gem)
>> >>                 return ERR_PTR(-ENOENT);
>> >>
>> >> +       nvbo = nouveau_gem_object(gem);
>> >> +       if (!(nvbo->valid_domains & NOUVEAU_GEM_DOMAIN_VRAM)) {
>> >> +               nv_warn(nouveau_drm(dev), "Trying to create a fb in vram with"
>> >> +                       " valid_domains=%08x\n", nvbo->valid_domains);
>> >> +               ret = -EINVAL;
>&g...
2013 Sep 04
0
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...>>         int ret = -ENOMEM;
>>
>>         gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
>>         if (!gem)
>>                 return ERR_PTR(-ENOENT);
>>
>> +       nvbo = nouveau_gem_object(gem);
>> +       if (!(nvbo->valid_domains & NOUVEAU_GEM_DOMAIN_VRAM)) {
>> +               nv_warn(nouveau_drm(dev), "Trying to create a fb in vram with"
>> +                       " valid_domains=%08x\n", nvbo->valid_domains);
>> +               ret = -EINVAL;
>> +               goto err...
2009 Aug 19
1
[PATCH] drm/nouveau: Add a MM for mappable VRAM that isn't usable as scanout.
...a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 1c06801..f3baadf 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -206,7 +206,8 @@ nouveau_gem_set_domain(struct drm_gem_object *gem, uint32_t read_domains,
 		if ((valid_domains & NOUVEAU_GEM_DOMAIN_VRAM) &&
 		    (read_domains & NOUVEAU_GEM_DOMAIN_VRAM) &&
 		    (bo->mem.mem_type == TTM_PL_VRAM ||
-		     bo->mem.mem_type == TTM_PL_PRIV0))
+		     bo->mem.mem_type == TTM_PL_PRIV0 ||
+		     bo->mem.mem_type == TTM_PL_PRIV1))
 			flag...
2018 Aug 30
3
[PATCH 0/2] drm/nouveau: Use more standard logging styles
Reduces object size ~4kb
Joe Perches (2):
  drm/nouveau: Add new logging function nv_cli_printk
  drm/nouveau: Convert NV_PRINTK macros and uses to new nv_cli_<level> macros
 drivers/gpu/drm/nouveau/nouveau_abi16.c |  2 +-
 drivers/gpu/drm/nouveau/nouveau_chan.c  | 12 +++----
 drivers/gpu/drm/nouveau/nouveau_drm.c   | 21 +++++++++++
 drivers/gpu/drm/nouveau/nouveau_drv.h   | 44
2013 Aug 28
2
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...ed the modified copy that applies to 3.10.9, hopefully I did the backport correctly.
>>
>> With Linux 3.10.9 and the patch applied the kernel doesn't crash anymore, and I get this error in dmesg:
>>
>> [   76.105643] nouveau W[     DRM] Trying to create a fb in vram with valid_domains=00000004
>>
>> Does that help? 
>>
> Any comments? 
>
> Maarten's patch works for me, I get that warning instead of a kernel crash,
> but it's also a bigger change that doesn't apply to older kernels as-is. 
>
> Ilia's original patch in this thre...
2013 Aug 28
1
[PATCH 4/6] drm/nouveau: introduce NOUVEAU_GEM_TILE_WCUS
...rm/nouveau/nouveau_bo.h
> index 653dbbb..2ecf8b7 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h
> @@ -9,6 +9,7 @@ struct nouveau_bo {
>         struct ttm_buffer_object bo;
>         struct ttm_placement placement;
>         u32 valid_domains;
> +       u32 valid_caching;
>         u32 placements[3];
>         u32 busy_placements[3];
>         struct ttm_bo_kmap_obj kmap;
> diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h
> index 2a5769f..4948eee2 100644
> --- a/include/uapi/drm/nouveau_...
2013 Sep 03
2
[PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap
...s to 3.10.9, hopefully I did the backport correctly.
>>>>
>>>> With Linux 3.10.9 and the patch applied the kernel doesn't crash anymore, and I get this error in dmesg:
>>>>
>>>> [   76.105643] nouveau W[     DRM] Trying to create a fb in vram with valid_domains=00000004
>>>>
>>>> Does that help? 
>>>>
>>> Any comments? 
>>>
>>> Maarten's patch works for me, I get that warning instead of a kernel crash,
>>> but it's also a bigger change that doesn't apply to older kernels...
2024 May 15
0
[PATCH] nouveau: set placement to original placement on uvmm validate.
...4
--- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
@@ -1803,6 +1803,7 @@ nouveau_uvmm_bo_validate(struct drm_gpuvm_bo *vm_bo, struct drm_exec *exec)
 {
 	struct nouveau_bo *nvbo = nouveau_gem_object(vm_bo->obj);
 
+	nouveau_bo_placement_set(nvbo, nvbo->valid_domains, 0);
 	return nouveau_bo_validate(nvbo, true, false);
 }
 
-- 
2.45.0
2013 Aug 28
0
[PATCH 4/6] drm/nouveau: introduce NOUVEAU_GEM_TILE_WCUS
.../drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h
index 653dbbb..2ecf8b7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.h
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.h
@@ -9,6 +9,7 @@ struct nouveau_bo {
 	struct ttm_buffer_object bo;
 	struct ttm_placement placement;
 	u32 valid_domains;
+	u32 valid_caching;
 	u32 placements[3];
 	u32 busy_placements[3];
 	struct ttm_bo_kmap_obj kmap;
diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h
index 2a5769f..4948eee2 100644
--- a/include/uapi/drm/nouveau_drm.h
+++ b/include/uapi/drm/nouveau_drm.h
@@ -36,6 +36,7 @...
2015 Mar 14
1
[PATCH ddx] Add support for VRAM-less devices to the ddx
With this patch the DDX almost works with GK20A, the missing piece is adding COHERENT mappings to the right places. ;-)
If you specify NOUVEAU_BO_APER the kernel will truncate valid_domains to the domains specified at creation time.
This means that as long as we only specify the correct domain in nouveau_allocate_surface the effect is still the same.
Signed-off-by: Maarten Lankhorst <dev at mblankhorst.nl>
---
The only thing still missing is adding NOUVEAU_BO_COHERENT to nouve...
2020 Aug 13
0
[PATCH 09/20] drm/nouveau: Introduce GEM object functions
...uveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c
index bae6a3eccee0..30f616aa251e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_prime.c
+++ b/drivers/gpu/drm/nouveau/nouveau_prime.c
@@ -79,6 +79,8 @@ struct drm_gem_object *nouveau_gem_prime_import_sg_table(struct drm_device *dev,
 
 	nvbo->valid_domains = NOUVEAU_GEM_DOMAIN_GART;
 
+	nvbo->bo.base.funcs = &nouveau_gem_object_funcs;
+
 	/* Initialize the embedded gem-object. We return a single gem-reference
 	 * to the caller, instead of a normal nouveau_bo ttm reference. */
 	ret = drm_gem_object_init(dev, &nvbo->bo.base, size);
--...