All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed
@ 2018-10-11 22:17 sunpeng.li
  2018-10-11 22:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sunpeng.li @ 2018-10-11 22:17 UTC (permalink / raw)
  To: igt-dev

From: Leo Li <sunpeng.li@amd.com>

AMDGPU doesn't have modifier support. However, __kms_addfb requests
modifier support on all calls to igt_create_fb_with_bo_size.

Therefore, don't request modifier support if not needed.

Signed-off-by: Leo Li <sunpeng.li@amd.com>
---
 lib/igt_fb.c         | 8 +++++++-
 lib/ioctl_wrappers.c | 3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 35be2e8..3253236 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -913,6 +913,12 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 	/* FIXME allow the caller to pass these in */
 	enum igt_color_encoding color_encoding = IGT_COLOR_YCBCR_BT709;
 	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
+	uint32_t flags = 0;
+
+	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
+	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED)
+		flags = LOCAL_DRM_MODE_FB_MODIFIERS;
+
 
 	fb_init(fb, fd, width, height, format, tiling,
 		color_encoding, color_range);
@@ -935,7 +941,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
 			      fb->width, fb->height,
 			      fb->drm_format, fb->tiling,
 			      fb->strides, fb->offsets, fb->num_planes,
-			      LOCAL_DRM_MODE_FB_MODIFIERS,
+			      flags,
 			      &fb->fb_id));
 
 	return fb->fb_id;
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 0929c43..017314a 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1678,7 +1678,8 @@ int __kms_addfb(int fd, uint32_t handle,
 	struct drm_mode_fb_cmd2 f;
 	int ret, i;
 
-	igt_require_fb_modifiers(fd);
+	if (modifier)
+		igt_require_fb_modifiers(fd);
 
 	memset(&f, 0, sizeof(f));
 
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for lib/igt_fb: Require FB modifiers only when needed
  2018-10-11 22:17 [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed sunpeng.li
@ 2018-10-11 22:54 ` Patchwork
  2018-10-12 12:17 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
  2018-10-12 13:03 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-10-11 22:54 UTC (permalink / raw)
  To: sunpeng.li; +Cc: igt-dev

== Series Details ==

Series: lib/igt_fb: Require FB modifiers only when needed
URL   : https://patchwork.freedesktop.org/series/50887/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4973 -> IGTPW_1943 =

== Summary - FAILURE ==

  Serious unknown changes coming with IGTPW_1943 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1943, 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/50887/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_hangcheck:
      fi-icl-u2:          PASS -> INCOMPLETE

    igt@kms_busy@basic-flip-a:
      fi-kbl-7567u:       PASS -> FAIL +3
      fi-whl-u:           PASS -> FAIL +7
      fi-skl-6700k2:      PASS -> FAIL +3
      fi-elk-e7500:       PASS -> FAIL +1
      fi-skl-iommu:       PASS -> FAIL +3
      fi-skl-6260u:       PASS -> FAIL +3
      fi-bdw-gvtdvm:      PASS -> FAIL +3
      fi-gdg-551:         NOTRUN -> FAIL +1
      fi-bwr-2160:        PASS -> FAIL +1
      fi-ivb-3520m:       PASS -> FAIL +3

    igt@kms_busy@basic-flip-b:
      fi-bdw-5557u:       PASS -> FAIL +3
      fi-skl-gvtdvm:      PASS -> FAIL +3
      fi-cfl-guc:         PASS -> FAIL +3
      fi-skl-guc:         NOTRUN -> FAIL +3
      fi-blb-e6850:       PASS -> FAIL +1
      fi-cfl-8700k:       PASS -> FAIL +3
      fi-pnv-d510:        PASS -> FAIL +1
      fi-byt-clapper:     PASS -> FAIL +1

    igt@kms_busy@basic-flip-c:
      fi-cfl-s3:          PASS -> FAIL +7
      fi-cfl-8109u:       PASS -> FAIL +3
      fi-skl-6770hq:      PASS -> FAIL +3
      fi-hsw-peppy:       PASS -> FAIL +3
      fi-hsw-4770r:       PASS -> FAIL +3
      fi-kbl-7500u:       PASS -> FAIL +3
      fi-glk-dsi:         PASS -> FAIL +3
      fi-glk-j4005:       PASS -> FAIL +3

    igt@kms_frontbuffer_tracking@basic:
      fi-bsw-n3050:       PASS -> FAIL +1
      fi-bxt-j4205:       PASS -> FAIL +3
      fi-bsw-kefka:       PASS -> FAIL +2
      fi-bxt-dsi:         PASS -> FAIL +3
      fi-hsw-4770:        PASS -> FAIL +3
      fi-cnl-u:           PASS -> FAIL +7
      fi-ilk-650:         PASS -> FAIL +2
      fi-elk-e7500:       SKIP -> FAIL
      fi-icl-u2:          SKIP -> FAIL

    igt@kms_psr@cursor_plane_move:
      fi-kbl-r:           PASS -> FAIL +7
      fi-icl-u2:          PASS -> FAIL +6

    igt@kms_psr@primary_page_flip:
      fi-icl-u:           NOTRUN -> FAIL +7
      fi-skl-6600u:       PASS -> FAIL +7

    igt@kms_psr@sprite_plane_onoff:
      fi-skl-6700hq:      PASS -> FAIL +7

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_flip@basic-flip-vs-dpms:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106097)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@pm_rpm@module-reload:
      fi-skl-6600u:       PASS -> INCOMPLETE (fdo#107807)
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#107726)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    
  fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#107726 https://bugs.freedesktop.org/show_bug.cgi?id=107726
  fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807


== Participating hosts (43 -> 41) ==

  Additional (3): fi-skl-guc fi-icl-u fi-gdg-551 
  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4673 -> IGTPW_1943

  CI_DRM_4973: 60ba18212b324d02e961232953f190612d7a6ca3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1943: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1943/
  IGT_4673: 54cb1aeb4e50dea9f3abae632e317875d147c4ab @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1943/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed
  2018-10-11 22:17 [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed sunpeng.li
  2018-10-11 22:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-10-12 12:17 ` Ville Syrjälä
  2018-10-12 13:03 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2018-10-12 12:17 UTC (permalink / raw)
  To: sunpeng.li; +Cc: igt-dev

On Thu, Oct 11, 2018 at 06:17:36PM -0400, sunpeng.li@amd.com wrote:
> From: Leo Li <sunpeng.li@amd.com>
> 
> AMDGPU doesn't have modifier support. However, __kms_addfb requests
> modifier support on all calls to igt_create_fb_with_bo_size.
> 
> Therefore, don't request modifier support if not needed.
> 
> Signed-off-by: Leo Li <sunpeng.li@amd.com>
> ---
>  lib/igt_fb.c         | 8 +++++++-
>  lib/ioctl_wrappers.c | 3 ++-
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 35be2e8..3253236 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -913,6 +913,12 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  	/* FIXME allow the caller to pass these in */
>  	enum igt_color_encoding color_encoding = IGT_COLOR_YCBCR_BT709;
>  	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
> +	uint32_t flags = 0;
> +
> +	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
> +	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED)
> +		flags = LOCAL_DRM_MODE_FB_MODIFIERS;
> +

Check out the discussion at
https://lists.freedesktop.org/archives/igt-dev/2018-October/006282.html

At least I like Daniel's suggestion there.

>  
>  	fb_init(fb, fd, width, height, format, tiling,
>  		color_encoding, color_range);
> @@ -935,7 +941,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  			      fb->width, fb->height,
>  			      fb->drm_format, fb->tiling,
>  			      fb->strides, fb->offsets, fb->num_planes,
> -			      LOCAL_DRM_MODE_FB_MODIFIERS,
> +			      flags,
>  			      &fb->fb_id));
>  
>  	return fb->fb_id;
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 0929c43..017314a 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -1678,7 +1678,8 @@ int __kms_addfb(int fd, uint32_t handle,
>  	struct drm_mode_fb_cmd2 f;
>  	int ret, i;
>  
> -	igt_require_fb_modifiers(fd);
> +	if (modifier)
> +		igt_require_fb_modifiers(fd);
>  
>  	memset(&f, 0, sizeof(f));
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed
  2018-10-11 22:17 [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed sunpeng.li
  2018-10-11 22:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2018-10-12 12:17 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
@ 2018-10-12 13:03 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2018-10-12 13:03 UTC (permalink / raw)
  To: sunpeng.li; +Cc: igt-dev

On Thu, Oct 11, 2018 at 06:17:36PM -0400, sunpeng.li@amd.com wrote:
> From: Leo Li <sunpeng.li@amd.com>
> 
> AMDGPU doesn't have modifier support. However, __kms_addfb requests
> modifier support on all calls to igt_create_fb_with_bo_size.
> 
> Therefore, don't request modifier support if not needed.
> 
> Signed-off-by: Leo Li <sunpeng.li@amd.com>

Please see

[PATCH i-g-t 4/6] lib: Don't call igt_require_fb_modifiers() when no modifier

and work together with Deepak to find a solution to this issue, since I
think you have the exact same problem.
-Daniel

> ---
>  lib/igt_fb.c         | 8 +++++++-
>  lib/ioctl_wrappers.c | 3 ++-
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 35be2e8..3253236 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -913,6 +913,12 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  	/* FIXME allow the caller to pass these in */
>  	enum igt_color_encoding color_encoding = IGT_COLOR_YCBCR_BT709;
>  	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
> +	uint32_t flags = 0;
> +
> +	if (tiling != LOCAL_DRM_FORMAT_MOD_NONE &&
> +	    tiling != LOCAL_I915_FORMAT_MOD_X_TILED)
> +		flags = LOCAL_DRM_MODE_FB_MODIFIERS;
> +
>  
>  	fb_init(fb, fd, width, height, format, tiling,
>  		color_encoding, color_range);
> @@ -935,7 +941,7 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>  			      fb->width, fb->height,
>  			      fb->drm_format, fb->tiling,
>  			      fb->strides, fb->offsets, fb->num_planes,
> -			      LOCAL_DRM_MODE_FB_MODIFIERS,
> +			      flags,
>  			      &fb->fb_id));
>  
>  	return fb->fb_id;
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 0929c43..017314a 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -1678,7 +1678,8 @@ int __kms_addfb(int fd, uint32_t handle,
>  	struct drm_mode_fb_cmd2 f;
>  	int ret, i;
>  
> -	igt_require_fb_modifiers(fd);
> +	if (modifier)
> +		igt_require_fb_modifiers(fd);
>  
>  	memset(&f, 0, sizeof(f));
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-12 13:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 22:17 [igt-dev] [PATCH i-g-t] lib/igt_fb: Require FB modifiers only when needed sunpeng.li
2018-10-11 22:54 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-10-12 12:17 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2018-10-12 13:03 ` Daniel Vetter

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.