Skip to contentSkip to conversation

drm/i915: Fix logic fumble in rotation vs. ccs check

PATCH In review Ville Syrjala 4 participants 6 messages Sep 18, 2018

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

PATCH 1/1 drm/i915: Fix logic fumble in rotation vs. ccs check

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

Smatch reports:
../drivers/gpu/drm/i915/intel_sprite.c:1192 skl_plane_check_fb() warn: was || intended here instead of &&?

Obviously smatch is correct here since we're trying to check if we're using either of the ccs modifiers. Since we now have is_ccs_modifier() let's use it to fix this.

Cc Dan Carpenter <[email protected]>
Cc José Roberto de Souza <[email protected]>
Fixes e21c2d331018 ("drm/i915: Move skl plane fb related checks into a better place")
---
 drivers/gpu/drm/i915/intel_sprite.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_sprite.c +1 -2
index 8821e59b70ea..d4c8e10fc90b 100644
@@ -1190,8 +1190,7 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
 		return 0;
 
 	if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) &&
-	    (fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS &&
-	     fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS)) {
+	    is_ccs_modifier(fb->modifier)) {
 		DRM_DEBUG_KMS("RC support only with 0/180 degree rotation (%x)\n",
 			      rotation);
 		return -EINVAL;
Signature · 6 lines
2.16.4

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

✓ Fi.CI.BAT: success for drm/i915: Fix logic fumble in rotation vs. ccs check

== Series Details ==

== Series Details ==

Series: drm/i915: Fix logic fumble in rotation vs. ccs check
URL : https://patchwork.freedesktop.org/series/49840/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4836 -> Patchwork_10211 =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_10211 need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10211, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/49840/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_10211:

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rpm@module-reload:
      fi-hsw-4770r:       PASS -> SKIP

== Known issues ==

Here are the changes found in Patchwork_10211 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload-inject:
      fi-hsw-4770r:       PASS -> DMESG-WARN (fdo#107425, fdo#107924)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-hsw-4770r:       PASS -> DMESG-WARN (fdo#105602)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#102614)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-cfl-8109u:       PASS -> INCOMPLETE (fdo#106070)

    igt@kms_psr@primary_page_flip:
      fi-kbl-r:           PASS -> FAIL (fdo#107336)

    
    ==== Possible fixes ====

    igt@drv_getparams_basic@basic-subslice-total:
      fi-snb-2520m:       DMESG-WARN (fdo#103713) -> PASS +9

    igt@drv_module_reload@basic-reload:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@gem_mmap_gtt@basic-read-write:
      fi-glk-dsi:         INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107425 https://bugs.freedesktop.org/show_bug.cgi?id=107425
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107924 https://bugs.freedesktop.org/show_bug.cgi?id=107924
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (47 -> 45) ==

Additional (2): fi-bsw-kefka fi-byt-clapper
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan

== Build changes ==

* Linux: CI_DRM_4836 -> Patchwork_10211

CI_DRM_4836: b2b0444aa439ade1ed809a91a19d382fbb5e7700 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4645: 03b90a39ed12a568c9da752466ea708d6348e110 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10211: 389664ba863f275e33534f165ef6a8b6d7cdb63c @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

389664ba863f drm/i915: Fix logic fumble in rotation vs. ccs check

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10211/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915: Fix logic fumble in rotation vs. ccs check

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: drm/i915: Fix logic fumble in rotation vs. ccs check
URL : https://patchwork.freedesktop.org/series/49840/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4836_full -> Patchwork_10211_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_10211_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10211_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_10211_full:

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          PASS -> SKIP

== Known issues ==

Here are the changes found in Patchwork_10211_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_busy@extended-pageflip-hang-newfb-render-a:
      shard-glk:          PASS -> DMESG-WARN (fdo#107956)

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a:
      shard-apl:          PASS -> DMESG-WARN (fdo#107956)

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-snb:          PASS -> DMESG-WARN (fdo#102365)

    igt@kms_plane@plane-panning-top-left-pipe-c-planes:
      shard-kbl:          PASS -> FAIL (fdo#103166)

    igt@kms_setmode@basic:
      shard-apl:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
      shard-apl:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-indfb-fliptrack:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@pm_rpm@pm-tiling:
      shard-apl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +1

fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4836 -> Patchwork_10211

CI_DRM_4836: b2b0444aa439ade1ed809a91a19d382fbb5e7700 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4645: 03b90a39ed12a568c9da752466ea708d6348e110 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10211: 389664ba863f275e33534f165ef6a8b6d7cdb63c @ 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_10211/shards.html
_______________________________________________
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 Ville Syrjala
Quoted 24 lines · Ville Syrjala

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

Smatch reports:
../drivers/gpu/drm/i915/intel_sprite.c:1192 skl_plane_check_fb() warn: was || intended here instead of &&?

Obviously smatch is correct here since we're trying to check if we're using either of the ccs modifiers. Since we now have is_ccs_modifier() let's use it to fix this.

Cc Dan Carpenter <[email protected]>
Cc José Roberto de Souza <[email protected]>
Fixes e21c2d331018 ("drm/i915: Move skl plane fb related checks into a better place")
---
  drivers/gpu/drm/i915/intel_sprite.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_sprite.c +0 -0
index 8821e59b70ea..d4c8e10fc90b 100644

drivers/gpu/drm/i915/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, · line 1196

Quoted 9 lines
drivers/gpu/drm/i915/intel_sprite.c +1 -2
@@ -1190,8 +1190,7 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
  		return 0;
 
  	if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) &&
-	    (fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS &&
-	     fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS)) {
+	    is_ccs_modifier(fb->modifier)) {
  		DRM_DEBUG_KMS("RC support only with 0/180 degree rotation (%x)\n",
  			      rotation);
  		return -EINVAL;

Just a drive by on a trivial one. :)

Regards,

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

#4 lore raw
Quoted 38 lines · Tvrtko Ursulin
Quoted 24 lines · Ville Syrjala

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

Smatch reports:
../drivers/gpu/drm/i915/intel_sprite.c:1192 skl_plane_check_fb() warn: was || intended here instead of &&?

Obviously smatch is correct here since we're trying to check if we're using either of the ccs modifiers. Since we now have is_ccs_modifier() let's use it to fix this.

Cc Dan Carpenter <[email protected]>
Cc José Roberto de Souza <[email protected]>
Fixes e21c2d331018 ("drm/i915: Move skl plane fb related checks into a better place")
---
  drivers/gpu/drm/i915/intel_sprite.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_sprite.c +0 -0
index 8821e59b70ea..d4c8e10fc90b 100644

drivers/gpu/drm/i915/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, · line 1196

Quoted 9 lines
drivers/gpu/drm/i915/intel_sprite.c +1 -2
@@ -1190,8 +1190,7 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
  		return 0;
 
  	if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) &&
-	    (fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS &&
-	     fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS)) {
+	    is_ccs_modifier(fb->modifier)) {
  		DRM_DEBUG_KMS("RC support only with 0/180 degree rotation (%x)\n",
  			      rotation);
  		return -EINVAL;
Quoted 1 line

Just a drive by on a trivial one. :)

Thanks. Pushed.

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#5 lore raw
In reply to Ville Syrjala
Quoted 11 lines · Ville Syrjala

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

Smatch reports:
../drivers/gpu/drm/i915/intel_sprite.c:1192 skl_plane_check_fb()
warn: was || intended here instead of &&?

Obviously smatch is correct here since we're trying to check if we're using either of the ccs modifiers. Since we now have is_ccs_modifier()
let's use it to fix this.

Quoted 25 lines
Cc Dan Carpenter <[email protected]>
Cc José Roberto de Souza <[email protected]>
Fixes e21c2d331018 ("drm/i915: Move skl plane fb related checks into

a better place")

---
 drivers/gpu/drm/i915/intel_sprite.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_sprite.c +1 -2
index 8821e59b70ea..d4c8e10fc90b 100644
@@ -1190,8 +1190,7 @@ static int skl_plane_check_fb(const struct
 intel_crtc_state *crtc_state,
 		return 0;
 
 	if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) &&
-	    (fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS &&
-	     fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS)) {
+	    is_ccs_modifier(fb->modifier)) {
 		DRM_DEBUG_KMS("RC support only with 0/180 degree
 rotation (%x)\n",

drivers/gpu/drm/i915/intel_sprite.c static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state, · line 1196

Quoted 2 lines
drivers/gpu/drm/i915/intel_sprite.c +0 -0
 			      rotation);
 		return -EINVAL;

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