* [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier
@ 2018-10-12 15:23 sunpeng.li
2018-10-12 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: sunpeng.li @ 2018-10-12 15:23 UTC (permalink / raw)
To: igt-dev; +Cc: Deepak Rawat, daniel
From: Deepak Rawat <drawat@vmware.com>
vmwgfx and amdgpu doesn't support fb modifiers, yet kms_addfb() requires
modifier support. Since many tests don't need this to run, the
requirement can be made less broad.
Therefore, tighten the requirement to cases where modifiers are actually
needed.
v2:
* In create_fb() calls to kms_addfb(), remove the modifier flag iff the
driver doesn't support modifiers and the modifer is 0
* Don't modify the flag in kms_addfb().
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
---
lib/igt_fb.c | 7 +++++--
lib/ioctl_wrappers.c | 25 +++++++++++++++----------
lib/ioctl_wrappers.h | 1 +
3 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 35be2e8..5b1ece6 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -913,6 +913,7 @@ 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;
fb_init(fb, fd, width, height, format, tiling,
color_encoding, color_range);
@@ -931,11 +932,13 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
igt_debug("%s(handle=%d, pitch=%d)\n",
__func__, fb->gem_handle, fb->strides[0]);
+ if (fb->tiling || igt_has_fb_modifiers(fd))
+ flags = LOCAL_DRM_MODE_FB_MODIFIERS;
+
do_or_die(__kms_addfb(fb->fd, fb->gem_handle,
fb->width, fb->height,
fb->drm_format, fb->tiling,
- fb->strides, fb->offsets, fb->num_planes,
- LOCAL_DRM_MODE_FB_MODIFIERS,
+ fb->strides, fb->offsets, fb->num_planes, flags,
&fb->fb_id));
return fb->fb_id;
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 0929c43..b269f93 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1646,14 +1646,7 @@ void prime_sync_end(int dma_buf_fd, bool write)
do_ioctl(dma_buf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_end);
}
-/**
- * igt_require_fb_modifiers:
- * @fd: Open DRM file descriptor.
- *
- * Requires presence of DRM_CAP_ADDFB2_MODIFIERS.
- */
-void igt_require_fb_modifiers(int fd)
-{
+bool igt_has_fb_modifiers(int fd) {
static bool has_modifiers, cap_modifiers_tested;
if (!cap_modifiers_tested) {
@@ -1666,7 +1659,18 @@ void igt_require_fb_modifiers(int fd)
cap_modifiers_tested = true;
}
- igt_require(has_modifiers);
+ return has_modifiers;
+}
+
+/**
+ * igt_require_fb_modifiers:
+ * @fd: Open DRM file descriptor.
+ *
+ * Requires presence of DRM_CAP_ADDFB2_MODIFIERS.
+ */
+void igt_require_fb_modifiers(int fd)
+{
+ igt_require(igt_has_fb_modifiers(fd));
}
int __kms_addfb(int fd, uint32_t handle,
@@ -1678,7 +1682,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 || flags & DRM_MODE_FB_MODIFIERS)
+ igt_require_fb_modifiers(fd);
memset(&f, 0, sizeof(f));
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index c4e1956..b22b36b 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -227,6 +227,7 @@ struct local_drm_mode_fb_cmd2 {
#define LOCAL_DRM_CAP_ADDFB2_MODIFIERS 0x10
+bool igt_has_fb_modifiers(int fd);
void igt_require_fb_modifiers(int fd);
/**
--
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] 5+ messages in thread* [igt-dev] ✓ Fi.CI.BAT: success for lib: Don't call igt_require_fb_modifiers() when no modifier
2018-10-12 15:23 [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier sunpeng.li
@ 2018-10-12 17:13 ` Patchwork
2018-10-12 19:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-10-13 12:04 ` [igt-dev] [PATCH i-g-t v2] " Daniel Stone
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 17:13 UTC (permalink / raw)
To: sunpeng.li; +Cc: igt-dev
== Series Details ==
Series: lib: Don't call igt_require_fb_modifiers() when no modifier
URL : https://patchwork.freedesktop.org/series/50935/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4973 -> IGTPW_1948 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50935/revisions/1/mbox/
== Known issues ==
Here are the changes found in IGTPW_1948 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106725, fdo#106248)
igt@drv_selftest@live_gem:
{fi-apl-guc}: NOTRUN -> INCOMPLETE (fdo#106693)
igt@kms_flip@basic-flip-vs-wf_vblank:
fi-glk-j4005: PASS -> FAIL (fdo#100368)
==== Possible fixes ====
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
== Participating hosts (43 -> 42) ==
Additional (4): fi-skl-guc fi-icl-u fi-gdg-551 fi-apl-guc
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* IGT: IGT_4673 -> IGTPW_1948
CI_DRM_4973: 60ba18212b324d02e961232953f190612d7a6ca3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1948: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1948/
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_1948/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread* [igt-dev] ✗ Fi.CI.IGT: failure for lib: Don't call igt_require_fb_modifiers() when no modifier
2018-10-12 15:23 [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier sunpeng.li
2018-10-12 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-10-12 19:49 ` Patchwork
2018-10-13 12:04 ` [igt-dev] [PATCH i-g-t v2] " Daniel Stone
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 19:49 UTC (permalink / raw)
To: sunpeng.li; +Cc: igt-dev
== Series Details ==
Series: lib: Don't call igt_require_fb_modifiers() when no modifier
URL : https://patchwork.freedesktop.org/series/50935/
State : failure
== Summary ==
= CI Bug Log - changes from IGT_4673_full -> IGTPW_1948_full =
== Summary - FAILURE ==
Serious unknown changes coming with IGTPW_1948_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_1948_full, 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/50935/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in IGTPW_1948_full:
=== IGT changes ===
==== Possible regressions ====
igt@kms_cursor_crc@cursor-256x85-onscreen:
shard-glk: NOTRUN -> DMESG-WARN
igt@kms_flip@2x-nonexisting-fb-interruptible:
shard-glk: PASS -> DMESG-WARN +113
igt@kms_vblank@pipe-b-query-busy:
shard-hsw: PASS -> DMESG-WARN +208
==== Warnings ====
igt@kms_chv_cursor_fail@pipe-c-128x128-right-edge:
shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> DMESG-WARN
igt@kms_setmode@basic:
shard-hsw: FAIL (fdo#99912) -> DMESG-FAIL
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in IGTPW_1948_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@shrink:
shard-snb: PASS -> INCOMPLETE (fdo#105411, fdo#106886)
igt@kms_available_modes_crc@available_mode_test_crc:
shard-apl: PASS -> FAIL (fdo#106641)
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
shard-apl: PASS -> DMESG-WARN (fdo#107956)
igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
shard-glk: PASS -> DMESG-FAIL (fdo#108145) +1
igt@kms_color@pipe-a-ctm-max:
shard-apl: PASS -> FAIL (fdo#108147)
igt@kms_color@pipe-a-degamma:
shard-apl: PASS -> FAIL (fdo#108145, fdo#104782)
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-apl: PASS -> FAIL (fdo#103232, fdo#103191) +1
igt@kms_cursor_crc@cursor-128x42-onscreen:
shard-glk: PASS -> FAIL (fdo#103232) +5
igt@kms_cursor_crc@cursor-256x256-sliding:
shard-glk: PASS -> DMESG-FAIL (fdo#103232) +3
igt@kms_cursor_crc@cursor-64x21-onscreen:
shard-kbl: PASS -> FAIL (fdo#103232) +2
igt@kms_cursor_crc@cursor-64x21-random:
shard-glk: NOTRUN -> FAIL (fdo#103232)
igt@kms_cursor_crc@cursor-64x21-sliding:
shard-apl: PASS -> FAIL (fdo#103232) +6
igt@kms_cursor_crc@cursor-64x64-suspend:
shard-kbl: PASS -> FAIL (fdo#103232, fdo#103191)
igt@kms_flip@busy-flip:
shard-glk: PASS -> INCOMPLETE (k.org#198133, fdo#103359)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
shard-apl: PASS -> FAIL (fdo#103167) +3
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
shard-glk: PASS -> FAIL (fdo#103167) +7
igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
shard-glk: PASS -> FAIL (fdo#108145)
shard-kbl: PASS -> FAIL (fdo#108145)
shard-apl: PASS -> FAIL (fdo#108145)
igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
shard-kbl: NOTRUN -> FAIL (fdo#108146)
igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
shard-glk: PASS -> FAIL (fdo#103166)
igt@perf_pmu@most-busy-idle-check-all-bcs0:
shard-hsw: PASS -> INCOMPLETE (fdo#103540)
==== Possible fixes ====
igt@gem_exec_basic@readonly-bsd:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@gem_mmap@bad-object:
shard-apl: DMESG-WARN (fdo#103558, fdo#105602) -> PASS
igt@kms_addfb_basic@bo-too-small-due-to-tiling:
shard-snb: DMESG-WARN (fdo#107469) -> PASS +4
igt@kms_color@pipe-c-legacy-gamma:
shard-kbl: FAIL (fdo#104782) -> PASS
shard-apl: FAIL (fdo#104782) -> PASS
igt@kms_cursor_crc@cursor-128x128-random:
shard-apl: FAIL (fdo#103232) -> PASS +1
igt@kms_cursor_legacy@cursora-vs-flipa-toggle:
shard-glk: DMESG-WARN (fdo#106538, fdo#105763) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
shard-kbl: FAIL (fdo#103167) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
shard-apl: FAIL (fdo#103167) -> PASS +4
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
shard-glk: FAIL (fdo#103167) -> PASS +6
igt@kms_plane@plane-position-covered-pipe-b-planes:
shard-glk: FAIL (fdo#103166) -> PASS +1
igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
shard-apl: FAIL (fdo#103166) -> PASS +3
igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
shard-kbl: FAIL (fdo#103166) -> PASS
igt@perf_pmu@rc6-runtime-pm:
shard-apl: FAIL (fdo#105010) -> PASS
igt@perf_pmu@rc6-runtime-pm-long:
shard-kbl: FAIL (fdo#105010) -> PASS
==== Warnings ====
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-kbl: INCOMPLETE (fdo#103665) -> FAIL (fdo#103232, fdo#103191)
igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
shard-glk: FAIL (fdo#108145) -> DMESG-FAIL (fdo#108145) +2
igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
shard-glk: FAIL (fdo#103166) -> DMESG-FAIL (fdo#103166)
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107469 https://bugs.freedesktop.org/show_bug.cgi?id=107469
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
fdo#108147 https://bugs.freedesktop.org/show_bug.cgi?id=108147
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (6 -> 5) ==
Missing (1): shard-skl
== Build changes ==
* IGT: IGT_4673 -> IGTPW_1948
* Linux: CI_DRM_4958 -> CI_DRM_4973
CI_DRM_4958: 9990e1665029dc2ef4a9c0632b8a2f516263e595 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4973: 60ba18212b324d02e961232953f190612d7a6ca3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1948: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1948/
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_1948/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier
2018-10-12 15:23 [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier sunpeng.li
2018-10-12 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-10-12 19:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-10-13 12:04 ` Daniel Stone
2018-10-15 13:52 ` Ville Syrjälä
2 siblings, 1 reply; 5+ messages in thread
From: Daniel Stone @ 2018-10-13 12:04 UTC (permalink / raw)
To: sunpeng.li; +Cc: igt-dev, drawat, Daniel Vetter
Hi Deepak,
On Fri, 12 Oct 2018 at 16:24, <sunpeng.li@amd.com> wrote:
> * In create_fb() calls to kms_addfb(), remove the modifier flag iff the
> driver doesn't support modifiers and the modifer is 0
I know this wasn't your idea and you were just following the
suggestion - but 0 _is_ a valid modifier with a very specific meaning,
which is to always interpret the buffer as linear, no matter what.
DRM_FORMAT_MOD_INVALID is a non-zero value, and should be passed
anywhere that modifiers are not supported or their use is not wanted.
> @@ -1678,7 +1682,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 || flags & DRM_MODE_FB_MODIFIERS)
So I would suggest changing this test to modifier !=
DRM_FORMAT_MOD_INVALID, and passing INVALID rather than 0 where
required.
Cheers,
Daniel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier
2018-10-13 12:04 ` [igt-dev] [PATCH i-g-t v2] " Daniel Stone
@ 2018-10-15 13:52 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2018-10-15 13:52 UTC (permalink / raw)
To: Daniel Stone; +Cc: igt-dev, drawat, Daniel Vetter
On Sat, Oct 13, 2018 at 01:04:08PM +0100, Daniel Stone wrote:
> Hi Deepak,
>
> On Fri, 12 Oct 2018 at 16:24, <sunpeng.li@amd.com> wrote:
> > * In create_fb() calls to kms_addfb(), remove the modifier flag iff the
> > driver doesn't support modifiers and the modifer is 0
>
> I know this wasn't your idea and you were just following the
> suggestion - but 0 _is_ a valid modifier with a very specific meaning,
> which is to always interpret the buffer as linear, no matter what.
>
> DRM_FORMAT_MOD_INVALID is a non-zero value, and should be passed
> anywhere that modifiers are not supported or their use is not wanted.
>
> > @@ -1678,7 +1682,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 || flags & DRM_MODE_FB_MODIFIERS)
>
> So I would suggest changing this test to modifier !=
> DRM_FORMAT_MOD_INVALID, and passing INVALID rather than 0 where
> required.
If we start using DRM_FORMAT_MOD_INVALID then I suppose we should
drop the flags parameter entirely as it'll become redundant.
In the current scheme I think it would suffice to just
'if (flags & MOD) igt_require_mods()'. I don't think we need to
protect against someone passing in a non-linear modifier without
the flag. That would just be a bug (or even a feature perhaps)
in the test.
--
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] 5+ messages in thread
end of thread, other threads:[~2018-10-15 13:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12 15:23 [igt-dev] [PATCH i-g-t v2] lib: Don't call igt_require_fb_modifiers() when no modifier sunpeng.li
2018-10-12 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-10-12 19:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-10-13 12:04 ` [igt-dev] [PATCH i-g-t v2] " Daniel Stone
2018-10-15 13:52 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox