Skip to contentSkip to conversation

drm/i915: Warn about aux msg buffer vs. size mismatch

PATCH In review [email protected] 3 participants 5 messages Jul 28, 2016 – Aug 2, 2016

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

PATCH 1/1 drm/i915: Warn about aux msg buffer vs. size mismatch

From: Ville Syrjälä <[email protected]>

If we have have a buffer, we should also have a size, and vice versa. Let's check it both ways instead of just one.

---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +2 -2
index 21b04c3eda41..001f74fc0ce5 100644
@@ -1041,10 +1041,10 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 		if (WARN_ON(txsize > 20))
 			return -E2BIG;
 
+		WARN_ON(!msg->buffer != !msg->size);
+
 		if (msg->buffer)
 			memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
-		else
-			WARN_ON(msg->size);
 
 		ret = intel_dp_aux_ch(intel_dp, txbuf, txsize, rxbuf, rxsize);
 		if (ret > 0) {
Signature · 6 lines
2.7.4

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

✗ Ro.CI.BAT: failure for drm/i915: Warn about aux msg buffer vs. size mismatch

== Series Details ==

== Series Details ==

Series: drm/i915: Warn about aux msg buffer vs. size mismatch
URL : https://patchwork.freedesktop.org/series/10356/
State : failure

== Summary ==

Series 10356v1 drm/i915: Warn about aux msg buffer vs. size mismatch
http://patchwork.freedesktop.org/api/1.0/series/10356/revisions/1/mbox

Test drv_module_reload_basic:

                skip       -> PASS       (ro-ivb-i7-3770)
                skip       -> PASS       (ro-skl3-i5-6260u)
Test kms_cursor_legacy:
        Subgroup basic-cursor-vs-flip-legacy:
                fail       -> PASS       (ro-ilk1-i5-650)
        Subgroup basic-cursor-vs-flip-varying-size:
                pass       -> FAIL       (ro-ilk1-i5-650)
        Subgroup basic-flip-vs-cursor-legacy:
                fail       -> PASS       (fi-skl-i7-6700k)
        Subgroup basic-flip-vs-cursor-varying-size:
                fail       -> PASS       (ro-snb-i7-2620M)
                pass       -> FAIL       (ro-bdw-i5-5250u)
fi-hsw-i7-4770k  total:239  pass:217  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-qkkr      total:239  pass:180  dwarn:29  dfail:0   fail:3   skip:27 
fi-skl-i7-6700k  total:239  pass:208  dwarn:0   dfail:0   fail:3   skip:28 
fi-snb-i7-2600   total:239  pass:197  dwarn:0   dfail:0   fail:0   skip:42 
ro-bdw-i5-5250u  total:239  pass:218  dwarn:4   dfail:0   fail:1   skip:16 
ro-bdw-i7-5600u  total:239  pass:206  dwarn:0   dfail:0   fail:1   skip:32 
ro-bsw-n3050     total:239  pass:193  dwarn:0   dfail:0   fail:4   skip:42 
ro-byt-n2820     total:239  pass:195  dwarn:0   dfail:0   fail:4   skip:40 
ro-hsw-i7-4770r  total:239  pass:213  dwarn:0   dfail:0   fail:0   skip:26 
ro-ilk1-i5-650   total:234  pass:172  dwarn:0   dfail:0   fail:2   skip:60 
ro-ivb-i7-3770   total:239  pass:204  dwarn:0   dfail:0   fail:0   skip:35 
ro-ivb2-i7-3770  total:239  pass:208  dwarn:0   dfail:0   fail:0   skip:31 
ro-skl3-i5-6260u total:239  pass:221  dwarn:0   dfail:0   fail:4   skip:14 
ro-snb-i7-2620M  total:239  pass:197  dwarn:0   dfail:0   fail:1   skip:41 

fi-skl-i5-6260u failed to connect after reboot
ro-bdw-i7-5557U failed to connect after reboot
ro-ilk-i7-620lm failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1632/

cb7629d drm-intel-nightly: 2016y-07m-28d-11h-02m-33s UTC integration manifest cc80144 drm/i915: Warn about aux msg buffer vs. size mismatch

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

#2 lore raw

Re: ✗ Ro.CI.BAT: failure for drm/i915: Warn about aux msg buffer vs. size mismatch

Quoted 11 lines · Patchwork

== Series Details ==

Series: drm/i915: Warn about aux msg buffer vs. size mismatch
URL : https://patchwork.freedesktop.org/series/10356/
State : failure

== Summary ==

Series 10356v1 drm/i915: Warn about aux msg buffer vs. size mismatch
http://patchwork.freedesktop.org/api/1.0/series/10356/revisions/1/mbox

Quoted 8 lines

Test drv_module_reload_basic:

                skip       -> PASS       (ro-ivb-i7-3770)
                skip       -> PASS       (ro-skl3-i5-6260u)
Test kms_cursor_legacy:
        Subgroup basic-cursor-vs-flip-legacy:
                fail       -> PASS       (ro-ilk1-i5-650)
        Subgroup basic-cursor-vs-flip-varying-size:
                pass       -> FAIL       (ro-ilk1-i5-650)

(kms_cursor_legacy:7977) DEBUG: Test requirement passed: target > 1
(kms_cursor_legacy:7977) DEBUG: Using a target of 32 cursor updates per half-vblank (kms_cursor_legacy:7977) WARNING: page flip 0 was delayed, missed 1 frames
(kms_cursor_legacy:7977) CRITICAL: Test assertion failure function basic_cursor_vs_flip, file kms_cursor_legacy.c:670:
(kms_cursor_legacy:7977) CRITICAL: Failed assertion: vbl.sequence == vblank_start + 60 (kms_cursor_legacy:7977) CRITICAL: error: 11594 != 11593

https://bugs.freedesktop.org/show_bug.cgi?id=96701

Quoted 5 lines
        Subgroup basic-flip-vs-cursor-legacy:
                fail       -> PASS       (fi-skl-i7-6700k)
        Subgroup basic-flip-vs-cursor-varying-size:
                fail       -> PASS       (ro-snb-i7-2620M)
                pass       -> FAIL       (ro-bdw-i5-5250u)

(kms_cursor_legacy:8640) DEBUG: Test requirement passed: target > 1
(kms_cursor_legacy:8640) DEBUG: Using a target of 64 cursor updates per half-vblank (kms_cursor_legacy:8640) CRITICAL: Test assertion failure function basic_flip_vs_cursor, file kms_cursor_legacy.c:514:
(kms_cursor_legacy:8640) CRITICAL: Failed assertion: get_vblank(display->drm_fd, pipe, 0) == vblank_start (kms_cursor_legacy:8640) CRITICAL: error: 12134 != 12133

https://bugs.freedesktop.org/show_bug.cgi?id=97188

Quoted 22 lines
fi-hsw-i7-4770k  total:239  pass:217  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-qkkr      total:239  pass:180  dwarn:29  dfail:0   fail:3   skip:27 
fi-skl-i7-6700k  total:239  pass:208  dwarn:0   dfail:0   fail:3   skip:28 
fi-snb-i7-2600   total:239  pass:197  dwarn:0   dfail:0   fail:0   skip:42 
ro-bdw-i5-5250u  total:239  pass:218  dwarn:4   dfail:0   fail:1   skip:16 
ro-bdw-i7-5600u  total:239  pass:206  dwarn:0   dfail:0   fail:1   skip:32 
ro-bsw-n3050     total:239  pass:193  dwarn:0   dfail:0   fail:4   skip:42 
ro-byt-n2820     total:239  pass:195  dwarn:0   dfail:0   fail:4   skip:40 
ro-hsw-i7-4770r  total:239  pass:213  dwarn:0   dfail:0   fail:0   skip:26 
ro-ilk1-i5-650   total:234  pass:172  dwarn:0   dfail:0   fail:2   skip:60 
ro-ivb-i7-3770   total:239  pass:204  dwarn:0   dfail:0   fail:0   skip:35 
ro-ivb2-i7-3770  total:239  pass:208  dwarn:0   dfail:0   fail:0   skip:31 
ro-skl3-i5-6260u total:239  pass:221  dwarn:0   dfail:0   fail:4   skip:14 
ro-snb-i7-2620M  total:239  pass:197  dwarn:0   dfail:0   fail:1   skip:41 

fi-skl-i5-6260u failed to connect after reboot
ro-bdw-i7-5557U failed to connect after reboot
ro-ilk-i7-620lm failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1632/

cb7629d drm-intel-nightly: 2016y-07m-28d-11h-02m-33s UTC integration manifest cc80144 drm/i915: Warn about aux msg buffer vs. size mismatch

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]
Quoted 6 lines · On Thu, Jul 28, 2016 at 05:55:04PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If we have have a buffer, we should also have a size, and vice versa. Let's check it both ways instead of just one.

Quoted 28 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +2 -2
index 21b04c3eda41..001f74fc0ce5 100644
@@ -1041,10 +1041,10 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 		if (WARN_ON(txsize > 20))
 			return -E2BIG;
 
+		WARN_ON(!msg->buffer != !msg->size);
+
 		if (msg->buffer)
 			memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
-		else
-			WARN_ON(msg->size);
 
 		ret = intel_dp_aux_ch(intel_dp, txbuf, txsize, rxbuf, rxsize);
 		if (ret > 0) {
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author Applied
#4 lore raw
Quoted 9 lines · Daniel Vetter
Quoted 6 lines · On Thu, Jul 28, 2016 at 05:55:04PM +0300, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

If we have have a buffer, we should also have a size, and vice versa. Let's check it both ways instead of just one.

Pushed to dinq. Thanks for the review.

Quoted 33 lines
Quoted 28 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +2 -2
index 21b04c3eda41..001f74fc0ce5 100644
@@ -1041,10 +1041,10 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 		if (WARN_ON(txsize > 20))
 			return -E2BIG;
 
+		WARN_ON(!msg->buffer != !msg->size);
+
 		if (msg->buffer)
 			memcpy(txbuf + HEADER_SIZE, msg->buffer, msg->size);
-		else
-			WARN_ON(msg->size);
 
 		ret = intel_dp_aux_ch(intel_dp, txbuf, txsize, rxbuf, rxsize);
 		if (ret > 0) {
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx