* [PATCH RESEND FOR CI] drm/i915/skl+: Use plane size for relative data rate calculation
@ 2016-04-06 15:26 Matt Roper
2016-04-06 16:06 ` ✗ Fi.CI.BAT: failure for " Patchwork
0 siblings, 1 reply; 3+ messages in thread
From: Matt Roper @ 2016-04-06 15:26 UTC (permalink / raw)
To: intel-gfx
From: "Kumar, Mahesh" <mahesh1.kumar@intel.com>
Use plane size for relative data rate calculation. don't always use
pipe source width & height.
adjust height & width according to rotation.
use plane size for watermark calculations also.
v2: Address Matt's comments.
Use intel_plane_state->visible to avoid divide-by-zero error.
Where FB was present but not visible so causing total data rate to
be zero, hence divide-by-zero.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93917
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94044
Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
This patch is included as part of a couple pending watermark series that are
still under review, but it's an important fix on its own, so we'd like to merge
it early. I reviewed the original patch from Mahesh a while back and have been
keeping it rebased since that time.
drivers/gpu/drm/i915/intel_pm.c | 42 +++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 7fccf3b..521eed4 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2937,25 +2937,28 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
const struct drm_plane_state *pstate,
int y)
{
- struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
+ struct intel_plane_state *intel_pstate = to_intel_plane_state(pstate);
struct drm_framebuffer *fb = pstate->fb;
+ uint32_t width = 0, height = 0;
+
+ width = drm_rect_width(&intel_pstate->src) >> 16;
+ height = drm_rect_height(&intel_pstate->src) >> 16;
+
+ if (intel_rotation_90_or_270(pstate->rotation))
+ swap(width, height);
/* for planar format */
if (fb->pixel_format == DRM_FORMAT_NV12) {
if (y) /* y-plane data rate */
- return intel_crtc->config->pipe_src_w *
- intel_crtc->config->pipe_src_h *
+ return width * height *
drm_format_plane_cpp(fb->pixel_format, 0);
else /* uv-plane data rate */
- return (intel_crtc->config->pipe_src_w/2) *
- (intel_crtc->config->pipe_src_h/2) *
+ return (width / 2) * (height / 2) *
drm_format_plane_cpp(fb->pixel_format, 1);
}
/* for packed formats */
- return intel_crtc->config->pipe_src_w *
- intel_crtc->config->pipe_src_h *
- drm_format_plane_cpp(fb->pixel_format, 0);
+ return width * height * drm_format_plane_cpp(fb->pixel_format, 0);
}
/*
@@ -3034,8 +3037,9 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
struct drm_framebuffer *fb = plane->state->fb;
int id = skl_wm_plane_id(intel_plane);
- if (fb == NULL)
+ if (!to_intel_plane_state(plane->state)->visible)
continue;
+
if (plane->type == DRM_PLANE_TYPE_CURSOR)
continue;
@@ -3061,7 +3065,7 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
uint16_t plane_blocks, y_plane_blocks = 0;
int id = skl_wm_plane_id(intel_plane);
- if (pstate->fb == NULL)
+ if (!to_intel_plane_state(pstate)->visible)
continue;
if (plane->type == DRM_PLANE_TYPE_CURSOR)
continue;
@@ -3184,26 +3188,36 @@ static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
{
struct drm_plane *plane = &intel_plane->base;
struct drm_framebuffer *fb = plane->state->fb;
+ struct intel_plane_state *intel_pstate =
+ to_intel_plane_state(plane->state);
uint32_t latency = dev_priv->wm.skl_latency[level];
uint32_t method1, method2;
uint32_t plane_bytes_per_line, plane_blocks_per_line;
uint32_t res_blocks, res_lines;
uint32_t selected_result;
uint8_t cpp;
+ uint32_t width = 0, height = 0;
- if (latency == 0 || !cstate->base.active || !fb)
+ if (latency == 0 || !cstate->base.active || !intel_pstate->visible)
return false;
+ width = drm_rect_width(&intel_pstate->src) >> 16;
+ height = drm_rect_height(&intel_pstate->src) >> 16;
+
+ if (intel_rotation_90_or_270(plane->state->rotation))
+ swap(width, height);
+
cpp = drm_format_plane_cpp(fb->pixel_format, 0);
method1 = skl_wm_method1(skl_pipe_pixel_rate(cstate),
cpp, latency);
method2 = skl_wm_method2(skl_pipe_pixel_rate(cstate),
cstate->base.adjusted_mode.crtc_htotal,
- cstate->pipe_src_w,
- cpp, fb->modifier[0],
+ width,
+ cpp,
+ fb->modifier[0],
latency);
- plane_bytes_per_line = cstate->pipe_src_w * cpp;
+ plane_bytes_per_line = width * cpp;
plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512);
if (fb->modifier[0] == I915_FORMAT_MOD_Y_TILED ||
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/skl+: Use plane size for relative data rate calculation
2016-04-06 15:26 [PATCH RESEND FOR CI] drm/i915/skl+: Use plane size for relative data rate calculation Matt Roper
@ 2016-04-06 16:06 ` Patchwork
2016-04-06 18:03 ` Matt Roper
0 siblings, 1 reply; 3+ messages in thread
From: Patchwork @ 2016-04-06 16:06 UTC (permalink / raw)
To: Matt Roper; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/skl+: Use plane size for relative data rate calculation
URL : https://patchwork.freedesktop.org/series/5376/
State : failure
== Summary ==
Series 5376v1 drm/i915/skl+: Use plane size for relative data rate calculation
http://patchwork.freedesktop.org/api/1.0/series/5376/revisions/1/mbox/
Test drv_module_reload_basic:
dmesg-warn -> PASS (bsw-nuc-2)
Test gem_ctx_param_basic:
Subgroup invalid-ctx-set:
dmesg-warn -> PASS (bsw-nuc-2)
Subgroup invalid-size-get:
pass -> DMESG-WARN (bsw-nuc-2)
Test gem_ctx_switch:
Subgroup basic-default:
pass -> DMESG-FAIL (bsw-nuc-2)
Test gem_storedw_loop:
Subgroup basic-blt:
dmesg-fail -> PASS (bsw-nuc-2)
Subgroup basic-bsd:
skip -> PASS (bsw-nuc-2)
Test kms_addfb_basic:
Subgroup bad-pitch-128:
dmesg-warn -> PASS (bsw-nuc-2)
Test kms_flip:
Subgroup basic-flip-vs-dpms:
dmesg-warn -> PASS (bsw-nuc-2)
pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Subgroup basic-flip-vs-modeset:
dmesg-warn -> PASS (ilk-hp8440p) UNSTABLE
Test kms_force_connector_basic:
Subgroup force-edid:
pass -> SKIP (ivb-t430s)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (hsw-gt2)
bdw-nuci7 total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12
bdw-ultra total:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21
bsw-nuc-2 total:196 pass:157 dwarn:1 dfail:1 fail:0 skip:37
byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35
hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22
hsw-gt2 total:196 pass:179 dwarn:0 dfail:0 fail:0 skip:17
ilk-hp8440p total:196 pass:131 dwarn:1 dfail:0 fail:0 skip:64
ivb-t430s total:196 pass:170 dwarn:0 dfail:0 fail:0 skip:26
skl-i7k-2 total:196 pass:173 dwarn:0 dfail:0 fail:0 skip:23
skl-nuci5 total:196 pass:185 dwarn:0 dfail:0 fail:0 skip:11
snb-dellxps total:196 pass:162 dwarn:0 dfail:0 fail:0 skip:34
snb-x220t total:196 pass:162 dwarn:0 dfail:0 fail:1 skip:33
Results at /archive/results/CI_IGT_test/Patchwork_1818/
ab13a48af1102b84bdb8dcdfbef1b5b44fab8d3d drm-intel-nightly: 2016y-04m-06d-11h-23m-30s UTC integration manifest
278a2dfb05bef0627573d0eb98e89f0cbef7d3b5 drm/i915/skl+: Use plane size for relative data rate calculation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ✗ Fi.CI.BAT: failure for drm/i915/skl+: Use plane size for relative data rate calculation
2016-04-06 16:06 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2016-04-06 18:03 ` Matt Roper
0 siblings, 0 replies; 3+ messages in thread
From: Matt Roper @ 2016-04-06 18:03 UTC (permalink / raw)
To: intel-gfx
On Wed, Apr 06, 2016 at 04:06:36PM +0000, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915/skl+: Use plane size for relative data rate calculation
> URL : https://patchwork.freedesktop.org/series/5376/
> State : failure
>
> == Summary ==
>
> Series 5376v1 drm/i915/skl+: Use plane size for relative data rate calculation
> http://patchwork.freedesktop.org/api/1.0/series/5376/revisions/1/mbox/
>
> Test drv_module_reload_basic:
> dmesg-warn -> PASS (bsw-nuc-2)
> Test gem_ctx_param_basic:
> Subgroup invalid-ctx-set:
> dmesg-warn -> PASS (bsw-nuc-2)
> Subgroup invalid-size-get:
> pass -> DMESG-WARN (bsw-nuc-2)
> Test gem_ctx_switch:
> Subgroup basic-default:
> pass -> DMESG-FAIL (bsw-nuc-2)
Both are
https://bugs.freedesktop.org/show_bug.cgi?id=94584
> Test gem_storedw_loop:
> Subgroup basic-blt:
> dmesg-fail -> PASS (bsw-nuc-2)
> Subgroup basic-bsd:
> skip -> PASS (bsw-nuc-2)
> Test kms_addfb_basic:
> Subgroup bad-pitch-128:
> dmesg-warn -> PASS (bsw-nuc-2)
> Test kms_flip:
> Subgroup basic-flip-vs-dpms:
> dmesg-warn -> PASS (bsw-nuc-2)
> pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
https://bugs.freedesktop.org/show_bug.cgi?id=93787
> Subgroup basic-flip-vs-modeset:
> dmesg-warn -> PASS (ilk-hp8440p) UNSTABLE
> Test kms_force_connector_basic:
> Subgroup force-edid:
> pass -> SKIP (ivb-t430s)
> Test kms_pipe_crc_basic:
> Subgroup suspend-read-crc-pipe-b:
> incomplete -> PASS (hsw-gt2)
>
> bdw-nuci7 total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12
> bdw-ultra total:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21
> bsw-nuc-2 total:196 pass:157 dwarn:1 dfail:1 fail:0 skip:37
> byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35
> hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22
> hsw-gt2 total:196 pass:179 dwarn:0 dfail:0 fail:0 skip:17
> ilk-hp8440p total:196 pass:131 dwarn:1 dfail:0 fail:0 skip:64
> ivb-t430s total:196 pass:170 dwarn:0 dfail:0 fail:0 skip:26
> skl-i7k-2 total:196 pass:173 dwarn:0 dfail:0 fail:0 skip:23
> skl-nuci5 total:196 pass:185 dwarn:0 dfail:0 fail:0 skip:11
> snb-dellxps total:196 pass:162 dwarn:0 dfail:0 fail:0 skip:34
> snb-x220t total:196 pass:162 dwarn:0 dfail:0 fail:1 skip:33
>
> Results at /archive/results/CI_IGT_test/Patchwork_1818/
>
> ab13a48af1102b84bdb8dcdfbef1b5b44fab8d3d drm-intel-nightly: 2016y-04m-06d-11h-23m-30s UTC integration manifest
> 278a2dfb05bef0627573d0eb98e89f0cbef7d3b5 drm/i915/skl+: Use plane size for relative data rate calculation
>
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-06 18:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 15:26 [PATCH RESEND FOR CI] drm/i915/skl+: Use plane size for relative data rate calculation Matt Roper
2016-04-06 16:06 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-04-06 18:03 ` Matt Roper
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.