* [PATCH] drm/i915: stop storing the media fuse
@ 2019-03-22 0:24 Daniele Ceraolo Spurio
2019-03-22 2:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Daniele Ceraolo Spurio @ 2019-03-22 0:24 UTC (permalink / raw)
To: intel-gfx
We're already updating the engine_mask to reflect what's in the HW, so
we can just get the info from there. A couple of macros have been added
to facilitate this.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
drivers/gpu/drm/i915/intel_device_info.c | 15 ++++++++-------
drivers/gpu/drm/i915/intel_device_info.h | 4 ----
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index fefcb39aefc4..9d8d423641d2 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2440,6 +2440,12 @@ static inline unsigned int i915_sg_segment_size(void)
#define ALL_ENGINES (~0u)
#define HAS_ENGINE(dev_priv, id) (INTEL_INFO(dev_priv)->engine_mask & BIT(id))
+#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
+ ((INTEL_INFO(dev_priv)->engine_mask & \
+ GENMASK(first + count - 1, first)) >> first)
+#define VDBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VCS0, I915_MAX_VCS);
+#define VEBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VECS0, I915_MAX_VECS);
+
#define HAS_LLC(dev_priv) (INTEL_INFO(dev_priv)->has_llc)
#define HAS_SNOOP(dev_priv) (INTEL_INFO(dev_priv)->has_snoop)
#define HAS_EDRAM(dev_priv) (!!((dev_priv)->edram_cap & EDRAM_ENABLED))
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index eddf83807957..74efabd12351 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -871,22 +871,23 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
unsigned int logical_vdbox = 0;
unsigned int i;
u32 media_fuse;
+ u16 vdbox_mask, vebox_mask;
if (INTEL_GEN(dev_priv) < 11)
return;
media_fuse = ~I915_READ(GEN11_GT_VEBOX_VDBOX_DISABLE);
- RUNTIME_INFO(dev_priv)->vdbox_enable = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
- RUNTIME_INFO(dev_priv)->vebox_enable = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
- GEN11_GT_VEBOX_DISABLE_SHIFT;
+ vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
+ vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
+ GEN11_GT_VEBOX_DISABLE_SHIFT;
- DRM_DEBUG_DRIVER("vdbox enable: %04x\n", RUNTIME_INFO(dev_priv)->vdbox_enable);
+ DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask);
for (i = 0; i < I915_MAX_VCS; i++) {
if (!HAS_ENGINE(dev_priv, _VCS(i)))
continue;
- if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vdbox_enable)) {
+ if (!(BIT(i) & vdbox_mask)) {
info->engine_mask &= ~BIT(_VCS(i));
DRM_DEBUG_DRIVER("vcs%u fused off\n", i);
continue;
@@ -900,12 +901,12 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
}
- DRM_DEBUG_DRIVER("vebox enable: %04x\n", RUNTIME_INFO(dev_priv)->vebox_enable);
+ DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask);
for (i = 0; i < I915_MAX_VECS; i++) {
if (!HAS_ENGINE(dev_priv, _VECS(i)))
continue;
- if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vebox_enable)) {
+ if (!(BIT(i) & vebox_mask)) {
info->engine_mask &= ~BIT(_VECS(i));
DRM_DEBUG_DRIVER("vecs%u fused off\n", i);
}
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
index 6234570a9b17..06f428c70ff5 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -208,10 +208,6 @@ struct intel_runtime_info {
u32 cs_timestamp_frequency_khz;
- /* Enabled (not fused off) media engine bitmasks. */
- u8 vdbox_enable;
- u8 vebox_enable;
-
/* Media engine access to SFC per instance */
u8 vdbox_sfc_access;
};
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: stop storing the media fuse
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
@ 2019-03-22 2:09 ` Patchwork
2019-03-22 2:11 ` ✗ Fi.CI.SPARSE: " Patchwork
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-22 2:09 UTC (permalink / raw)
To: Daniele Ceraolo Spurio; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: stop storing the media fuse
URL : https://patchwork.freedesktop.org/series/58387/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
de5dfcc93c76 drm/i915: stop storing the media fuse
-:23: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'first' - possible side-effects?
#23: FILE: drivers/gpu/drm/i915/i915_drv.h:2443:
+#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
+ ((INTEL_INFO(dev_priv)->engine_mask & \
+ GENMASK(first + count - 1, first)) >> first)
-:23: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'first' may be better as '(first)' to avoid precedence issues
#23: FILE: drivers/gpu/drm/i915/i915_drv.h:2443:
+#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
+ ((INTEL_INFO(dev_priv)->engine_mask & \
+ GENMASK(first + count - 1, first)) >> first)
-:23: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'count' may be better as '(count)' to avoid precedence issues
#23: FILE: drivers/gpu/drm/i915/i915_drv.h:2443:
+#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
+ ((INTEL_INFO(dev_priv)->engine_mask & \
+ GENMASK(first + count - 1, first)) >> first)
-:26: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#26: FILE: drivers/gpu/drm/i915/i915_drv.h:2446:
+#define VDBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VCS0, I915_MAX_VCS);
-:27: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#27: FILE: drivers/gpu/drm/i915/i915_drv.h:2447:
+#define VEBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VECS0, I915_MAX_VECS);
total: 0 errors, 2 warnings, 3 checks, 64 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✗ Fi.CI.SPARSE: warning for drm/i915: stop storing the media fuse
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
2019-03-22 2:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-03-22 2:11 ` Patchwork
2019-03-22 2:29 ` ✓ Fi.CI.BAT: success " Patchwork
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-22 2:11 UTC (permalink / raw)
To: Daniele Ceraolo Spurio; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: stop storing the media fuse
URL : https://patchwork.freedesktop.org/series/58387/
State : warning
== Summary ==
$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: stop storing the media fuse
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3572:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3578:16: warning: expression using sizeof(void)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: stop storing the media fuse
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
2019-03-22 2:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-22 2:11 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2019-03-22 2:29 ` Patchwork
2019-03-22 8:29 ` [PATCH] " Chris Wilson
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-22 2:29 UTC (permalink / raw)
To: Daniele Ceraolo Spurio; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: stop storing the media fuse
URL : https://patchwork.freedesktop.org/series/58387/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5791 -> Patchwork_12564
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/58387/revisions/1/mbox/
Known issues
------------
Here are the changes found in Patchwork_12564 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_basic@basic-bsd2:
- fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9
* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57
* igt@gem_wait@basic-await-all:
- fi-skl-gvtdvm: PASS -> DMESG-WARN [fdo#105541]
* igt@i915_selftest@live_uncore:
- fi-ivb-3770: PASS -> DMESG-FAIL [fdo#110210]
* igt@kms_busy@basic-flip-c:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841]
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: PASS -> FAIL [fdo#103167]
* igt@kms_psr@primary_mmap_gtt:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +27
* igt@runner@aborted:
- fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841]
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]
#### Possible fixes ####
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
[fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
Participating hosts (44 -> 37)
------------------------------
Additional (2): fi-snb-2520m fi-kbl-7500u
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus fi-kbl-r
Build changes
-------------
* Linux: CI_DRM_5791 -> Patchwork_12564
CI_DRM_5791: 3b6d09692ea282a3487bdf972a068d312a67ca00 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4897: e12d69496a6bef09ac6c0f792b8d60a65cf5e0bf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12564: de5dfcc93c766c60a78643663d7ef45f96eb6f9a @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
de5dfcc93c76 drm/i915: stop storing the media fuse
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12564/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: stop storing the media fuse
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
` (2 preceding siblings ...)
2019-03-22 2:29 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-03-22 8:29 ` Chris Wilson
2019-03-25 18:22 ` Michal Wajdeczko
2019-03-22 9:23 ` Tvrtko Ursulin
2019-03-22 19:35 ` ✗ Fi.CI.IGT: failure for " Patchwork
5 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2019-03-22 8:29 UTC (permalink / raw)
To: Daniele Ceraolo Spurio, intel-gfx
Quoting Daniele Ceraolo Spurio (2019-03-22 00:24:31)
> We're already updating the engine_mask to reflect what's in the HW, so
> we can just get the info from there. A couple of macros have been added
> to facilitate this.
>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
> drivers/gpu/drm/i915/intel_device_info.c | 15 ++++++++-------
> drivers/gpu/drm/i915/intel_device_info.h | 4 ----
> 3 files changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index fefcb39aefc4..9d8d423641d2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2440,6 +2440,12 @@ static inline unsigned int i915_sg_segment_size(void)
> #define ALL_ENGINES (~0u)
> #define HAS_ENGINE(dev_priv, id) (INTEL_INFO(dev_priv)->engine_mask & BIT(id))
>
> +#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
> + ((INTEL_INFO(dev_priv)->engine_mask & \
> + GENMASK(first + count - 1, first)) >> first)
Checkpatch complains if we don't wrap everything (inside).
We could even go so far as
({
int first__ = (first);
int count__ = (count);
INTEL_INFO(i915)-engine_mask & GENMASK(first__ + count__ - 1, first__) >> first__;
})
gcc should be smart enough to constant fold that away.
> +#define VDBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VCS0, I915_MAX_VCS);
> +#define VEBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VECS0, I915_MAX_VECS);
> +
> #define HAS_LLC(dev_priv) (INTEL_INFO(dev_priv)->has_llc)
> #define HAS_SNOOP(dev_priv) (INTEL_INFO(dev_priv)->has_snoop)
> #define HAS_EDRAM(dev_priv) (!!((dev_priv)->edram_cap & EDRAM_ENABLED))
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index eddf83807957..74efabd12351 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -871,22 +871,23 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
> unsigned int logical_vdbox = 0;
> unsigned int i;
> u32 media_fuse;
> + u16 vdbox_mask, vebox_mask;
I would put these on separate lines, just to keep the vertical
whitespace clean.
> if (INTEL_GEN(dev_priv) < 11)
> return;
>
> media_fuse = ~I915_READ(GEN11_GT_VEBOX_VDBOX_DISABLE);
>
> - RUNTIME_INFO(dev_priv)->vdbox_enable = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
> - RUNTIME_INFO(dev_priv)->vebox_enable = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
> - GEN11_GT_VEBOX_DISABLE_SHIFT;
> + vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
> + vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
> + GEN11_GT_VEBOX_DISABLE_SHIFT;
>
> - DRM_DEBUG_DRIVER("vdbox enable: %04x\n", RUNTIME_INFO(dev_priv)->vdbox_enable);
> + DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask);
> for (i = 0; i < I915_MAX_VCS; i++) {
> if (!HAS_ENGINE(dev_priv, _VCS(i)))
> continue;
>
> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vdbox_enable)) {
> + if (!(BIT(i) & vdbox_mask)) {
> info->engine_mask &= ~BIT(_VCS(i));
> DRM_DEBUG_DRIVER("vcs%u fused off\n", i);
> continue;
> @@ -900,12 +901,12 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
> RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
> }
>
> - DRM_DEBUG_DRIVER("vebox enable: %04x\n", RUNTIME_INFO(dev_priv)->vebox_enable);
> + DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask);
> for (i = 0; i < I915_MAX_VECS; i++) {
> if (!HAS_ENGINE(dev_priv, _VECS(i)))
> continue;
>
> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vebox_enable)) {
> + if (!(BIT(i) & vebox_mask)) {
> info->engine_mask &= ~BIT(_VECS(i));
> DRM_DEBUG_DRIVER("vecs%u fused off\n", i);
> }
> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
> index 6234570a9b17..06f428c70ff5 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.h
> +++ b/drivers/gpu/drm/i915/intel_device_info.h
> @@ -208,10 +208,6 @@ struct intel_runtime_info {
>
> u32 cs_timestamp_frequency_khz;
>
> - /* Enabled (not fused off) media engine bitmasks. */
> - u8 vdbox_enable;
> - u8 vebox_enable;
> -
> /* Media engine access to SFC per instance */
> u8 vdbox_sfc_access;
Code looks ok, just checkpatch nits
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Michal, as the most likely user, what do you think?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: stop storing the media fuse
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
` (3 preceding siblings ...)
2019-03-22 8:29 ` [PATCH] " Chris Wilson
@ 2019-03-22 9:23 ` Tvrtko Ursulin
2019-03-22 9:27 ` Tvrtko Ursulin
2019-03-22 19:35 ` ✗ Fi.CI.IGT: failure for " Patchwork
5 siblings, 1 reply; 9+ messages in thread
From: Tvrtko Ursulin @ 2019-03-22 9:23 UTC (permalink / raw)
To: Daniele Ceraolo Spurio, intel-gfx
On 22/03/2019 00:24, Daniele Ceraolo Spurio wrote:
> We're already updating the engine_mask to reflect what's in the HW, so
> we can just get the info from there. A couple of macros have been added
> to facilitate this.
>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
> drivers/gpu/drm/i915/intel_device_info.c | 15 ++++++++-------
> drivers/gpu/drm/i915/intel_device_info.h | 4 ----
> 3 files changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index fefcb39aefc4..9d8d423641d2 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2440,6 +2440,12 @@ static inline unsigned int i915_sg_segment_size(void)
> #define ALL_ENGINES (~0u)
> #define HAS_ENGINE(dev_priv, id) (INTEL_INFO(dev_priv)->engine_mask & BIT(id))
>
> +#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
> + ((INTEL_INFO(dev_priv)->engine_mask & \
> + GENMASK(first + count - 1, first)) >> first)
> +#define VDBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VCS0, I915_MAX_VCS);
> +#define VEBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VECS0, I915_MAX_VECS);
Are we confident the existing commentary against enum intel_engine_id
(keep instances of a class together) is enough to keep this working
forevermore or more paranoia could be useful?
Regards,
Tvrtko
> +
> #define HAS_LLC(dev_priv) (INTEL_INFO(dev_priv)->has_llc)
> #define HAS_SNOOP(dev_priv) (INTEL_INFO(dev_priv)->has_snoop)
> #define HAS_EDRAM(dev_priv) (!!((dev_priv)->edram_cap & EDRAM_ENABLED))
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index eddf83807957..74efabd12351 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -871,22 +871,23 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
> unsigned int logical_vdbox = 0;
> unsigned int i;
> u32 media_fuse;
> + u16 vdbox_mask, vebox_mask;
>
> if (INTEL_GEN(dev_priv) < 11)
> return;
>
> media_fuse = ~I915_READ(GEN11_GT_VEBOX_VDBOX_DISABLE);
>
> - RUNTIME_INFO(dev_priv)->vdbox_enable = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
> - RUNTIME_INFO(dev_priv)->vebox_enable = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
> - GEN11_GT_VEBOX_DISABLE_SHIFT;
> + vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
> + vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
> + GEN11_GT_VEBOX_DISABLE_SHIFT;
>
> - DRM_DEBUG_DRIVER("vdbox enable: %04x\n", RUNTIME_INFO(dev_priv)->vdbox_enable);
> + DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask);
> for (i = 0; i < I915_MAX_VCS; i++) {
> if (!HAS_ENGINE(dev_priv, _VCS(i)))
> continue;
>
> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vdbox_enable)) {
> + if (!(BIT(i) & vdbox_mask)) {
> info->engine_mask &= ~BIT(_VCS(i));
> DRM_DEBUG_DRIVER("vcs%u fused off\n", i);
> continue;
> @@ -900,12 +901,12 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
> RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
> }
>
> - DRM_DEBUG_DRIVER("vebox enable: %04x\n", RUNTIME_INFO(dev_priv)->vebox_enable);
> + DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask);
> for (i = 0; i < I915_MAX_VECS; i++) {
> if (!HAS_ENGINE(dev_priv, _VECS(i)))
> continue;
>
> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vebox_enable)) {
> + if (!(BIT(i) & vebox_mask)) {
> info->engine_mask &= ~BIT(_VECS(i));
> DRM_DEBUG_DRIVER("vecs%u fused off\n", i);
> }
> diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h
> index 6234570a9b17..06f428c70ff5 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.h
> +++ b/drivers/gpu/drm/i915/intel_device_info.h
> @@ -208,10 +208,6 @@ struct intel_runtime_info {
>
> u32 cs_timestamp_frequency_khz;
>
> - /* Enabled (not fused off) media engine bitmasks. */
> - u8 vdbox_enable;
> - u8 vebox_enable;
> -
> /* Media engine access to SFC per instance */
> u8 vdbox_sfc_access;
> };
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: stop storing the media fuse
2019-03-22 9:23 ` Tvrtko Ursulin
@ 2019-03-22 9:27 ` Tvrtko Ursulin
0 siblings, 0 replies; 9+ messages in thread
From: Tvrtko Ursulin @ 2019-03-22 9:27 UTC (permalink / raw)
To: Daniele Ceraolo Spurio, intel-gfx
On 22/03/2019 09:23, Tvrtko Ursulin wrote:
>
> On 22/03/2019 00:24, Daniele Ceraolo Spurio wrote:
>> We're already updating the engine_mask to reflect what's in the HW, so
>> we can just get the info from there. A couple of macros have been added
>> to facilitate this.
>>
>> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
>> drivers/gpu/drm/i915/intel_device_info.c | 15 ++++++++-------
>> drivers/gpu/drm/i915/intel_device_info.h | 4 ----
>> 3 files changed, 14 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h
>> b/drivers/gpu/drm/i915/i915_drv.h
>> index fefcb39aefc4..9d8d423641d2 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -2440,6 +2440,12 @@ static inline unsigned int
>> i915_sg_segment_size(void)
>> #define ALL_ENGINES (~0u)
>> #define HAS_ENGINE(dev_priv, id) (INTEL_INFO(dev_priv)->engine_mask
>> & BIT(id))
>> +#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
>> + ((INTEL_INFO(dev_priv)->engine_mask & \
>> + GENMASK(first + count - 1, first)) >> first)
>> +#define VDBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VCS0,
>> I915_MAX_VCS);
>> +#define VEBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VECS0,
>> I915_MAX_VECS);
>
> Are we confident the existing commentary against enum intel_engine_id
> (keep instances of a class together) is enough to keep this working
> forevermore or more paranoia could be useful?
Same actually applies to existing _V(E)CS macros so I guess it is okay.
I would have been quickly notice anyway if unexpected engine went
missing. :)
> Regards,
>
> Tvrtko
>
>> +
>> #define HAS_LLC(dev_priv) (INTEL_INFO(dev_priv)->has_llc)
>> #define HAS_SNOOP(dev_priv) (INTEL_INFO(dev_priv)->has_snoop)
>> #define HAS_EDRAM(dev_priv) (!!((dev_priv)->edram_cap &
>> EDRAM_ENABLED))
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.c
>> b/drivers/gpu/drm/i915/intel_device_info.c
>> index eddf83807957..74efabd12351 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.c
>> +++ b/drivers/gpu/drm/i915/intel_device_info.c
>> @@ -871,22 +871,23 @@ void intel_device_info_init_mmio(struct
>> drm_i915_private *dev_priv)
>> unsigned int logical_vdbox = 0;
>> unsigned int i;
>> u32 media_fuse;
>> + u16 vdbox_mask, vebox_mask;
>> if (INTEL_GEN(dev_priv) < 11)
>> return;
>> media_fuse = ~I915_READ(GEN11_GT_VEBOX_VDBOX_DISABLE);
>> - RUNTIME_INFO(dev_priv)->vdbox_enable = media_fuse &
>> GEN11_GT_VDBOX_DISABLE_MASK;
>> - RUNTIME_INFO(dev_priv)->vebox_enable = (media_fuse &
>> GEN11_GT_VEBOX_DISABLE_MASK) >>
>> - GEN11_GT_VEBOX_DISABLE_SHIFT;
>> + vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
>> + vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
>> + GEN11_GT_VEBOX_DISABLE_SHIFT;
>> - DRM_DEBUG_DRIVER("vdbox enable: %04x\n",
>> RUNTIME_INFO(dev_priv)->vdbox_enable);
>> + DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask);
>> for (i = 0; i < I915_MAX_VCS; i++) {
>> if (!HAS_ENGINE(dev_priv, _VCS(i)))
>> continue;
>> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vdbox_enable)) {
>> + if (!(BIT(i) & vdbox_mask)) {
>> info->engine_mask &= ~BIT(_VCS(i));
>> DRM_DEBUG_DRIVER("vcs%u fused off\n", i);
>> continue;
>> @@ -900,12 +901,12 @@ void intel_device_info_init_mmio(struct
>> drm_i915_private *dev_priv)
>> RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
>> }
>> - DRM_DEBUG_DRIVER("vebox enable: %04x\n",
>> RUNTIME_INFO(dev_priv)->vebox_enable);
>> + DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask);
>> for (i = 0; i < I915_MAX_VECS; i++) {
>> if (!HAS_ENGINE(dev_priv, _VECS(i)))
>> continue;
>> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vebox_enable)) {
>> + if (!(BIT(i) & vebox_mask)) {
>> info->engine_mask &= ~BIT(_VECS(i));
>> DRM_DEBUG_DRIVER("vecs%u fused off\n", i);
>> }
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.h
>> b/drivers/gpu/drm/i915/intel_device_info.h
>> index 6234570a9b17..06f428c70ff5 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.h
>> +++ b/drivers/gpu/drm/i915/intel_device_info.h
>> @@ -208,10 +208,6 @@ struct intel_runtime_info {
>> u32 cs_timestamp_frequency_khz;
>> - /* Enabled (not fused off) media engine bitmasks. */
>> - u8 vdbox_enable;
>> - u8 vebox_enable;
>> -
>> /* Media engine access to SFC per instance */
>> u8 vdbox_sfc_access;
>> };
>>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✗ Fi.CI.IGT: failure for drm/i915: stop storing the media fuse
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
` (4 preceding siblings ...)
2019-03-22 9:23 ` Tvrtko Ursulin
@ 2019-03-22 19:35 ` Patchwork
5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-03-22 19:35 UTC (permalink / raw)
To: Daniele Ceraolo Spurio; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: stop storing the media fuse
URL : https://patchwork.freedesktop.org/series/58387/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_5791_full -> Patchwork_12564_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_12564_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_12564_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_12564_full:
### IGT changes ###
#### Possible regressions ####
* igt@kms_atomic_transition@plane-toggle-modeset-transition:
- shard-iclb: PASS -> INCOMPLETE +1
Known issues
------------
Here are the changes found in Patchwork_12564_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_pwrite@big-cpu-fbr:
- shard-skl: NOTRUN -> SKIP [fdo#109271] +150
* igt@gem_pwrite@stolen-normal:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +21
* igt@gem_stolen@stolen-pwrite:
- shard-iclb: NOTRUN -> SKIP [fdo#109277]
* igt@i915_hangman@error-state-capture-bsd2:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +2
* igt@i915_pm_rpm@system-suspend-modeset:
- shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107807]
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +2
* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-apl: NOTRUN -> DMESG-WARN [fdo#110222]
* igt@kms_busy@extended-modeset-hang-oldfb-render-f:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3
* igt@kms_busy@extended-pageflip-hang-newfb-render-c:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +6
* igt@kms_chamelium@hdmi-hpd-storm:
- shard-iclb: NOTRUN -> SKIP [fdo#109284]
* igt@kms_cursor_legacy@cursora-vs-flipb-varying-size:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +1
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: PASS -> FAIL [fdo#105363]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-apl: PASS -> FAIL [fdo#102887] / [fdo#105363]
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-pwrite:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +36
* igt@kms_frontbuffer_tracking@fbc-indfb-scaledprimary:
- shard-iclb: PASS -> FAIL [fdo#103167] +6
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-iclb: PASS -> FAIL [fdo#103167] / [fdo#105682]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-iclb: PASS -> FAIL [fdo#109247] +26
* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +28
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-wc:
- shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] +1
* igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
- shard-skl: NOTRUN -> FAIL [fdo#105683]
* igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +2
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
- shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +14
* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-skl: NOTRUN -> FAIL [fdo#108145] +3
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-glk: PASS -> FAIL [fdo#108145] +1
* igt@kms_plane_alpha_blend@pipe-c-alpha-basic:
- shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145]
* igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format:
- shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_psr@primary_mmap_cpu:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +4
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: PASS -> SKIP [fdo#109441] +5
* igt@kms_universal_plane@universal-plane-gen9-features-pipe-d:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-apl: PASS -> FAIL [fdo#104894] +2
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-iclb: PASS -> FAIL [fdo#104894]
* igt@perf@unprivileged-single-ctx-counters:
- shard-iclb: NOTRUN -> SKIP [fdo#109289]
#### Possible fixes ####
* igt@gem_tiled_pread_pwrite:
- shard-iclb: TIMEOUT [fdo#109673] -> PASS
* igt@gem_tiled_swapping@non-threaded:
- shard-iclb: DMESG-WARN [fdo#108686] -> PASS
* igt@i915_pm_rpm@i2c:
- shard-iclb: DMESG-WARN [fdo#109982] -> PASS
* igt@i915_suspend@fence-restore-untiled:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS +1
* igt@kms_atomic_transition@1x-modeset-transitions:
- shard-iclb: INCOMPLETE -> PASS
* igt@kms_cursor_legacy@cursor-vs-flip-legacy:
- shard-iclb: FAIL [fdo#103355] -> PASS
* igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
- shard-glk: FAIL [fdo#103060] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +7
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt:
- shard-iclb: FAIL [fdo#109247] -> PASS +13
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: FAIL [fdo#107815] -> PASS
* igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: SKIP [fdo#109441] -> PASS +3
* igt@kms_psr@sprite_mmap_cpu:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS +1
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: FAIL [fdo#109016] -> PASS
* igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS
#### Warnings ####
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: SKIP [fdo#109349] -> FAIL [fdo#109358]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#105683]: https://bugs.freedesktop.org/show_bug.cgi?id=105683
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#107815]: https://bugs.freedesktop.org/show_bug.cgi?id=107815
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109358]: https://bugs.freedesktop.org/show_bug.cgi?id=109358
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
[fdo#109982]: https://bugs.freedesktop.org/show_bug.cgi?id=109982
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
Participating hosts (10 -> 7)
------------------------------
Missing (3): shard-hsw pig-glk-j5005 pig-hsw-4770r
Build changes
-------------
* Linux: CI_DRM_5791 -> Patchwork_12564
CI_DRM_5791: 3b6d09692ea282a3487bdf972a068d312a67ca00 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4897: e12d69496a6bef09ac6c0f792b8d60a65cf5e0bf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12564: de5dfcc93c766c60a78643663d7ef45f96eb6f9a @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12564/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/i915: stop storing the media fuse
2019-03-22 8:29 ` [PATCH] " Chris Wilson
@ 2019-03-25 18:22 ` Michal Wajdeczko
0 siblings, 0 replies; 9+ messages in thread
From: Michal Wajdeczko @ 2019-03-25 18:22 UTC (permalink / raw)
To: Daniele Ceraolo Spurio, intel-gfx, Chris Wilson
On Fri, 22 Mar 2019 09:29:58 +0100, Chris Wilson
<chris@chris-wilson.co.uk> wrote:
> Quoting Daniele Ceraolo Spurio (2019-03-22 00:24:31)
>> We're already updating the engine_mask to reflect what's in the HW, so
>> we can just get the info from there. A couple of macros have been added
>> to facilitate this.
>>
>> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_drv.h | 6 ++++++
>> drivers/gpu/drm/i915/intel_device_info.c | 15 ++++++++-------
>> drivers/gpu/drm/i915/intel_device_info.h | 4 ----
>> 3 files changed, 14 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h
>> b/drivers/gpu/drm/i915/i915_drv.h
>> index fefcb39aefc4..9d8d423641d2 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -2440,6 +2440,12 @@ static inline unsigned int
>> i915_sg_segment_size(void)
>> #define ALL_ENGINES (~0u)
>> #define HAS_ENGINE(dev_priv, id) (INTEL_INFO(dev_priv)->engine_mask &
>> BIT(id))
>>
>> +#define ENGINE_INSTANCES_MASK(dev_priv, first, count) \
>> + ((INTEL_INFO(dev_priv)->engine_mask & \
>> + GENMASK(first + count - 1, first)) >> first)
>
> Checkpatch complains if we don't wrap everything (inside).
>
> We could even go so far as
>
> ({
> int first__ = (first);
> int count__ = (count);
> INTEL_INFO(i915)-engine_mask & GENMASK(first__ + count__ - 1, first__)
> >> first__;
> })
>
> gcc should be smart enough to constant fold that away.
>
>> +#define VDBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VCS0,
>> I915_MAX_VCS);
>> +#define VEBOX_MASK(dev_priv) ENGINE_INSTANCES_MASK(dev_priv, VECS0,
>> I915_MAX_VECS);
>> +
>> #define HAS_LLC(dev_priv) (INTEL_INFO(dev_priv)->has_llc)
>> #define HAS_SNOOP(dev_priv) (INTEL_INFO(dev_priv)->has_snoop)
>> #define HAS_EDRAM(dev_priv) (!!((dev_priv)->edram_cap &
>> EDRAM_ENABLED))
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.c
>> b/drivers/gpu/drm/i915/intel_device_info.c
>> index eddf83807957..74efabd12351 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.c
>> +++ b/drivers/gpu/drm/i915/intel_device_info.c
>> @@ -871,22 +871,23 @@ void intel_device_info_init_mmio(struct
>> drm_i915_private *dev_priv)
>> unsigned int logical_vdbox = 0;
>> unsigned int i;
>> u32 media_fuse;
>> + u16 vdbox_mask, vebox_mask;
>
> I would put these on separate lines, just to keep the vertical
> whitespace clean.
>
>> if (INTEL_GEN(dev_priv) < 11)
>> return;
>>
>> media_fuse = ~I915_READ(GEN11_GT_VEBOX_VDBOX_DISABLE);
>>
>> - RUNTIME_INFO(dev_priv)->vdbox_enable = media_fuse &
>> GEN11_GT_VDBOX_DISABLE_MASK;
>> - RUNTIME_INFO(dev_priv)->vebox_enable = (media_fuse &
>> GEN11_GT_VEBOX_DISABLE_MASK) >>
>> - GEN11_GT_VEBOX_DISABLE_SHIFT;
>> + vdbox_mask = media_fuse & GEN11_GT_VDBOX_DISABLE_MASK;
>> + vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >>
>> + GEN11_GT_VEBOX_DISABLE_SHIFT;
>>
>> - DRM_DEBUG_DRIVER("vdbox enable: %04x\n",
>> RUNTIME_INFO(dev_priv)->vdbox_enable);
>> + DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask);
>> for (i = 0; i < I915_MAX_VCS; i++) {
>> if (!HAS_ENGINE(dev_priv, _VCS(i)))
>> continue;
>>
>> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vdbox_enable)) {
>> + if (!(BIT(i) & vdbox_mask)) {
>> info->engine_mask &= ~BIT(_VCS(i));
>> DRM_DEBUG_DRIVER("vcs%u fused off\n", i);
>> continue;
>> @@ -900,12 +901,12 @@ void intel_device_info_init_mmio(struct
>> drm_i915_private *dev_priv)
>> RUNTIME_INFO(dev_priv)->vdbox_sfc_access |=
>> BIT(i);
>> }
>>
>> - DRM_DEBUG_DRIVER("vebox enable: %04x\n",
>> RUNTIME_INFO(dev_priv)->vebox_enable);
>> + DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask);
>> for (i = 0; i < I915_MAX_VECS; i++) {
>> if (!HAS_ENGINE(dev_priv, _VECS(i)))
>> continue;
>>
>> - if (!(BIT(i) & RUNTIME_INFO(dev_priv)->vebox_enable)) {
>> + if (!(BIT(i) & vebox_mask)) {
>> info->engine_mask &= ~BIT(_VECS(i));
>> DRM_DEBUG_DRIVER("vecs%u fused off\n", i);
>> }
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.h
>> b/drivers/gpu/drm/i915/intel_device_info.h
>> index 6234570a9b17..06f428c70ff5 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.h
>> +++ b/drivers/gpu/drm/i915/intel_device_info.h
>> @@ -208,10 +208,6 @@ struct intel_runtime_info {
>>
>> u32 cs_timestamp_frequency_khz;
>>
>> - /* Enabled (not fused off) media engine bitmasks. */
>> - u8 vdbox_enable;
>> - u8 vebox_enable;
>> -
>> /* Media engine access to SFC per instance */
>> u8 vdbox_sfc_access;
>
> Code looks ok, just checkpatch nits
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Michal, as the most likely user, what do you think?
> -Chris
Can't spot any other nits,
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
~Michal
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-03-25 18:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 0:24 [PATCH] drm/i915: stop storing the media fuse Daniele Ceraolo Spurio
2019-03-22 2:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-22 2:11 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-22 2:29 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-22 8:29 ` [PATCH] " Chris Wilson
2019-03-25 18:22 ` Michal Wajdeczko
2019-03-22 9:23 ` Tvrtko Ursulin
2019-03-22 9:27 ` Tvrtko Ursulin
2019-03-22 19:35 ` ✗ Fi.CI.IGT: failure for " Patchwork
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.