* [PATCH 0/3] drm/i915: Fix header test and log spam on !x86
@ 2022-01-26 0:43 Lucas De Marchi
2022-01-26 0:43 ` [PATCH 1/3] drm: Stop spamming log with drm_cache message Lucas De Marchi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Lucas De Marchi @ 2022-01-26 0:43 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel
Some minor fixes and changes to help porting i915 to arm64, or even
anything !x86.
Lucas De Marchi (3):
drm: Stop spamming log with drm_cache message
drm/i915: Do not spam log with missiing arch support
drm/i915: Fix header test for !CONFIG_X86
drivers/gpu/drm/drm_cache.c | 3 ---
drivers/gpu/drm/i915/i915_mm.h | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/3] drm: Stop spamming log with drm_cache message 2022-01-26 0:43 [PATCH 0/3] drm/i915: Fix header test and log spam on !x86 Lucas De Marchi @ 2022-01-26 0:43 ` Lucas De Marchi 2022-01-26 18:24 ` [Intel-gfx] " Jani Nikula 2022-01-26 0:43 ` [PATCH 2/3] drm/i915: Do not spam log with missiing arch support Lucas De Marchi 2022-01-26 0:43 ` [PATCH 3/3] drm/i915: Fix header test for !CONFIG_X86 Lucas De Marchi 2 siblings, 1 reply; 6+ messages in thread From: Lucas De Marchi @ 2022-01-26 0:43 UTC (permalink / raw) To: intel-gfx; +Cc: David Airlie, dri-devel, Thomas Zimmermann Only x86 and in some cases PPC have support added in drm_cache.c for the clflush class of functions. However warning once is sufficient to taint the log instead of spamming it with "Architecture has no drm_cache.c support" every few millisecond. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- drivers/gpu/drm/drm_cache.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c index f19d9acbe959..2d5a4c463a4f 100644 --- a/drivers/gpu/drm/drm_cache.c +++ b/drivers/gpu/drm/drm_cache.c @@ -112,7 +112,6 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages) kunmap_atomic(page_virtual); } #else - pr_err("Architecture has no drm_cache.c support\n"); WARN_ON_ONCE(1); #endif } @@ -143,7 +142,6 @@ drm_clflush_sg(struct sg_table *st) if (wbinvd_on_all_cpus()) pr_err("Timed out waiting for cache flush\n"); #else - pr_err("Architecture has no drm_cache.c support\n"); WARN_ON_ONCE(1); #endif } @@ -177,7 +175,6 @@ drm_clflush_virt_range(void *addr, unsigned long length) if (wbinvd_on_all_cpus()) pr_err("Timed out waiting for cache flush\n"); #else - pr_err("Architecture has no drm_cache.c support\n"); WARN_ON_ONCE(1); #endif } -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH 1/3] drm: Stop spamming log with drm_cache message 2022-01-26 0:43 ` [PATCH 1/3] drm: Stop spamming log with drm_cache message Lucas De Marchi @ 2022-01-26 18:24 ` Jani Nikula 2022-01-26 20:14 ` Lucas De Marchi 0 siblings, 1 reply; 6+ messages in thread From: Jani Nikula @ 2022-01-26 18:24 UTC (permalink / raw) To: Lucas De Marchi, intel-gfx; +Cc: David Airlie, Thomas Zimmermann, dri-devel On Tue, 25 Jan 2022, Lucas De Marchi <lucas.demarchi@intel.com> wrote: > Only x86 and in some cases PPC have support added in drm_cache.c for the > clflush class of functions. However warning once is sufficient to taint > the log instead of spamming it with "Architecture has no drm_cache.c > support" every few millisecond. > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> > --- > drivers/gpu/drm/drm_cache.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c > index f19d9acbe959..2d5a4c463a4f 100644 > --- a/drivers/gpu/drm/drm_cache.c > +++ b/drivers/gpu/drm/drm_cache.c > @@ -112,7 +112,6 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages) > kunmap_atomic(page_virtual); > } > #else > - pr_err("Architecture has no drm_cache.c support\n"); > WARN_ON_ONCE(1); An alternative would be to replace the two lines with: WARN_ONCE(1, "Architecture has no drm_cache.c support\n"); But I'm not insisting. BR, Jani. > #endif > } > @@ -143,7 +142,6 @@ drm_clflush_sg(struct sg_table *st) > if (wbinvd_on_all_cpus()) > pr_err("Timed out waiting for cache flush\n"); > #else > - pr_err("Architecture has no drm_cache.c support\n"); > WARN_ON_ONCE(1); > #endif > } > @@ -177,7 +175,6 @@ drm_clflush_virt_range(void *addr, unsigned long length) > if (wbinvd_on_all_cpus()) > pr_err("Timed out waiting for cache flush\n"); > #else > - pr_err("Architecture has no drm_cache.c support\n"); > WARN_ON_ONCE(1); > #endif > } -- Jani Nikula, Intel Open Source Graphics Center ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH 1/3] drm: Stop spamming log with drm_cache message 2022-01-26 18:24 ` [Intel-gfx] " Jani Nikula @ 2022-01-26 20:14 ` Lucas De Marchi 0 siblings, 0 replies; 6+ messages in thread From: Lucas De Marchi @ 2022-01-26 20:14 UTC (permalink / raw) To: Jani Nikula; +Cc: David Airlie, Thomas Zimmermann, intel-gfx, dri-devel On Wed, Jan 26, 2022 at 08:24:54PM +0200, Jani Nikula wrote: >On Tue, 25 Jan 2022, Lucas De Marchi <lucas.demarchi@intel.com> wrote: >> Only x86 and in some cases PPC have support added in drm_cache.c for the >> clflush class of functions. However warning once is sufficient to taint >> the log instead of spamming it with "Architecture has no drm_cache.c >> support" every few millisecond. >> >> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >> Cc: Maxime Ripard <mripard@kernel.org> >> Cc: Thomas Zimmermann <tzimmermann@suse.de> >> Cc: David Airlie <airlied@linux.ie> >> Cc: Daniel Vetter <daniel@ffwll.ch> >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> >> --- >> drivers/gpu/drm/drm_cache.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c >> index f19d9acbe959..2d5a4c463a4f 100644 >> --- a/drivers/gpu/drm/drm_cache.c >> +++ b/drivers/gpu/drm/drm_cache.c >> @@ -112,7 +112,6 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages) >> kunmap_atomic(page_virtual); >> } >> #else >> - pr_err("Architecture has no drm_cache.c support\n"); >> WARN_ON_ONCE(1); > >An alternative would be to replace the two lines with: > > WARN_ONCE(1, "Architecture has no drm_cache.c support\n"); > >But I'm not insisting. I actually like that suggestion. I will change that in the next version. Thanks Lucas De Marchi ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] drm/i915: Do not spam log with missiing arch support 2022-01-26 0:43 [PATCH 0/3] drm/i915: Fix header test and log spam on !x86 Lucas De Marchi 2022-01-26 0:43 ` [PATCH 1/3] drm: Stop spamming log with drm_cache message Lucas De Marchi @ 2022-01-26 0:43 ` Lucas De Marchi 2022-01-26 0:43 ` [PATCH 3/3] drm/i915: Fix header test for !CONFIG_X86 Lucas De Marchi 2 siblings, 0 replies; 6+ messages in thread From: Lucas De Marchi @ 2022-01-26 0:43 UTC (permalink / raw) To: intel-gfx; +Cc: dri-devel Following what was done in drm_cache.c, when the stub for remap_io_mapping() was added in commit 67c430bbaae1 ("drm/i915: Skip remap_io_mapping() for non-x86 platforms"), it was added a log message. However the WARN_ON_ONCE() should already be enough - we don't want to spam the log with those messages. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- drivers/gpu/drm/i915/i915_mm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_mm.h b/drivers/gpu/drm/i915/i915_mm.h index 76f1d53bdf34..ed04fc756271 100644 --- a/drivers/gpu/drm/i915/i915_mm.h +++ b/drivers/gpu/drm/i915/i915_mm.h @@ -22,7 +22,6 @@ int remap_io_mapping(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, struct io_mapping *iomap) { - pr_err("Architecture has no %s() and shouldn't be calling this function\n", __func__); WARN_ON_ONCE(1); return 0; } -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/i915: Fix header test for !CONFIG_X86 2022-01-26 0:43 [PATCH 0/3] drm/i915: Fix header test and log spam on !x86 Lucas De Marchi 2022-01-26 0:43 ` [PATCH 1/3] drm: Stop spamming log with drm_cache message Lucas De Marchi 2022-01-26 0:43 ` [PATCH 2/3] drm/i915: Do not spam log with missiing arch support Lucas De Marchi @ 2022-01-26 0:43 ` Lucas De Marchi 2 siblings, 0 replies; 6+ messages in thread From: Lucas De Marchi @ 2022-01-26 0:43 UTC (permalink / raw) To: intel-gfx; +Cc: Siva Mullati, dri-devel Architectures others than x86 have a stub implementation calling WARN_ON_ONCE(). The appropriate headers need to be included, otherwise the header-test target will fail with: HDRTEST drivers/gpu/drm/i915/i915_mm.h In file included from <command-line>: ./drivers/gpu/drm/i915/i915_mm.h: In function ‘remap_io_mapping’: ./drivers/gpu/drm/i915/i915_mm.h:26:2: error: implicit declaration of function ‘WARN_ON_ONCE’ [-Werror=implicit-function-declaration] 26 | WARN_ON_ONCE(1); | ^~~~~~~~~~~~ v2: Do not include <linux/printk.h> since call to pr_err() has been removed Fixes: 67c430bbaae1 ("drm/i915: Skip remap_io_mapping() for non-x86 platforms") Cc: Siva Mullati <siva.mullati@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- drivers/gpu/drm/i915/i915_mm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_mm.h b/drivers/gpu/drm/i915/i915_mm.h index ed04fc756271..bc30581b20f6 100644 --- a/drivers/gpu/drm/i915/i915_mm.h +++ b/drivers/gpu/drm/i915/i915_mm.h @@ -6,6 +6,7 @@ #ifndef __I915_MM_H__ #define __I915_MM_H__ +#include <linux/bug.h> #include <linux/types.h> struct vm_area_struct; -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-26 20:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-01-26 0:43 [PATCH 0/3] drm/i915: Fix header test and log spam on !x86 Lucas De Marchi 2022-01-26 0:43 ` [PATCH 1/3] drm: Stop spamming log with drm_cache message Lucas De Marchi 2022-01-26 18:24 ` [Intel-gfx] " Jani Nikula 2022-01-26 20:14 ` Lucas De Marchi 2022-01-26 0:43 ` [PATCH 2/3] drm/i915: Do not spam log with missiing arch support Lucas De Marchi 2022-01-26 0:43 ` [PATCH 3/3] drm/i915: Fix header test for !CONFIG_X86 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