Skip to contentSkip to conversation

drm/i915: Handle invalid ilk pipe watermarks correctly.

PATCH In review Maarten Lankhorst 3 participants 3 messages Mar 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Handle invalid ilk pipe watermarks correctly.

This function returns an int, but when ilk_validate_pipe_wm fails it returns false, which is 0 (success). As a result invalid watermarks are applied, while they should have been rejected.

Fix this by returning -EINVAL.

Fixes ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
Cc Matt Roper <[email protected]>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index aebb4c37bc39..61dcac9dea37 100644
@@ -2345,7 +2345,7 @@ static int ilk_compute_pipe_wm(struct intel_crtc *intel_crtc,
 		pipe_wm->linetime = hsw_compute_linetime_wm(dev, cstate);
 
 	if (!ilk_validate_pipe_wm(dev, pipe_wm))
-		return false;
+		return -EINVAL;
 
 	ilk_compute_wm_reg_maximums(dev, 1, &max);
 
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: warning for drm/i915: Handle invalid ilk pipe watermarks correctly.

== Series Details ==

== Series Details ==

Series: drm/i915: Handle invalid ilk pipe watermarks correctly.
URL : https://patchwork.freedesktop.org/series/4012/
State : warning

== Summary ==

Series 4012v1 drm/i915: Handle invalid ilk pipe watermarks correctly.
http://patchwork.freedesktop.org/api/1.0/series/4012/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (snb-x220t)
                dmesg-warn -> PASS       (hsw-gt2)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                dmesg-fail -> FAIL       (snb-x220t)
                pass       -> DMESG-WARN (snb-dellxps)
        Subgroup basic-rte:
                pass       -> DMESG-WARN (snb-x220t)
bdw-nuci7        total:169  pass:158  dwarn:0   dfail:0   fail:0   skip:11 
bdw-ultra        total:169  pass:155  dwarn:0   dfail:0   fail:0   skip:14 
bsw-nuc-2        total:169  pass:138  dwarn:0   dfail:0   fail:1   skip:30 
byt-nuc          total:169  pass:144  dwarn:0   dfail:0   fail:0   skip:25 
hsw-brixbox      total:169  pass:154  dwarn:0   dfail:0   fail:0   skip:15 
hsw-gt2          total:169  pass:159  dwarn:0   dfail:0   fail:0   skip:10 
ilk-hp8440p      total:169  pass:118  dwarn:0   dfail:0   fail:1   skip:50 
ivb-t430s        total:169  pass:154  dwarn:0   dfail:0   fail:0   skip:15 
skl-i5k-2        total:169  pass:153  dwarn:0   dfail:0   fail:0   skip:16 
skl-i7k-2        total:169  pass:153  dwarn:0   dfail:0   fail:0   skip:16 
snb-dellxps      total:169  pass:145  dwarn:1   dfail:0   fail:0   skip:23 
snb-x220t        total:169  pass:145  dwarn:1   dfail:0   fail:1   skip:22 

Results at /archive/results/CI_IGT_test/Patchwork_1512/

37415cefa4f17869f5ed40a42dae85f1e6b519be drm-intel-nightly: 2016y-03m-02d-10h-20m-17s UTC integration manifest 72006faaca194501af5da987a3e8142fbd0ef7ac drm/i915: Handle invalid ilk pipe watermarks correctly.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Maarten Lankhorst
Quoted 9 lines · Maarten Lankhorst

This function returns an int, but when ilk_validate_pipe_wm fails it returns false, which is 0 (success). As a result invalid watermarks are applied, while they should have been rejected.

Fix this by returning -EINVAL.

Fixes ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
Cc Matt Roper <[email protected]>
Quoted 20 lines
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
index aebb4c37bc39..61dcac9dea37 100644
@@ -2345,7 +2345,7 @@ static int ilk_compute_pipe_wm(struct intel_crtc *intel_crtc,
 		pipe_wm->linetime = hsw_compute_linetime_wm(dev, cstate);
 
 	if (!ilk_validate_pipe_wm(dev, pipe_wm))
-		return false;
+		return -EINVAL;
 
 	ilk_compute_wm_reg_maximums(dev, 1, &max);
 
Signature · 1 line
2.1.0
Signature · 9 lines
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx