* [PATCH 1/2] drm/i915/dmabuf: fix broken build
@ 2021-10-21 12:53 Matthew Auld
2021-10-21 12:53 ` [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete Matthew Auld
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Matthew Auld @ 2021-10-21 12:53 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, kernel test robot, Thomas Hellström
wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
include asm/smp.h here.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index 1adcd8e02d29..a45d0ec2c5b6 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -12,6 +12,13 @@
#include "i915_gem_object.h"
#include "i915_scatterlist.h"
+#if defined(CONFIG_X86)
+#include <asm/smp.h>
+#else
+#define wbinvd_on_all_cpus() \
+ pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
+#endif
+
I915_SELFTEST_DECLARE(static bool force_different_devices;)
static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
--
2.26.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete
2021-10-21 12:53 [PATCH 1/2] drm/i915/dmabuf: fix broken build Matthew Auld
@ 2021-10-21 12:53 ` Matthew Auld
2021-10-22 9:26 ` Thomas Hellström
2021-10-28 15:31 ` [Intel-gfx] " Daniel Vetter
2021-10-21 15:18 ` [PATCH 1/2] drm/i915/dmabuf: fix broken build Dixit, Ashutosh
2021-10-27 7:57 ` Matthew Auld
2 siblings, 2 replies; 18+ messages in thread
From: Matthew Auld @ 2021-10-21 12:53 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Thomas Hellström
We were overzealous here; even though discrete is non-LLC, it should
still be always coherent.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index a45d0ec2c5b6..848e81368043 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -251,7 +251,8 @@ static int i915_gem_object_get_pages_dmabuf(struct drm_i915_gem_object *obj)
return PTR_ERR(pages);
/* XXX: consider doing a vmap flush or something */
- if (!HAS_LLC(i915) || i915_gem_object_can_bypass_llc(obj))
+ if ((!HAS_LLC(i915) && !IS_DGFX(i915)) ||
+ i915_gem_object_can_bypass_llc(obj))
wbinvd_on_all_cpus();
sg_page_sizes = i915_sg_dma_sizes(pages->sgl);
--
2.26.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-21 12:53 [PATCH 1/2] drm/i915/dmabuf: fix broken build Matthew Auld
2021-10-21 12:53 ` [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete Matthew Auld
@ 2021-10-21 15:18 ` Dixit, Ashutosh
2021-10-27 7:57 ` Matthew Auld
2 siblings, 0 replies; 18+ messages in thread
From: Dixit, Ashutosh @ 2021-10-21 15:18 UTC (permalink / raw)
To: Matthew Auld
Cc: intel-gfx, dri-devel, kernel test robot, Thomas Hellström
On Thu, 21 Oct 2021 05:53:31 -0700, Matthew Auld wrote:
>
> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
> include asm/smp.h here.
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> index 1adcd8e02d29..a45d0ec2c5b6 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> @@ -12,6 +12,13 @@
> #include "i915_gem_object.h"
> #include "i915_scatterlist.h"
>
> +#if defined(CONFIG_X86)
> +#include <asm/smp.h>
> +#else
> +#define wbinvd_on_all_cpus() \
> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
> +#endif
> +
> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>
> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
> --
> 2.26.3
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete
2021-10-21 12:53 ` [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete Matthew Auld
@ 2021-10-22 9:26 ` Thomas Hellström
2021-10-22 9:47 ` Matthew Auld
2021-10-28 15:31 ` [Intel-gfx] " Daniel Vetter
1 sibling, 1 reply; 18+ messages in thread
From: Thomas Hellström @ 2021-10-22 9:26 UTC (permalink / raw)
To: Matthew Auld, intel-gfx; +Cc: dri-devel
Hi, Matt
On 10/21/21 14:53, Matthew Auld wrote:
> We were overzealous here; even though discrete is non-LLC, it should
> still be always coherent.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> index a45d0ec2c5b6..848e81368043 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> @@ -251,7 +251,8 @@ static int i915_gem_object_get_pages_dmabuf(struct drm_i915_gem_object *obj)
> return PTR_ERR(pages);
>
> /* XXX: consider doing a vmap flush or something */
> - if (!HAS_LLC(i915) || i915_gem_object_can_bypass_llc(obj))
> + if ((!HAS_LLC(i915) && !IS_DGFX(i915)) ||
Q: I notice that DG1 at least has HAS_SNOOP. Would it be incorrect to
use that in this case?
/Thomas
> + i915_gem_object_can_bypass_llc(obj))
> wbinvd_on_all_cpus();
>
> sg_page_sizes = i915_sg_dma_sizes(pages->sgl);
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete
2021-10-22 9:26 ` Thomas Hellström
@ 2021-10-22 9:47 ` Matthew Auld
0 siblings, 0 replies; 18+ messages in thread
From: Matthew Auld @ 2021-10-22 9:47 UTC (permalink / raw)
To: Thomas Hellström, intel-gfx; +Cc: dri-devel
On 22/10/2021 10:26, Thomas Hellström wrote:
> Hi, Matt
>
> On 10/21/21 14:53, Matthew Auld wrote:
>> We were overzealous here; even though discrete is non-LLC, it should
>> still be always coherent.
>>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> index a45d0ec2c5b6..848e81368043 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> @@ -251,7 +251,8 @@ static int i915_gem_object_get_pages_dmabuf(struct
>> drm_i915_gem_object *obj)
>> return PTR_ERR(pages);
>> /* XXX: consider doing a vmap flush or something */
>> - if (!HAS_LLC(i915) || i915_gem_object_can_bypass_llc(obj))
>> + if ((!HAS_LLC(i915) && !IS_DGFX(i915)) ||
>
> Q: I notice that DG1 at least has HAS_SNOOP. Would it be incorrect to
> use that in this case?
AFAIK DG1 is special in that CACHE_NONE will still snoop transactions,
which is not the case for other HAS_SNOOP platforms. AFAIK that is part
of the reason why we also just force CACHE_LLC everywhere on DG1.
Could maybe do s/IS_DGFX/IS_DG1/ here? In case that changes on other
discrete platforms. And then add a comment.
>
> /Thomas
>
>
>
>> + i915_gem_object_can_bypass_llc(obj))
>> wbinvd_on_all_cpus();
>> sg_page_sizes = i915_sg_dma_sizes(pages->sgl);
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-21 12:53 [PATCH 1/2] drm/i915/dmabuf: fix broken build Matthew Auld
2021-10-21 12:53 ` [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete Matthew Auld
2021-10-21 15:18 ` [PATCH 1/2] drm/i915/dmabuf: fix broken build Dixit, Ashutosh
@ 2021-10-27 7:57 ` Matthew Auld
2021-10-27 8:58 ` Jani Nikula
2021-10-27 14:54 ` Lucas De Marchi
2 siblings, 2 replies; 18+ messages in thread
From: Matthew Auld @ 2021-10-27 7:57 UTC (permalink / raw)
To: Matthew Auld, Jani Nikula
Cc: Intel Graphics Development, ML dri-devel, kernel test robot,
Thomas Hellström
On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
>
> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
> include asm/smp.h here.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Jani, would it make sense to cherry-pick this to -fixes? The offending
commit is in drm-next, and there have been a few reports around this.
Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
> ---
> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> index 1adcd8e02d29..a45d0ec2c5b6 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> @@ -12,6 +12,13 @@
> #include "i915_gem_object.h"
> #include "i915_scatterlist.h"
>
> +#if defined(CONFIG_X86)
> +#include <asm/smp.h>
> +#else
> +#define wbinvd_on_all_cpus() \
> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
> +#endif
> +
> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>
> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
> --
> 2.26.3
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 7:57 ` Matthew Auld
@ 2021-10-27 8:58 ` Jani Nikula
2021-10-27 9:00 ` Jani Nikula
2021-10-27 9:03 ` Matthew Auld
2021-10-27 14:54 ` Lucas De Marchi
1 sibling, 2 replies; 18+ messages in thread
From: Jani Nikula @ 2021-10-27 8:58 UTC (permalink / raw)
To: Matthew Auld, Matthew Auld
Cc: Intel Graphics Development, ML dri-devel, kernel test robot,
Thomas Hellström, Rodrigo Vivi
On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
> On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
>>
>> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
>> include asm/smp.h here.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>
> Jani, would it make sense to cherry-pick this to -fixes? The offending
> commit is in drm-next, and there have been a few reports around this.
>
> Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
If the Fixes: tag is in place, our tooling will cherry-pick it where it
belongs. (In this case, drm-intel-next-fixes, not drm-intel-fixes.)
Cc: Rodrigo who covers drm-intel-next-fixes atm.
BR,
Jani.
>
>
>> ---
>> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> index 1adcd8e02d29..a45d0ec2c5b6 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> @@ -12,6 +12,13 @@
>> #include "i915_gem_object.h"
>> #include "i915_scatterlist.h"
>>
>> +#if defined(CONFIG_X86)
>> +#include <asm/smp.h>
>> +#else
>> +#define wbinvd_on_all_cpus() \
>> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
>> +#endif
>> +
>> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>>
>> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
>> --
>> 2.26.3
>>
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 8:58 ` Jani Nikula
@ 2021-10-27 9:00 ` Jani Nikula
2021-10-27 9:03 ` Matthew Auld
1 sibling, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2021-10-27 9:00 UTC (permalink / raw)
To: Matthew Auld, Matthew Auld
Cc: Intel Graphics Development, ML dri-devel, kernel test robot,
Thomas Hellström, Rodrigo Vivi
On Wed, 27 Oct 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
>> On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
>>>
>>> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
>>> include asm/smp.h here.
>>>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>>
>> Jani, would it make sense to cherry-pick this to -fixes? The offending
>> commit is in drm-next, and there have been a few reports around this.
>>
>> Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
>
> If the Fixes: tag is in place, our tooling will cherry-pick it where it
> belongs. (In this case, drm-intel-next-fixes, not drm-intel-fixes.)
>
> Cc: Rodrigo who covers drm-intel-next-fixes atm.
PS. 'dim tc a035154da45d' tells you where that commit is:
drm/drm-next
drm-intel/drm-intel-gt-next
drm-misc/drm-misc-next
drm-misc/topic/amdgpu-dp2.0-mst
So we see it's not in Linus' tree.
>
>
>> ---
>> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> index 1adcd8e02d29..a45d0ec2c5b6 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> @@ -12,6 +12,13 @@
>> #include "i915_gem_object.h"
>> #include "i915_scatterlist.h"
>>>
>>> +#if defined(CONFIG_X86)
>>> +#include <asm/smp.h>
>>> +#else
>>> +#define wbinvd_on_all_cpus() \
>>> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
>>> +#endif
>>> +
>>> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>>>
>>> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
>>> --
>>> 2.26.3
>>>
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 8:58 ` Jani Nikula
2021-10-27 9:00 ` Jani Nikula
@ 2021-10-27 9:03 ` Matthew Auld
2021-10-27 9:44 ` Jani Nikula
1 sibling, 1 reply; 18+ messages in thread
From: Matthew Auld @ 2021-10-27 9:03 UTC (permalink / raw)
To: Jani Nikula
Cc: Matthew Auld, Intel Graphics Development, ML dri-devel,
kernel test robot, Thomas Hellström, Rodrigo Vivi
On Wed, 27 Oct 2021 at 09:58, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>
> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
> > On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
> >>
> >> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
> >> include asm/smp.h here.
> >>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> >> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> >
> > Jani, would it make sense to cherry-pick this to -fixes? The offending
> > commit is in drm-next, and there have been a few reports around this.
> >
> > Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
>
> If the Fixes: tag is in place, our tooling will cherry-pick it where it
> belongs. (In this case, drm-intel-next-fixes, not drm-intel-fixes.)
Yeah, I forgot to add the fixes tag here unfortunately.
>
> Cc: Rodrigo who covers drm-intel-next-fixes atm.
>
> BR,
> Jani.
>
>
>
> >
> >
> >> ---
> >> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
> >> 1 file changed, 7 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> index 1adcd8e02d29..a45d0ec2c5b6 100644
> >> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> @@ -12,6 +12,13 @@
> >> #include "i915_gem_object.h"
> >> #include "i915_scatterlist.h"
> >>
> >> +#if defined(CONFIG_X86)
> >> +#include <asm/smp.h>
> >> +#else
> >> +#define wbinvd_on_all_cpus() \
> >> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
> >> +#endif
> >> +
> >> I915_SELFTEST_DECLARE(static bool force_different_devices;)
> >>
> >> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
> >> --
> >> 2.26.3
> >>
>
> --
> Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 9:03 ` Matthew Auld
@ 2021-10-27 9:44 ` Jani Nikula
2021-10-27 9:48 ` Matthew Auld
0 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2021-10-27 9:44 UTC (permalink / raw)
To: Matthew Auld
Cc: Matthew Auld, Intel Graphics Development, ML dri-devel,
kernel test robot, Thomas Hellström, Rodrigo Vivi
On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
> On Wed, 27 Oct 2021 at 09:58, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>
>> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
>> > On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
>> >>
>> >> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
>> >> include asm/smp.h here.
>> >>
>> >> Reported-by: kernel test robot <lkp@intel.com>
>> >> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> >> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> >
>> > Jani, would it make sense to cherry-pick this to -fixes? The offending
>> > commit is in drm-next, and there have been a few reports around this.
>> >
>> > Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
>>
>> If the Fixes: tag is in place, our tooling will cherry-pick it where it
>> belongs. (In this case, drm-intel-next-fixes, not drm-intel-fixes.)
>
> Yeah, I forgot to add the fixes tag here unfortunately.
Already merged? What's the commit id to be cherry-picked? Rodrigo can do
it manually.
Note to self, we should set up some way to check which maintainer is
responsible for which branches and when.
BR,
Jani.
>
>>
>> Cc: Rodrigo who covers drm-intel-next-fixes atm.
>>
>> BR,
>> Jani.
>>
>>
>>
>> >
>> >
>> >> ---
>> >> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>> >> 1 file changed, 7 insertions(+)
>> >>
>> >> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> >> index 1adcd8e02d29..a45d0ec2c5b6 100644
>> >> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> >> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> >> @@ -12,6 +12,13 @@
>> >> #include "i915_gem_object.h"
>> >> #include "i915_scatterlist.h"
>> >>
>> >> +#if defined(CONFIG_X86)
>> >> +#include <asm/smp.h>
>> >> +#else
>> >> +#define wbinvd_on_all_cpus() \
>> >> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
>> >> +#endif
>> >> +
>> >> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>> >>
>> >> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
>> >> --
>> >> 2.26.3
>> >>
>>
>> --
>> Jani Nikula, Intel Open Source Graphics Center
--
Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 9:44 ` Jani Nikula
@ 2021-10-27 9:48 ` Matthew Auld
2021-10-28 1:43 ` Vivi, Rodrigo
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Auld @ 2021-10-27 9:48 UTC (permalink / raw)
To: Jani Nikula
Cc: Matthew Auld, Intel Graphics Development, ML dri-devel,
kernel test robot, Thomas Hellström, Rodrigo Vivi
On Wed, 27 Oct 2021 at 10:44, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>
> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
> > On Wed, 27 Oct 2021 at 09:58, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >>
> >> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com> wrote:
> >> > On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
> >> >>
> >> >> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
> >> >> include asm/smp.h here.
> >> >>
> >> >> Reported-by: kernel test robot <lkp@intel.com>
> >> >> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> >> >> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> >> >
> >> > Jani, would it make sense to cherry-pick this to -fixes? The offending
> >> > commit is in drm-next, and there have been a few reports around this.
> >> >
> >> > Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
> >>
> >> If the Fixes: tag is in place, our tooling will cherry-pick it where it
> >> belongs. (In this case, drm-intel-next-fixes, not drm-intel-fixes.)
> >
> > Yeah, I forgot to add the fixes tag here unfortunately.
>
> Already merged? What's the commit id to be cherry-picked? Rodrigo can do
> it manually.
Yeah, it was merged to gt-next:
777226dac058 ("drm/i915/dmabuf: fix broken build")
>
> Note to self, we should set up some way to check which maintainer is
> responsible for which branches and when.
>
> BR,
> Jani.
>
> >
> >>
> >> Cc: Rodrigo who covers drm-intel-next-fixes atm.
> >>
> >> BR,
> >> Jani.
> >>
> >>
> >>
> >> >
> >> >
> >> >> ---
> >> >> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
> >> >> 1 file changed, 7 insertions(+)
> >> >>
> >> >> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> >> index 1adcd8e02d29..a45d0ec2c5b6 100644
> >> >> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> >> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> >> @@ -12,6 +12,13 @@
> >> >> #include "i915_gem_object.h"
> >> >> #include "i915_scatterlist.h"
> >> >>
> >> >> +#if defined(CONFIG_X86)
> >> >> +#include <asm/smp.h>
> >> >> +#else
> >> >> +#define wbinvd_on_all_cpus() \
> >> >> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
> >> >> +#endif
> >> >> +
> >> >> I915_SELFTEST_DECLARE(static bool force_different_devices;)
> >> >>
> >> >> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
> >> >> --
> >> >> 2.26.3
> >> >>
> >>
> >> --
> >> Jani Nikula, Intel Open Source Graphics Center
>
> --
> Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 7:57 ` Matthew Auld
2021-10-27 8:58 ` Jani Nikula
@ 2021-10-27 14:54 ` Lucas De Marchi
2021-10-27 16:23 ` Matthew Auld
1 sibling, 1 reply; 18+ messages in thread
From: Lucas De Marchi @ 2021-10-27 14:54 UTC (permalink / raw)
To: Matthew Auld
Cc: Matthew Auld, Jani Nikula, Intel Graphics Development,
ML dri-devel, kernel test robot, Thomas Hellström
On Wed, Oct 27, 2021 at 08:57:48AM +0100, Matthew Auld wrote:
>On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
>>
>> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
>> include asm/smp.h here.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>
>Jani, would it make sense to cherry-pick this to -fixes? The offending
>commit is in drm-next, and there have been a few reports around this.
>
>Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
>
>
>> ---
>> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> index 1adcd8e02d29..a45d0ec2c5b6 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> @@ -12,6 +12,13 @@
>> #include "i915_gem_object.h"
>> #include "i915_scatterlist.h"
>>
>> +#if defined(CONFIG_X86)
>> +#include <asm/smp.h>
>> +#else
>> +#define wbinvd_on_all_cpus() \
>> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
not sure I understand why this is a fix. Sure, it's true, but right now
this file can't be built on any other arch.
For clflush, wbind, etc, I'd rather change the code to use things from
drm_cache rather than ifdef it out locally. This is
"Reported-by: kernel test robot <lkp@intel.com>", but what's the error?
Lucas De Marchi
>> +#endif
>> +
>> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>>
>> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
>> --
>> 2.26.3
>>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 14:54 ` Lucas De Marchi
@ 2021-10-27 16:23 ` Matthew Auld
2021-10-27 17:16 ` Lucas De Marchi
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Auld @ 2021-10-27 16:23 UTC (permalink / raw)
To: Lucas De Marchi
Cc: Matthew Auld, Jani Nikula, Intel Graphics Development,
ML dri-devel, kernel test robot, Thomas Hellström
On Wed, 27 Oct 2021 at 15:54, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>
> On Wed, Oct 27, 2021 at 08:57:48AM +0100, Matthew Auld wrote:
> >On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
> >>
> >> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
> >> include asm/smp.h here.
> >>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> >> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> >
> >Jani, would it make sense to cherry-pick this to -fixes? The offending
> >commit is in drm-next, and there have been a few reports around this.
> >
> >Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
> >
> >
> >> ---
> >> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
> >> 1 file changed, 7 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> index 1adcd8e02d29..a45d0ec2c5b6 100644
> >> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> >> @@ -12,6 +12,13 @@
> >> #include "i915_gem_object.h"
> >> #include "i915_scatterlist.h"
> >>
> >> +#if defined(CONFIG_X86)
> >> +#include <asm/smp.h>
> >> +#else
> >> +#define wbinvd_on_all_cpus() \
> >> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
>
>
> not sure I understand why this is a fix. Sure, it's true, but right now
> this file can't be built on any other arch.
>
> For clflush, wbind, etc, I'd rather change the code to use things from
> drm_cache rather than ifdef it out locally. This is
> "Reported-by: kernel test robot <lkp@intel.com>", but what's the error?
I guess it depends on the kernel config, but it reported:
error: implicit declaration of function 'wbinvd_on_all_cpus'
AFAIK it's the missing <asm/smp.h>, the CONFIG_X86 thing is just for
good measure.
I didn't spot anything in drm_cache which just offers a simple wrapper
for wbinvd?
>
> Lucas De Marchi
>
> >> +#endif
> >> +
> >> I915_SELFTEST_DECLARE(static bool force_different_devices;)
> >>
> >> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
> >> --
> >> 2.26.3
> >>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 16:23 ` Matthew Auld
@ 2021-10-27 17:16 ` Lucas De Marchi
0 siblings, 0 replies; 18+ messages in thread
From: Lucas De Marchi @ 2021-10-27 17:16 UTC (permalink / raw)
To: Matthew Auld
Cc: Matthew Auld, Jani Nikula, Intel Graphics Development,
ML dri-devel, kernel test robot, Thomas Hellström
On Wed, Oct 27, 2021 at 05:23:59PM +0100, Matthew Auld wrote:
>On Wed, 27 Oct 2021 at 15:54, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>>
>> On Wed, Oct 27, 2021 at 08:57:48AM +0100, Matthew Auld wrote:
>> >On Thu, 21 Oct 2021 at 13:54, Matthew Auld <matthew.auld@intel.com> wrote:
>> >>
>> >> wbinvd_on_all_cpus() is only defined on x86 it seems, plus we need to
>> >> include asm/smp.h here.
>> >>
>> >> Reported-by: kernel test robot <lkp@intel.com>
>> >> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>> >> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> >
>> >Jani, would it make sense to cherry-pick this to -fixes? The offending
>> >commit is in drm-next, and there have been a few reports around this.
>> >
>> >Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-acquire")
>> >
>> >
>> >> ---
>> >> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>> >> 1 file changed, 7 insertions(+)
>> >>
>> >> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> >> index 1adcd8e02d29..a45d0ec2c5b6 100644
>> >> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> >> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>> >> @@ -12,6 +12,13 @@
>> >> #include "i915_gem_object.h"
>> >> #include "i915_scatterlist.h"
>> >>
>> >> +#if defined(CONFIG_X86)
>> >> +#include <asm/smp.h>
>> >> +#else
>> >> +#define wbinvd_on_all_cpus() \
>> >> + pr_warn(DRIVER_NAME ": Missing cache flush in %s\n", __func__)
>>
>>
>> not sure I understand why this is a fix. Sure, it's true, but right now
>> this file can't be built on any other arch.
>>
>> For clflush, wbind, etc, I'd rather change the code to use things from
>> drm_cache rather than ifdef it out locally. This is
>> "Reported-by: kernel test robot <lkp@intel.com>", but what's the error?
>
>I guess it depends on the kernel config, but it reported:
>error: implicit declaration of function 'wbinvd_on_all_cpus'
oh, ok. The commit message was not very clear. Just checked and this also matches what is done
in gem/i915_gem_pm.c (although gt/intel_ggtt.c just includes it
unconditionally)
>
>AFAIK it's the missing <asm/smp.h>, the CONFIG_X86 thing is just for
>good measure.
>
>I didn't spot anything in drm_cache which just offers a simple wrapper
>for wbinvd?
there isn't yet, but it's something we are adding as we add suppport for
other archs.
thanks
Lucas De Marchi
>
>>
>> Lucas De Marchi
>>
>> >> +#endif
>> >> +
>> >> I915_SELFTEST_DECLARE(static bool force_different_devices;)
>> >>
>> >> static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
>> >> --
>> >> 2.26.3
>> >>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-27 9:48 ` Matthew Auld
@ 2021-10-28 1:43 ` Vivi, Rodrigo
2021-10-28 8:48 ` Matthew Auld
0 siblings, 1 reply; 18+ messages in thread
From: Vivi, Rodrigo @ 2021-10-28 1:43 UTC (permalink / raw)
To: jani.nikula, matthew.william.auld
Cc: dri-devel, intel-gfx, Auld, Matthew, lkp, thomas.hellstrom
On Wed, 2021-10-27 at 10:48 +0100, Matthew Auld wrote:
> On Wed, 27 Oct 2021 at 10:44, Jani Nikula
> <jani.nikula@linux.intel.com> wrote:
> >
> > On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com>
> > wrote:
> > > On Wed, 27 Oct 2021 at 09:58, Jani Nikula
> > > <jani.nikula@linux.intel.com> wrote:
> > > >
> > > > On Wed, 27 Oct 2021, Matthew Auld
> > > > <matthew.william.auld@gmail.com> wrote:
> > > > > On Thu, 21 Oct 2021 at 13:54, Matthew Auld
> > > > > <matthew.auld@intel.com> wrote:
> > > > > >
> > > > > > wbinvd_on_all_cpus() is only defined on x86 it seems, plus
> > > > > > we need to
> > > > > > include asm/smp.h here.
> > > > > >
> > > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> > > > > > Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> > > > >
> > > > > Jani, would it make sense to cherry-pick this to -fixes? The
> > > > > offending
> > > > > commit is in drm-next, and there have been a few reports
> > > > > around this.
> > > > >
> > > > > Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-
> > > > > acquire")
> > > >
> > > > If the Fixes: tag is in place, our tooling will cherry-pick it
> > > > where it
> > > > belongs. (In this case, drm-intel-next-fixes, not drm-intel-
> > > > fixes.)
> > >
> > > Yeah, I forgot to add the fixes tag here unfortunately.
> >
> > Already merged? What's the commit id to be cherry-picked? Rodrigo
> > can do
> > it manually.
>
> Yeah, it was merged to gt-next:
>
> 777226dac058 ("drm/i915/dmabuf: fix broken build")
picked up to drm-intel-next-fixes
thanks,
Rodrigo.
>
> >
> > Note to self, we should set up some way to check which maintainer
> > is
> > responsible for which branches and when.
> >
> > BR,
> > Jani.
> >
> > >
> > > >
> > > > Cc: Rodrigo who covers drm-intel-next-fixes atm.
> > > >
> > > > BR,
> > > > Jani.
> > > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > > ---
> > > > > > drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
> > > > > > 1 file changed, 7 insertions(+)
> > > > > >
> > > > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> > > > > > b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> > > > > > index 1adcd8e02d29..a45d0ec2c5b6 100644
> > > > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> > > > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> > > > > > @@ -12,6 +12,13 @@
> > > > > > #include "i915_gem_object.h"
> > > > > > #include "i915_scatterlist.h"
> > > > > >
> > > > > > +#if defined(CONFIG_X86)
> > > > > > +#include <asm/smp.h>
> > > > > > +#else
> > > > > > +#define wbinvd_on_all_cpus() \
> > > > > > + pr_warn(DRIVER_NAME ": Missing cache flush in
> > > > > > %s\n", __func__)
> > > > > > +#endif
> > > > > > +
> > > > > > I915_SELFTEST_DECLARE(static bool
> > > > > > force_different_devices;)
> > > > > >
> > > > > > static struct drm_i915_gem_object *dma_buf_to_obj(struct
> > > > > > dma_buf *buf)
> > > > > > --
> > > > > > 2.26.3
> > > > > >
> > > >
> > > > --
> > > > Jani Nikula, Intel Open Source Graphics Center
> >
> > --
> > Jani Nikula, Intel Open Source Graphics Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-28 1:43 ` Vivi, Rodrigo
@ 2021-10-28 8:48 ` Matthew Auld
2021-11-22 13:34 ` Tvrtko Ursulin
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Auld @ 2021-10-28 8:48 UTC (permalink / raw)
To: Vivi, Rodrigo, jani.nikula, matthew.william.auld
Cc: dri-devel, intel-gfx, lkp, thomas.hellstrom
On 28/10/2021 02:43, Vivi, Rodrigo wrote:
> On Wed, 2021-10-27 at 10:48 +0100, Matthew Auld wrote:
>> On Wed, 27 Oct 2021 at 10:44, Jani Nikula
>> <jani.nikula@linux.intel.com> wrote:
>>>
>>> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com>
>>> wrote:
>>>> On Wed, 27 Oct 2021 at 09:58, Jani Nikula
>>>> <jani.nikula@linux.intel.com> wrote:
>>>>>
>>>>> On Wed, 27 Oct 2021, Matthew Auld
>>>>> <matthew.william.auld@gmail.com> wrote:
>>>>>> On Thu, 21 Oct 2021 at 13:54, Matthew Auld
>>>>>> <matthew.auld@intel.com> wrote:
>>>>>>>
>>>>>>> wbinvd_on_all_cpus() is only defined on x86 it seems, plus
>>>>>>> we need to
>>>>>>> include asm/smp.h here.
>>>>>>>
>>>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>>>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>>>>>>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>>>>>>
>>>>>> Jani, would it make sense to cherry-pick this to -fixes? The
>>>>>> offending
>>>>>> commit is in drm-next, and there have been a few reports
>>>>>> around this.
>>>>>>
>>>>>> Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-
>>>>>> acquire")
>>>>>
>>>>> If the Fixes: tag is in place, our tooling will cherry-pick it
>>>>> where it
>>>>> belongs. (In this case, drm-intel-next-fixes, not drm-intel-
>>>>> fixes.)
>>>>
>>>> Yeah, I forgot to add the fixes tag here unfortunately.
>>>
>>> Already merged? What's the commit id to be cherry-picked? Rodrigo
>>> can do
>>> it manually.
>>
>> Yeah, it was merged to gt-next:
>>
>> 777226dac058 ("drm/i915/dmabuf: fix broken build")
>
> picked up to drm-intel-next-fixes
Thanks.
>
> thanks,
> Rodrigo.
>
>>
>>>
>>> Note to self, we should set up some way to check which maintainer
>>> is
>>> responsible for which branches and when.
>>>
>>> BR,
>>> Jani.
>>>
>>>>
>>>>>
>>>>> Cc: Rodrigo who covers drm-intel-next-fixes atm.
>>>>>
>>>>> BR,
>>>>> Jani.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>> ---
>>>>>>> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>>>>>>> 1 file changed, 7 insertions(+)
>>>>>>>
>>>>>>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>> b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>> index 1adcd8e02d29..a45d0ec2c5b6 100644
>>>>>>> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>> @@ -12,6 +12,13 @@
>>>>>>> #include "i915_gem_object.h"
>>>>>>> #include "i915_scatterlist.h"
>>>>>>>
>>>>>>> +#if defined(CONFIG_X86)
>>>>>>> +#include <asm/smp.h>
>>>>>>> +#else
>>>>>>> +#define wbinvd_on_all_cpus() \
>>>>>>> + pr_warn(DRIVER_NAME ": Missing cache flush in
>>>>>>> %s\n", __func__)
>>>>>>> +#endif
>>>>>>> +
>>>>>>> I915_SELFTEST_DECLARE(static bool
>>>>>>> force_different_devices;)
>>>>>>>
>>>>>>> static struct drm_i915_gem_object *dma_buf_to_obj(struct
>>>>>>> dma_buf *buf)
>>>>>>> --
>>>>>>> 2.26.3
>>>>>>>
>>>>>
>>>>> --
>>>>> Jani Nikula, Intel Open Source Graphics Center
>>>
>>> --
>>> Jani Nikula, Intel Open Source Graphics Center
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-gfx] [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete
2021-10-21 12:53 ` [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete Matthew Auld
2021-10-22 9:26 ` Thomas Hellström
@ 2021-10-28 15:31 ` Daniel Vetter
1 sibling, 0 replies; 18+ messages in thread
From: Daniel Vetter @ 2021-10-28 15:31 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx, dri-devel, Thomas Hellström
On Thu, Oct 21, 2021 at 01:53:32PM +0100, Matthew Auld wrote:
> We were overzealous here; even though discrete is non-LLC, it should
> still be always coherent.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> index a45d0ec2c5b6..848e81368043 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
> @@ -251,7 +251,8 @@ static int i915_gem_object_get_pages_dmabuf(struct drm_i915_gem_object *obj)
> return PTR_ERR(pages);
>
> /* XXX: consider doing a vmap flush or something */
> - if (!HAS_LLC(i915) || i915_gem_object_can_bypass_llc(obj))
> + if ((!HAS_LLC(i915) && !IS_DGFX(i915)) ||
> + i915_gem_object_can_bypass_llc(obj))
> wbinvd_on_all_cpus();
I think a comment here why we do wbinvd and not clflush like everywhere
else here would be good. There's the XXX, but it's kinda not explaining
why vmap isn't a good idea.
Just an aside.
-Daneil
>
> sg_page_sizes = i915_sg_dma_sizes(pages->sgl);
> --
> 2.26.3
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] drm/i915/dmabuf: fix broken build
2021-10-28 8:48 ` Matthew Auld
@ 2021-11-22 13:34 ` Tvrtko Ursulin
0 siblings, 0 replies; 18+ messages in thread
From: Tvrtko Ursulin @ 2021-11-22 13:34 UTC (permalink / raw)
To: Matthew Auld, Vivi, Rodrigo, jani.nikula, matthew.william.auld
Cc: thomas.hellstrom, lkp, intel-gfx, dri-devel
On 28/10/2021 09:48, Matthew Auld wrote:
> On 28/10/2021 02:43, Vivi, Rodrigo wrote:
>> On Wed, 2021-10-27 at 10:48 +0100, Matthew Auld wrote:
>>> On Wed, 27 Oct 2021 at 10:44, Jani Nikula
>>> <jani.nikula@linux.intel.com> wrote:
>>>>
>>>> On Wed, 27 Oct 2021, Matthew Auld <matthew.william.auld@gmail.com>
>>>> wrote:
>>>>> On Wed, 27 Oct 2021 at 09:58, Jani Nikula
>>>>> <jani.nikula@linux.intel.com> wrote:
>>>>>>
>>>>>> On Wed, 27 Oct 2021, Matthew Auld
>>>>>> <matthew.william.auld@gmail.com> wrote:
>>>>>>> On Thu, 21 Oct 2021 at 13:54, Matthew Auld
>>>>>>> <matthew.auld@intel.com> wrote:
>>>>>>>>
>>>>>>>> wbinvd_on_all_cpus() is only defined on x86 it seems, plus
>>>>>>>> we need to
>>>>>>>> include asm/smp.h here.
>>>>>>>>
>>>>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>>>>> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>>>>>>>> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>>>>>>>
>>>>>>> Jani, would it make sense to cherry-pick this to -fixes? The
>>>>>>> offending
>>>>>>> commit is in drm-next, and there have been a few reports
>>>>>>> around this.
>>>>>>>
>>>>>>> Fixes: a035154da45d ("drm/i915/dmabuf: add paranoid flush-on-
>>>>>>> acquire")
>>>>>>
>>>>>> If the Fixes: tag is in place, our tooling will cherry-pick it
>>>>>> where it
>>>>>> belongs. (In this case, drm-intel-next-fixes, not drm-intel-
>>>>>> fixes.)
>>>>>
>>>>> Yeah, I forgot to add the fixes tag here unfortunately.
>>>>
>>>> Already merged? What's the commit id to be cherry-picked? Rodrigo
>>>> can do
>>>> it manually.
>>>
>>> Yeah, it was merged to gt-next:
>>>
>>> 777226dac058 ("drm/i915/dmabuf: fix broken build")
>>
>> picked up to drm-intel-next-fixes
>
> Thanks.
Hmm it looks like we have this in -fixes (and in -gt) while Linus has
explicitly thrown it out (see
https://lists.freedesktop.org/archives/dri-devel/2021-November/330928.html).
End result is that now we have a different Kernel Test Robot warning
("asm/smp.h is included more than once.").
So we need to fish out "drm/i915/dmabuf: fix broken build" out from
fixes with a revert or what?
Regards,
Tvrtko
>
>>
>> thanks,
>> Rodrigo.
>>
>>>
>>>>
>>>> Note to self, we should set up some way to check which maintainer
>>>> is
>>>> responsible for which branches and when.
>>>>
>>>> BR,
>>>> Jani.
>>>>
>>>>>
>>>>>>
>>>>>> Cc: Rodrigo who covers drm-intel-next-fixes atm.
>>>>>>
>>>>>> BR,
>>>>>> Jani.
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> ---
>>>>>>>> drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +++++++
>>>>>>>> 1 file changed, 7 insertions(+)
>>>>>>>>
>>>>>>>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>>> b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>>> index 1adcd8e02d29..a45d0ec2c5b6 100644
>>>>>>>> --- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
>>>>>>>> @@ -12,6 +12,13 @@
>>>>>>>> #include "i915_gem_object.h"
>>>>>>>> #include "i915_scatterlist.h"
>>>>>>>>
>>>>>>>> +#if defined(CONFIG_X86)
>>>>>>>> +#include <asm/smp.h>
>>>>>>>> +#else
>>>>>>>> +#define wbinvd_on_all_cpus() \
>>>>>>>> + pr_warn(DRIVER_NAME ": Missing cache flush in
>>>>>>>> %s\n", __func__)
>>>>>>>> +#endif
>>>>>>>> +
>>>>>>>> I915_SELFTEST_DECLARE(static bool
>>>>>>>> force_different_devices;)
>>>>>>>>
>>>>>>>> static struct drm_i915_gem_object *dma_buf_to_obj(struct
>>>>>>>> dma_buf *buf)
>>>>>>>> --
>>>>>>>> 2.26.3
>>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jani Nikula, Intel Open Source Graphics Center
>>>>
>>>> --
>>>> Jani Nikula, Intel Open Source Graphics Center
>>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-11-22 13:34 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 12:53 [PATCH 1/2] drm/i915/dmabuf: fix broken build Matthew Auld
2021-10-21 12:53 ` [PATCH 2/2] drm/i915/dmabuf: drop the flush on discrete Matthew Auld
2021-10-22 9:26 ` Thomas Hellström
2021-10-22 9:47 ` Matthew Auld
2021-10-28 15:31 ` [Intel-gfx] " Daniel Vetter
2021-10-21 15:18 ` [PATCH 1/2] drm/i915/dmabuf: fix broken build Dixit, Ashutosh
2021-10-27 7:57 ` Matthew Auld
2021-10-27 8:58 ` Jani Nikula
2021-10-27 9:00 ` Jani Nikula
2021-10-27 9:03 ` Matthew Auld
2021-10-27 9:44 ` Jani Nikula
2021-10-27 9:48 ` Matthew Auld
2021-10-28 1:43 ` Vivi, Rodrigo
2021-10-28 8:48 ` Matthew Auld
2021-11-22 13:34 ` Tvrtko Ursulin
2021-10-27 14:54 ` Lucas De Marchi
2021-10-27 16:23 ` Matthew Auld
2021-10-27 17:16 ` Lucas De Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).