All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Revert "bus: remove cpu_coherent flag"
@ 2016-09-18 10:21 Karol Herbst
       [not found] ` <20160918102157.3921-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Karol Herbst @ 2016-09-18 10:21 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

This reverts commit 01bbcb69f80e1058395b737ae399c6f4ef48691b.

The commit caused fence timeouts within nvc0_screen_destroy and most likely
other places as well.

The most obvious effect is, that userspace processes take minutes to actually
quit.

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
---
 drm/nouveau/include/nvkm/core/device.h | 1 +
 drm/nouveau/nouveau_bo.c               | 3 ++-
 drm/nouveau/nvkm/engine/device/pci.c   | 1 +
 drm/nouveau/nvkm/engine/device/tegra.c | 1 +
 lib/include/nvif/os.h                  | 6 ++++++
 5 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drm/nouveau/include/nvkm/core/device.h b/drm/nouveau/include/nvkm/core/device.h
index 7ea8aa7..6bc712f 100644
--- a/drm/nouveau/include/nvkm/core/device.h
+++ b/drm/nouveau/include/nvkm/core/device.h
@@ -175,6 +175,7 @@ struct nvkm_device_func {
 	void (*fini)(struct nvkm_device *, bool suspend);
 	resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
 	resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
+	bool cpu_coherent;
 };
 
 struct nvkm_device_quirk {
diff --git a/drm/nouveau/nouveau_bo.c b/drm/nouveau/nouveau_bo.c
index 528bdef..6887d0a 100644
--- a/drm/nouveau/nouveau_bo.c
+++ b/drm/nouveau/nouveau_bo.c
@@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
 	nvbo->tile_flags = tile_flags;
 	nvbo->bo.bdev = &drm->ttm.bdev;
 
-	nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
+	if (!nvxx_device(&drm->device)->func->cpu_coherent)
+		nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
 
 	nvbo->page_shift = 12;
 	if (drm->client.vm) {
diff --git a/drm/nouveau/nvkm/engine/device/pci.c b/drm/nouveau/nvkm/engine/device/pci.c
index b1b6932..62ad030 100644
--- a/drm/nouveau/nvkm/engine/device/pci.c
+++ b/drm/nouveau/nvkm/engine/device/pci.c
@@ -1614,6 +1614,7 @@ nvkm_device_pci_func = {
 	.fini = nvkm_device_pci_fini,
 	.resource_addr = nvkm_device_pci_resource_addr,
 	.resource_size = nvkm_device_pci_resource_size,
+	.cpu_coherent = !IS_ENABLED(CONFIG_ARM),
 };
 
 int
diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c
index 939682f..9b638bd 100644
--- a/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drm/nouveau/nvkm/engine/device/tegra.c
@@ -245,6 +245,7 @@ nvkm_device_tegra_func = {
 	.fini = nvkm_device_tegra_fini,
 	.resource_addr = nvkm_device_tegra_resource_addr,
 	.resource_size = nvkm_device_tegra_resource_size,
+	.cpu_coherent = false,
 };
 
 int
diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h
index b45a186..2f34c5a 100644
--- a/lib/include/nvif/os.h
+++ b/lib/include/nvif/os.h
@@ -124,6 +124,12 @@ typedef dma_addr_t resource_size_t;
 #define __printf(a,b)
 #define __user
 
+#if defined(CONFIG_ARM)
+#define IS_ENABLED_CONFIG_ARM 1
+#else
+#define IS_ENABLED_CONFIG_ARM 0
+#endif
+
 #if defined(CONFIG_IOMMU_API)
 #define IS_ENABLED_CONFIG_IOMMU_API 1
 #else
-- 
2.10.0

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] nouveau: Fix compile error due to bad include
       [not found] ` <20160918102157.3921-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-09-18 10:21   ` Karol Herbst
       [not found]     ` <20160918102157.3921-2-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-09-19  3:39   ` [PATCH 1/2] Revert "bus: remove cpu_coherent flag" Alexandre Courbot
  1 sibling, 1 reply; 10+ messages in thread
From: Karol Herbst @ 2016-09-18 10:21 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Cought while working on travis-ci integration

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
---
 drm/nouveau/uapi/drm/nouveau_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drm/nouveau/uapi/drm/nouveau_drm.h b/drm/nouveau/uapi/drm/nouveau_drm.h
index 259588a..0bfaae8 100644
--- a/drm/nouveau/uapi/drm/nouveau_drm.h
+++ b/drm/nouveau/uapi/drm/nouveau_drm.h
@@ -27,7 +27,7 @@
 
 #define DRM_NOUVEAU_EVENT_NVIF                                       0x80000000
 
-#include "drm.h"
+#include "drm/drm.h"
 
 #if defined(__cplusplus)
 extern "C" {
-- 
2.10.0

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] nouveau: Fix compile error due to bad include
       [not found]     ` <20160918102157.3921-2-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-09-18 14:18       ` Ilia Mirkin
       [not found]         ` <CAKb7Uvg=no4KWS8rLDbNJMk9a6tT_Bt+2oXoy5gzAWYjR5OOCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2016-09-19 10:16       ` Emil Velikov
  1 sibling, 1 reply; 10+ messages in thread
From: Ilia Mirkin @ 2016-09-18 14:18 UTC (permalink / raw)
  To: Karol Herbst; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Every other *_drm.h does #include "drm.h". Something else is wrong.

On Sun, Sep 18, 2016 at 6:21 AM, Karol Herbst <karolherbst@gmail.com> wrote:
> Cought while working on travis-ci integration
>
> Signed-off-by: Karol Herbst <karolherbst@gmail.com>
> ---
>  drm/nouveau/uapi/drm/nouveau_drm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drm/nouveau/uapi/drm/nouveau_drm.h b/drm/nouveau/uapi/drm/nouveau_drm.h
> index 259588a..0bfaae8 100644
> --- a/drm/nouveau/uapi/drm/nouveau_drm.h
> +++ b/drm/nouveau/uapi/drm/nouveau_drm.h
> @@ -27,7 +27,7 @@
>
>  #define DRM_NOUVEAU_EVENT_NVIF                                       0x80000000
>
> -#include "drm.h"
> +#include "drm/drm.h"
>
>  #if defined(__cplusplus)
>  extern "C" {
> --
> 2.10.0
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] nouveau: Fix compile error due to bad include
       [not found]         ` <CAKb7Uvg=no4KWS8rLDbNJMk9a6tT_Bt+2oXoy5gzAWYjR5OOCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-18 15:32           ` Karol Herbst
       [not found]             ` <CAEXux-anwQoo+vMd+BRp--KAUhz9AJGxu+61ePikMCgB+kW17w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Karol Herbst @ 2016-09-18 15:32 UTC (permalink / raw)
  To: Ilia Mirkin; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

odd, let me check again

2016-09-18 16:18 GMT+02:00 Ilia Mirkin <imirkin@alum.mit.edu>:
> Every other *_drm.h does #include "drm.h". Something else is wrong.
>
> On Sun, Sep 18, 2016 at 6:21 AM, Karol Herbst <karolherbst@gmail.com> wrote:
>> Cought while working on travis-ci integration
>>
>> Signed-off-by: Karol Herbst <karolherbst@gmail.com>
>> ---
>>  drm/nouveau/uapi/drm/nouveau_drm.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drm/nouveau/uapi/drm/nouveau_drm.h b/drm/nouveau/uapi/drm/nouveau_drm.h
>> index 259588a..0bfaae8 100644
>> --- a/drm/nouveau/uapi/drm/nouveau_drm.h
>> +++ b/drm/nouveau/uapi/drm/nouveau_drm.h
>> @@ -27,7 +27,7 @@
>>
>>  #define DRM_NOUVEAU_EVENT_NVIF                                       0x80000000
>>
>> -#include "drm.h"
>> +#include "drm/drm.h"
>>
>>  #if defined(__cplusplus)
>>  extern "C" {
>> --
>> 2.10.0
>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] nouveau: Fix compile error due to bad include
       [not found]             ` <CAEXux-anwQoo+vMd+BRp--KAUhz9AJGxu+61ePikMCgB+kW17w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-19  3:38               ` Alexandre Courbot
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Courbot @ 2016-09-19  3:38 UTC (permalink / raw)
  To: Karol Herbst; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

FWIW I also have to carry a local patch doing this, otherwise I cannot
perform an out-of-tree module build.

On Mon, Sep 19, 2016 at 12:32 AM, Karol Herbst <karolherbst@gmail.com> wrote:
> odd, let me check again
>
> 2016-09-18 16:18 GMT+02:00 Ilia Mirkin <imirkin@alum.mit.edu>:
>> Every other *_drm.h does #include "drm.h". Something else is wrong.
>>
>> On Sun, Sep 18, 2016 at 6:21 AM, Karol Herbst <karolherbst@gmail.com> wrote:
>>> Cought while working on travis-ci integration
>>>
>>> Signed-off-by: Karol Herbst <karolherbst@gmail.com>
>>> ---
>>>  drm/nouveau/uapi/drm/nouveau_drm.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drm/nouveau/uapi/drm/nouveau_drm.h b/drm/nouveau/uapi/drm/nouveau_drm.h
>>> index 259588a..0bfaae8 100644
>>> --- a/drm/nouveau/uapi/drm/nouveau_drm.h
>>> +++ b/drm/nouveau/uapi/drm/nouveau_drm.h
>>> @@ -27,7 +27,7 @@
>>>
>>>  #define DRM_NOUVEAU_EVENT_NVIF                                       0x80000000
>>>
>>> -#include "drm.h"
>>> +#include "drm/drm.h"
>>>
>>>  #if defined(__cplusplus)
>>>  extern "C" {
>>> --
>>> 2.10.0
>>>
>>> _______________________________________________
>>> Nouveau mailing list
>>> Nouveau@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/nouveau
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] Revert "bus: remove cpu_coherent flag"
       [not found] ` <20160918102157.3921-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-09-18 10:21   ` [PATCH 2/2] nouveau: Fix compile error due to bad include Karol Herbst
@ 2016-09-19  3:39   ` Alexandre Courbot
       [not found]     ` <CAAVeFuL2mGPzfe1PJJmhOc7wv+XVDXomAUz4n8Fj8RHov-fBMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: Alexandre Courbot @ 2016-09-19  3:39 UTC (permalink / raw)
  To: Karol Herbst; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sun, Sep 18, 2016 at 7:21 PM, Karol Herbst <karolherbst@gmail.com> wrote:
> This reverts commit 01bbcb69f80e1058395b737ae399c6f4ef48691b.
>
> The commit caused fence timeouts within nvc0_screen_destroy and most likely
> other places as well.
>
> The most obvious effect is, that userspace processes take minutes to actually
> quit.

Acked-by: Alexandre Courbot <acourbot@nvidia.com>

>
> Signed-off-by: Karol Herbst <karolherbst@gmail.com>
> ---
>  drm/nouveau/include/nvkm/core/device.h | 1 +
>  drm/nouveau/nouveau_bo.c               | 3 ++-
>  drm/nouveau/nvkm/engine/device/pci.c   | 1 +
>  drm/nouveau/nvkm/engine/device/tegra.c | 1 +
>  lib/include/nvif/os.h                  | 6 ++++++
>  5 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drm/nouveau/include/nvkm/core/device.h b/drm/nouveau/include/nvkm/core/device.h
> index 7ea8aa7..6bc712f 100644
> --- a/drm/nouveau/include/nvkm/core/device.h
> +++ b/drm/nouveau/include/nvkm/core/device.h
> @@ -175,6 +175,7 @@ struct nvkm_device_func {
>         void (*fini)(struct nvkm_device *, bool suspend);
>         resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
>         resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
> +       bool cpu_coherent;
>  };
>
>  struct nvkm_device_quirk {
> diff --git a/drm/nouveau/nouveau_bo.c b/drm/nouveau/nouveau_bo.c
> index 528bdef..6887d0a 100644
> --- a/drm/nouveau/nouveau_bo.c
> +++ b/drm/nouveau/nouveau_bo.c
> @@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
>         nvbo->tile_flags = tile_flags;
>         nvbo->bo.bdev = &drm->ttm.bdev;
>
> -       nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
> +       if (!nvxx_device(&drm->device)->func->cpu_coherent)
> +               nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
>
>         nvbo->page_shift = 12;
>         if (drm->client.vm) {
> diff --git a/drm/nouveau/nvkm/engine/device/pci.c b/drm/nouveau/nvkm/engine/device/pci.c
> index b1b6932..62ad030 100644
> --- a/drm/nouveau/nvkm/engine/device/pci.c
> +++ b/drm/nouveau/nvkm/engine/device/pci.c
> @@ -1614,6 +1614,7 @@ nvkm_device_pci_func = {
>         .fini = nvkm_device_pci_fini,
>         .resource_addr = nvkm_device_pci_resource_addr,
>         .resource_size = nvkm_device_pci_resource_size,
> +       .cpu_coherent = !IS_ENABLED(CONFIG_ARM),
>  };
>
>  int
> diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c
> index 939682f..9b638bd 100644
> --- a/drm/nouveau/nvkm/engine/device/tegra.c
> +++ b/drm/nouveau/nvkm/engine/device/tegra.c
> @@ -245,6 +245,7 @@ nvkm_device_tegra_func = {
>         .fini = nvkm_device_tegra_fini,
>         .resource_addr = nvkm_device_tegra_resource_addr,
>         .resource_size = nvkm_device_tegra_resource_size,
> +       .cpu_coherent = false,
>  };
>
>  int
> diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h
> index b45a186..2f34c5a 100644
> --- a/lib/include/nvif/os.h
> +++ b/lib/include/nvif/os.h
> @@ -124,6 +124,12 @@ typedef dma_addr_t resource_size_t;
>  #define __printf(a,b)
>  #define __user
>
> +#if defined(CONFIG_ARM)
> +#define IS_ENABLED_CONFIG_ARM 1
> +#else
> +#define IS_ENABLED_CONFIG_ARM 0
> +#endif
> +
>  #if defined(CONFIG_IOMMU_API)
>  #define IS_ENABLED_CONFIG_IOMMU_API 1
>  #else
> --
> 2.10.0
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] Revert "bus: remove cpu_coherent flag"
       [not found]     ` <CAAVeFuL2mGPzfe1PJJmhOc7wv+XVDXomAUz4n8Fj8RHov-fBMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-19  3:43       ` Ilia Mirkin
       [not found]         ` <CAKb7UvhEZtnj-wyKzUtg1ASSJj0Ce9p9y+bC_+05ikbo8fcdiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Ilia Mirkin @ 2016-09-19  3:43 UTC (permalink / raw)
  To: Alexandre Courbot; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sun, Sep 18, 2016 at 11:39 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
> On Sun, Sep 18, 2016 at 7:21 PM, Karol Herbst <karolherbst@gmail.com> wrote:
>> This reverts commit 01bbcb69f80e1058395b737ae399c6f4ef48691b.

I think you meant aff51175cdbf345740ec9203eff88e772af88059 - that's
the commit id that matters, not the one in Ben's non-linux repo.

>>
>> The commit caused fence timeouts within nvc0_screen_destroy and most likely
>> other places as well.
>>
>> The most obvious effect is, that userspace processes take minutes to actually
>> quit.
>
> Acked-by: Alexandre Courbot <acourbot@nvidia.com>

If this doesn't make it into v4.8 (which is due to be released in a
week), it should get tagged for stable as well.

By the way, Alexandre, I believe Martin was reporting issues like this
on his TK1 before this change as well. Probably worth investigating -
sounds like there's a wider issue with TTM_PL_FLAG_UNCACHED and/or
force_coherent.

>
>>
>> Signed-off-by: Karol Herbst <karolherbst@gmail.com>
>> ---
>>  drm/nouveau/include/nvkm/core/device.h | 1 +
>>  drm/nouveau/nouveau_bo.c               | 3 ++-
>>  drm/nouveau/nvkm/engine/device/pci.c   | 1 +
>>  drm/nouveau/nvkm/engine/device/tegra.c | 1 +
>>  lib/include/nvif/os.h                  | 6 ++++++
>>  5 files changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/drm/nouveau/include/nvkm/core/device.h b/drm/nouveau/include/nvkm/core/device.h
>> index 7ea8aa7..6bc712f 100644
>> --- a/drm/nouveau/include/nvkm/core/device.h
>> +++ b/drm/nouveau/include/nvkm/core/device.h
>> @@ -175,6 +175,7 @@ struct nvkm_device_func {
>>         void (*fini)(struct nvkm_device *, bool suspend);
>>         resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
>>         resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
>> +       bool cpu_coherent;
>>  };
>>
>>  struct nvkm_device_quirk {
>> diff --git a/drm/nouveau/nouveau_bo.c b/drm/nouveau/nouveau_bo.c
>> index 528bdef..6887d0a 100644
>> --- a/drm/nouveau/nouveau_bo.c
>> +++ b/drm/nouveau/nouveau_bo.c
>> @@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
>>         nvbo->tile_flags = tile_flags;
>>         nvbo->bo.bdev = &drm->ttm.bdev;
>>
>> -       nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
>> +       if (!nvxx_device(&drm->device)->func->cpu_coherent)
>> +               nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
>>
>>         nvbo->page_shift = 12;
>>         if (drm->client.vm) {
>> diff --git a/drm/nouveau/nvkm/engine/device/pci.c b/drm/nouveau/nvkm/engine/device/pci.c
>> index b1b6932..62ad030 100644
>> --- a/drm/nouveau/nvkm/engine/device/pci.c
>> +++ b/drm/nouveau/nvkm/engine/device/pci.c
>> @@ -1614,6 +1614,7 @@ nvkm_device_pci_func = {
>>         .fini = nvkm_device_pci_fini,
>>         .resource_addr = nvkm_device_pci_resource_addr,
>>         .resource_size = nvkm_device_pci_resource_size,
>> +       .cpu_coherent = !IS_ENABLED(CONFIG_ARM),
>>  };
>>
>>  int
>> diff --git a/drm/nouveau/nvkm/engine/device/tegra.c b/drm/nouveau/nvkm/engine/device/tegra.c
>> index 939682f..9b638bd 100644
>> --- a/drm/nouveau/nvkm/engine/device/tegra.c
>> +++ b/drm/nouveau/nvkm/engine/device/tegra.c
>> @@ -245,6 +245,7 @@ nvkm_device_tegra_func = {
>>         .fini = nvkm_device_tegra_fini,
>>         .resource_addr = nvkm_device_tegra_resource_addr,
>>         .resource_size = nvkm_device_tegra_resource_size,
>> +       .cpu_coherent = false,
>>  };
>>
>>  int
>> diff --git a/lib/include/nvif/os.h b/lib/include/nvif/os.h
>> index b45a186..2f34c5a 100644
>> --- a/lib/include/nvif/os.h
>> +++ b/lib/include/nvif/os.h
>> @@ -124,6 +124,12 @@ typedef dma_addr_t resource_size_t;
>>  #define __printf(a,b)
>>  #define __user
>>
>> +#if defined(CONFIG_ARM)
>> +#define IS_ENABLED_CONFIG_ARM 1
>> +#else
>> +#define IS_ENABLED_CONFIG_ARM 0
>> +#endif
>> +
>>  #if defined(CONFIG_IOMMU_API)
>>  #define IS_ENABLED_CONFIG_IOMMU_API 1
>>  #else
>> --
>> 2.10.0
>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/nouveau
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] Revert "bus: remove cpu_coherent flag"
       [not found]         ` <CAKb7UvhEZtnj-wyKzUtg1ASSJj0Ce9p9y+bC_+05ikbo8fcdiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-19  3:50           ` Alexandre Courbot
       [not found]             ` <CAAVeFuL3V3MZNcDSUPvsnjLPABGvccF0GzZ-xL4C8DaKX_-eJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Alexandre Courbot @ 2016-09-19  3:50 UTC (permalink / raw)
  To: Ilia Mirkin, Martin Peres; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Mon, Sep 19, 2016 at 12:43 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> On Sun, Sep 18, 2016 at 11:39 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
>> On Sun, Sep 18, 2016 at 7:21 PM, Karol Herbst <karolherbst@gmail.com> wrote:
>>> This reverts commit 01bbcb69f80e1058395b737ae399c6f4ef48691b.
>
> I think you meant aff51175cdbf345740ec9203eff88e772af88059 - that's
> the commit id that matters, not the one in Ben's non-linux repo.
>
>>>
>>> The commit caused fence timeouts within nvc0_screen_destroy and most likely
>>> other places as well.
>>>
>>> The most obvious effect is, that userspace processes take minutes to actually
>>> quit.
>>
>> Acked-by: Alexandre Courbot <acourbot@nvidia.com>
>
> If this doesn't make it into v4.8 (which is due to be released in a
> week), it should get tagged for stable as well.
>
> By the way, Alexandre, I believe Martin was reporting issues like this
> on his TK1 before this change as well. Probably worth investigating -
> sounds like there's a wider issue with TTM_PL_FLAG_UNCACHED and/or
> force_coherent.

Yes, it may be indeed related. I need to sync with Martin to
understand his exact repro case.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] Revert "bus: remove cpu_coherent flag"
       [not found]             ` <CAAVeFuL3V3MZNcDSUPvsnjLPABGvccF0GzZ-xL4C8DaKX_-eJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-19  6:57               ` Martin Peres
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Peres @ 2016-09-19  6:57 UTC (permalink / raw)
  To: Alexandre Courbot, Ilia Mirkin; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 19/09/16 06:50, Alexandre Courbot wrote:
> On Mon, Sep 19, 2016 at 12:43 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>> On Sun, Sep 18, 2016 at 11:39 PM, Alexandre Courbot <gnurou@gmail.com> wrote:
>>> On Sun, Sep 18, 2016 at 7:21 PM, Karol Herbst <karolherbst@gmail.com> wrote:
>>>> This reverts commit 01bbcb69f80e1058395b737ae399c6f4ef48691b.
>> I think you meant aff51175cdbf345740ec9203eff88e772af88059 - that's
>> the commit id that matters, not the one in Ben's non-linux repo.
>>
>>>> The commit caused fence timeouts within nvc0_screen_destroy and most likely
>>>> other places as well.
>>>>
>>>> The most obvious effect is, that userspace processes take minutes to actually
>>>> quit.
>>> Acked-by: Alexandre Courbot <acourbot@nvidia.com>
>> If this doesn't make it into v4.8 (which is due to be released in a
>> week), it should get tagged for stable as well.
>>
>> By the way, Alexandre, I believe Martin was reporting issues like this
>> on his TK1 before this change as well. Probably worth investigating -
>> sounds like there's a wider issue with TTM_PL_FLAG_UNCACHED and/or
>> force_coherent.
> Yes, it may be indeed related. I need to sync with Martin to
> understand his exact repro case.

Running piglit on the tk1 is enough for me, but I will try to update the 
kernel again to see if it helps.

The issue is that mesa is waiting on a fence that never gets synced on 
in the gbm destructor. The probably of having the timeout is about 
50/50, so it is easy-enough to reproduce in my case :s

Martin

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] nouveau: Fix compile error due to bad include
       [not found]     ` <20160918102157.3921-2-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-09-18 14:18       ` Ilia Mirkin
@ 2016-09-19 10:16       ` Emil Velikov
  1 sibling, 0 replies; 10+ messages in thread
From: Emil Velikov @ 2016-09-19 10:16 UTC (permalink / raw)
  To: Karol Herbst; +Cc: ML nouveau

On 18 September 2016 at 11:21, Karol Herbst <karolherbst@gmail.com> wrote:
> Cought while working on travis-ci integration
>
> Signed-off-by: Karol Herbst <karolherbst@gmail.com>
> ---
>  drm/nouveau/uapi/drm/nouveau_drm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drm/nouveau/uapi/drm/nouveau_drm.h b/drm/nouveau/uapi/drm/nouveau_drm.h
> index 259588a..0bfaae8 100644
> --- a/drm/nouveau/uapi/drm/nouveau_drm.h
> +++ b/drm/nouveau/uapi/drm/nouveau_drm.h
> @@ -27,7 +27,7 @@
>
>  #define DRM_NOUVEAU_EVENT_NVIF                                       0x80000000
>
> -#include "drm.h"
> +#include "drm/drm.h"
>
Afaict this is a side effect of an "incomplete sync" with the kernel
code. In there we have the respective header alongside the
nouveau_drm.h one.

One workaround is to track drm.h in the nouveau repo, with another to
adjust KBUILD_OPTS to honour the upstream one.

KBUILD_OPTS += KCPPFLAGS="-I$(LINUXDIR)/include/uapi/drm"

The above (untested) sounds like the better solution imho.

Regards,
Emil
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-19 10:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-18 10:21 [PATCH 1/2] Revert "bus: remove cpu_coherent flag" Karol Herbst
     [not found] ` <20160918102157.3921-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-18 10:21   ` [PATCH 2/2] nouveau: Fix compile error due to bad include Karol Herbst
     [not found]     ` <20160918102157.3921-2-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-18 14:18       ` Ilia Mirkin
     [not found]         ` <CAKb7Uvg=no4KWS8rLDbNJMk9a6tT_Bt+2oXoy5gzAWYjR5OOCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-18 15:32           ` Karol Herbst
     [not found]             ` <CAEXux-anwQoo+vMd+BRp--KAUhz9AJGxu+61ePikMCgB+kW17w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-19  3:38               ` Alexandre Courbot
2016-09-19 10:16       ` Emil Velikov
2016-09-19  3:39   ` [PATCH 1/2] Revert "bus: remove cpu_coherent flag" Alexandre Courbot
     [not found]     ` <CAAVeFuL2mGPzfe1PJJmhOc7wv+XVDXomAUz4n8Fj8RHov-fBMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-19  3:43       ` Ilia Mirkin
     [not found]         ` <CAKb7UvhEZtnj-wyKzUtg1ASSJj0Ce9p9y+bC_+05ikbo8fcdiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-19  3:50           ` Alexandre Courbot
     [not found]             ` <CAAVeFuL3V3MZNcDSUPvsnjLPABGvccF0GzZ-xL4C8DaKX_-eJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-19  6:57               ` Martin Peres

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.