* [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
@ 2018-04-06 20:53 José Roberto de Souza
0 siblings, 0 replies; 7+ messages in thread
From: José Roberto de Souza @ 2018-04-06 20:53 UTC (permalink / raw)
To: intel-gfx
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
drivers/gpu/drm/i915/intel_fbc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 707d49c12638..573b034a02fd 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -714,7 +714,14 @@ static bool intel_fbc_hw_tracking_covers_screen(struct intel_crtc *crtc)
struct intel_fbc *fbc = &dev_priv->fbc;
unsigned int effective_w, effective_h, max_w, max_h;
- if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) {
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) {
+ max_w = 5120;
+ /* BSpec: 21664 WA: 1109 */
+ if (IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_A0))
+ max_h = 4092;
+ else
+ max_h = 4096;
+ } else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) {
max_w = 4096;
max_h = 4096;
} else if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) {
--
2.17.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
@ 2018-06-21 0:08 José Roberto de Souza
2018-06-21 0:08 ` [PATCH 2/2] drm/i915/fbc: Resize CFB in non-full modeset paths José Roberto de Souza
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: José Roberto de Souza @ 2018-06-21 0:08 UTC (permalink / raw)
To: intel-gfx
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
drivers/gpu/drm/i915/intel_fbc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index b431b6733cc1..eb0f95390968 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -714,7 +714,10 @@ static bool intel_fbc_hw_tracking_covers_screen(struct intel_crtc *crtc)
struct intel_fbc *fbc = &dev_priv->fbc;
unsigned int effective_w, effective_h, max_w, max_h;
- if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) {
+ if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) {
+ max_w = 5120;
+ max_h = 4096;
+ } else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) {
max_w = 4096;
max_h = 4096;
} else if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) {
--
2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] drm/i915/fbc: Resize CFB in non-full modeset paths
2018-06-21 0:08 [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size José Roberto de Souza
@ 2018-06-21 0:08 ` José Roberto de Souza
2018-06-21 0:14 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size Patchwork
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: José Roberto de Souza @ 2018-06-21 0:08 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni
A simple page flip can cause the CFB required size to increase and
if it is bigger than the currently allocated CFB it needs to be
resized to activate FBC again.
Until now this case was not being handled but CI is starting to
get some of this errors.
So here it will free the old CFB and try to allocate the required
CFB in the schedule activation work, it will happen after one vblank
so is guarantee that FBC was completed disabled and is not using CFB.
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105683
---
drivers/gpu/drm/i915/i915_drv.h | 2 ++
drivers/gpu/drm/i915/intel_fbc.c | 45 ++++++++++++++++++++------------
2 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 735f695cb889..5a5c3b9e421e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -586,6 +586,8 @@ struct intel_fbc {
} work;
const char *no_fbc_reason;
+
+ bool cfb_try_resize;
};
/*
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index eb0f95390968..62f0c99d45c2 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -41,6 +41,9 @@
#include "intel_drv.h"
#include "i915_drv.h"
+static void __intel_fbc_cleanup_cfb(struct drm_i915_private *dev_priv);
+static int intel_fbc_alloc_cfb(struct intel_crtc *crtc);
+
static inline bool fbc_supported(struct drm_i915_private *dev_priv)
{
return HAS_FBC(dev_priv);
@@ -446,6 +449,15 @@ static void intel_fbc_work_fn(struct work_struct *__work)
goto retry;
}
+ if (fbc->cfb_try_resize) {
+ fbc->cfb_try_resize = false;
+ __intel_fbc_cleanup_cfb(dev_priv);
+ if (intel_fbc_alloc_cfb(crtc)) {
+ fbc->no_fbc_reason = "not enough stolen memory";
+ goto out;
+ }
+ }
+
intel_fbc_hw_activate(dev_priv);
work->scheduled = false;
@@ -846,22 +858,6 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
return false;
}
- /* It is possible for the required CFB size change without a
- * crtc->disable + crtc->enable since it is possible to change the
- * stride without triggering a full modeset. Since we try to
- * over-allocate the CFB, there's a chance we may keep FBC enabled even
- * if this happens, but if we exceed the current CFB size we'll have to
- * disable FBC. Notice that it would be possible to disable FBC, wait
- * for a frame, free the stolen node, then try to reenable FBC in case
- * we didn't get any invalidate/deactivate calls, but this would require
- * a lot of tracking just for a specific case. If we conclude it's an
- * important case, we can implement it later. */
- if (intel_fbc_calculate_cfb_size(dev_priv, &fbc->state_cache) >
- fbc->compressed_fb.size * fbc->threshold) {
- fbc->no_fbc_reason = "CFB requirements changed";
- return false;
- }
-
/*
* Work around a problem on GEN9+ HW, where enabling FBC on a plane
* having a Y offset that isn't divisible by 4 causes FIFO underrun
@@ -873,6 +869,22 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
return false;
}
+ if (!drm_mm_node_allocated(&fbc->compressed_fb))
+ return false;
+
+ /* It is possible for the required CFB size change without a
+ * crtc->disable + crtc->enable since it is possible to change the
+ * stride without triggering a full modeset. Since we try to
+ * over-allocate the CFB, there's a chance we may keep FBC enabled even
+ * if this happens, but if we exceed the current CFB size we'll have to
+ * resize CFB.
+ */
+ if (intel_fbc_calculate_cfb_size(dev_priv, &fbc->state_cache) >
+ (fbc->compressed_fb.size * fbc->threshold)) {
+ fbc->cfb_try_resize = true;
+ DRM_DEBUG_KMS("CFB memory requirements have changed");
+ }
+
return true;
}
@@ -1204,6 +1216,7 @@ void intel_fbc_enable(struct intel_crtc *crtc,
fbc->enabled = true;
fbc->crtc = crtc;
+ fbc->cfb_try_resize = false;
out:
mutex_unlock(&fbc->lock);
}
--
2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
2018-06-21 0:08 [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size José Roberto de Souza
2018-06-21 0:08 ` [PATCH 2/2] drm/i915/fbc: Resize CFB in non-full modeset paths José Roberto de Souza
@ 2018-06-21 0:14 ` Patchwork
2018-06-21 0:31 ` ✓ Fi.CI.BAT: success " Patchwork
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-06-21 0:14 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
URL : https://patchwork.freedesktop.org/series/45129/
State : warning
== Summary ==
$ dim sparse origin/drm-tip
Commit: drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
Okay!
Commit: drm/i915/fbc: Resize CFB in non-full modeset paths
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3690:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3692: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] 7+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
2018-06-21 0:08 [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size José Roberto de Souza
2018-06-21 0:08 ` [PATCH 2/2] drm/i915/fbc: Resize CFB in non-full modeset paths José Roberto de Souza
2018-06-21 0:14 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size Patchwork
@ 2018-06-21 0:31 ` Patchwork
2018-06-21 8:08 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-21 8:57 ` [PATCH 1/2] " Jani Nikula
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-06-21 0:31 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
URL : https://patchwork.freedesktop.org/series/45129/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4355 -> Patchwork_9376 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/45129/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9376 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
==== Possible fixes ====
igt@gem_ctx_create@basic-files:
fi-skl-gvtdvm: INCOMPLETE (fdo#105600) -> PASS
igt@gem_exec_gttfill@basic:
fi-byt-n2820: FAIL (fdo#106744) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-skl-6260u: INCOMPLETE (fdo#104108) -> PASS
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744
== Participating hosts (44 -> 37) ==
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-glk-dsi fi-bsw-cyan fi-ctg-p8600 fi-kbl-x1275
== Build changes ==
* Linux: CI_DRM_4355 -> Patchwork_9376
CI_DRM_4355: 790b4a0a01ea9d0ce73bc8f5b3f4e7b3f9a703b1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4527: 04afec3ccfcb35e994f2e78254ff499f6b94f097 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9376: 1731b40e13ccd39106b8842f467832717d1f3554 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
1731b40e13cc drm/i915/fbc: Resize CFB in non-full modeset paths
19d0c5d7fa54 drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9376/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
2018-06-21 0:08 [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size José Roberto de Souza
` (2 preceding siblings ...)
2018-06-21 0:31 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-06-21 8:08 ` Patchwork
2018-06-21 8:57 ` [PATCH 1/2] " Jani Nikula
4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-06-21 8:08 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
URL : https://patchwork.freedesktop.org/series/45129/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4355_full -> Patchwork_9376_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9376_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_9376_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_9376_full:
=== IGT changes ===
==== Warnings ====
igt@gem_mocs_settings@mocs-rc6-blt:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in Patchwork_9376_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_gtt:
shard-kbl: PASS -> FAIL (fdo#105347)
shard-glk: PASS -> FAIL (fdo#105347)
igt@drv_selftest@live_hugepages:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
igt@kms_flip@plain-flip-fb-recreate:
shard-hsw: PASS -> FAIL (fdo#100368)
igt@kms_flip_tiling@flip-to-x-tiled:
shard-glk: PASS -> FAIL (fdo#103822, fdo#104724)
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
shard-apl: DMESG-FAIL (fdo#106947, fdo#106560) -> PASS
igt@kms_flip@plain-flip-fb-recreate:
shard-glk: FAIL (fdo#100368) -> PASS
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: FAIL (fdo#103822, fdo#104724) -> PASS
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: FAIL (fdo#104724) -> PASS +1
igt@kms_setmode@basic:
shard-kbl: FAIL (fdo#99912) -> PASS
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 5) ==
Missing (1): pig-skl-6260u
== Build changes ==
* Linux: CI_DRM_4355 -> Patchwork_9376
CI_DRM_4355: 790b4a0a01ea9d0ce73bc8f5b3f4e7b3f9a703b1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4527: 04afec3ccfcb35e994f2e78254ff499f6b94f097 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9376: 1731b40e13ccd39106b8842f467832717d1f3554 @ 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_9376/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size
2018-06-21 0:08 [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size José Roberto de Souza
` (3 preceding siblings ...)
2018-06-21 8:08 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-06-21 8:57 ` Jani Nikula
4 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2018-06-21 8:57 UTC (permalink / raw)
To: José Roberto de Souza, intel-gfx
On Wed, 20 Jun 2018, José Roberto de Souza <jose.souza@intel.com> wrote:
Please add a commit message, always.
Please make the subject prefix just "drm/i915/fbc" because cnl is
misleading there.
BR,
Jani.
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
> drivers/gpu/drm/i915/intel_fbc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
> index b431b6733cc1..eb0f95390968 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -714,7 +714,10 @@ static bool intel_fbc_hw_tracking_covers_screen(struct intel_crtc *crtc)
> struct intel_fbc *fbc = &dev_priv->fbc;
> unsigned int effective_w, effective_h, max_w, max_h;
>
> - if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) {
> + if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) {
> + max_w = 5120;
> + max_h = 4096;
> + } else if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) {
> max_w = 4096;
> max_h = 4096;
> } else if (IS_G4X(dev_priv) || INTEL_GEN(dev_priv) >= 5) {
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-06-21 8:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21 0:08 [PATCH 1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size José Roberto de Souza
2018-06-21 0:08 ` [PATCH 2/2] drm/i915/fbc: Resize CFB in non-full modeset paths José Roberto de Souza
2018-06-21 0:14 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/fbc/cnl: Add GLK and CNL+ hardware tracking size Patchwork
2018-06-21 0:31 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-21 8:08 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-21 8:57 ` [PATCH 1/2] " Jani Nikula
-- strict thread matches above, loose matches on Subject: below --
2018-04-06 20:53 José Roberto de Souza
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.