Skip to contentSkip to conversation

lib/igt_matrix: Unroll and inline igt_matrix_transform()

PATCH In review Ville Syrjala 4 participants 15 messages Jun 6, 2018 – Jun 7, 2018 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 lib/igt_matrix: Unroll and inline igt_matrix_transform()

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

Using the current igt_matrix for NV12 conversion ends up being about 4x as slow as the current non-igt_matrix based code. Unrolling and inlining igt_matrix_transform() improves that factor to ~1.5x.

Cc Maarten Lankhorst <[email protected]>
---
 lib/igt_matrix.c | 25 -------------------------
 lib/igt_matrix.h | 43 +++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 41 insertions(+), 27 deletions(-)
lib/igt_matrix.c +0 -25
index 3fa6c96cae8a..35a9c321defd 100644
@@ -24,8 +24,6 @@
 #include "igt_core.h"
 #include "igt_matrix.h"
 
-#define m(row, col) ((col) * 4 + (row))
-
 /**
  * SECTION:igt_matrix
  * @short_description: Matrix math library
@@ -110,29 +108,6 @@ struct igt_mat4 igt_matrix_translate(float x, float y, float z)
 	return ret;
 }
 
-/**
- * igt_matrix_transform:
- *
- * Transform the vector @v by the matrix @m. @m is on the left,
- * @v on the right.
- *
- * Returns:
- * The transformed vector.
- */
-struct igt_vec4 igt_matrix_transform(const struct igt_mat4 *m,
-				     const struct igt_vec4 *v)
-{
-	struct igt_vec4 ret = {};
-
-	for (int row = 0; row < 4; row++) {
-		for (int i = 0; i < 4; i++) {
-			ret.d[row] += m->d[m(row, i)] * v->d[i];
-		}
-	}
-
-	return ret;
-}
-
 /**
  * igt_matrix_multiply:
  *
lib/igt_matrix.h +41 -2

54 lines not on this page · raw message

Signature · 6 lines
2.16.4

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

PATCH 2/4 lib/igt_color_encoding: Use the m(row, col) macro to address the matrix cells

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

Sinec the m(row,col) macro is now in igt_matrix.h let's use it when constructing the ycbcr<->rgb matrices.

---
 lib/igt_color_encoding.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)
lib/igt_color_encoding.c +20 -20
index b1648a747fcb..fc9edef1e331 100644
@@ -43,19 +43,19 @@ static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e)
 	kg = 1.0f - kr - kb;
 
 	struct igt_mat4 ret = {
-		.d[0 * 4 + 0] = kr,
-		.d[1 * 4 + 0] = kg,
-		.d[2 * 4 + 0] = kb,
+		.d[m(0, 0)] = kr,
+		.d[m(0, 1)] = kg,
+		.d[m(0, 2)] = kb,
 
-		.d[0 * 4 + 1] = -kr / (1.0f - kb),
-		.d[1 * 4 + 1] = -kg / (1.0f - kb),
-		.d[2 * 4 + 1] = 1.0f,
+		.d[m(1, 0)] = -kr / (1.0f - kb),
+		.d[m(1, 1)] = -kg / (1.0f - kb),
+		.d[m(1, 2)] = 1.0f,
 
-		.d[0 * 4 + 2] = 1.0f,
-		.d[1 * 4 + 2] = -kg / (1.0f - kr),
-		.d[2 * 4 + 2] = -kb / (1.0f - kr),
+		.d[m(2, 0)] = 1.0f,
+		.d[m(2, 1)] = -kg / (1.0f - kr),
+		.d[m(2, 2)] = -kb / (1.0f - kr),
 
-		.d[3 * 4 + 3] = 1.0f,
+		.d[m(3, 3)] = 1.0f,
 	};
 
 	return ret;
@@ -70,19 +70,19 @@ static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e)
 	kg = 1.0f - kr - kb;
 
 	struct igt_mat4 ret = {
-		.d[0 * 4 + 0] = 1.0f,
-		.d[1 * 4 + 0] = 0.0f,
-		.d[2 * 4 + 0] = 1.0 - kr,
+		.d[m(0, 0)] = 1.0f,
+		.d[m(0, 1)] = 0.0f,
+		.d[m(0, 2)] = 1.0 - kr,
 
-		.d[0 * 4 + 1] = 1.0f,
-		.d[1 * 4 + 1] = -(1.0 - kb) * kb / kg,
-		.d[2 * 4 + 1] = -(1.0 - kr) * kr / kg,
+		.d[m(1, 0)] = 1.0f,
+		.d[m(1, 1)] = -(1.0 - kb) * kb / kg,
+		.d[m(1, 2)] = -(1.0 - kr) * kr / kg,
 
-		.d[0 * 4 + 2] = 1.0f,
-		.d[1 * 4 + 2] = 1.0 - kb,
-		.d[2 * 4 + 2] = 0.0f,
+		.d[m(2, 0)] = 1.0f,
+		.d[m(2, 1)] = 1.0 - kb,
+		.d[m(2, 2)] = 0.0f,
 
-		.d[3 * 4 + 3] = 1.0f,
+		.d[m(3, 3)] = 1.0f,
 	};
 
 	return ret;
Signature · 6 lines
2.16.4

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#3 lore raw

PATCH 3/4 lib/igt_color_encoding: Appease c90

In reply to Ville Syrjala

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

Apparently we stil build in c90 mode or something with autotools. It doesn't like mixed code and declarations.

---
 lib/igt_color_encoding.c | 46 ++++++++++++++++++++++------------------------
 1 file changed, 22 insertions(+), 24 deletions(-)
lib/igt_color_encoding.c +22 -24
index fc9edef1e331..8d5379b1f740 100644
@@ -36,54 +36,52 @@ static const struct color_encoding color_encodings[IGT_NUM_COLOR_ENCODINGS] = {
 
 static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e)
 {
+	struct igt_mat4 ret = {};
 	float kr, kg, kb;
 
 	kr = e->kr;
 	kb = e->kb;
 	kg = 1.0f - kr - kb;
 
-	struct igt_mat4 ret = {
-		.d[m(0, 0)] = kr,
-		.d[m(0, 1)] = kg,
-		.d[m(0, 2)] = kb,
+	ret.d[m(0, 0)] = kr;
+	ret.d[m(0, 1)] = kg;
+	ret.d[m(0, 2)] = kb;
 
-		.d[m(1, 0)] = -kr / (1.0f - kb),
-		.d[m(1, 1)] = -kg / (1.0f - kb),
-		.d[m(1, 2)] = 1.0f,
+	ret.d[m(1, 0)] = -kr / (1.0f - kb);
+	ret.d[m(1, 1)] = -kg / (1.0f - kb);
+	ret.d[m(1, 2)] = 1.0f;
 
-		.d[m(2, 0)] = 1.0f,
-		.d[m(2, 1)] = -kg / (1.0f - kr),
-		.d[m(2, 2)] = -kb / (1.0f - kr),
+	ret.d[m(2, 0)] = 1.0f;
+	ret.d[m(2, 1)] = -kg / (1.0f - kr);
+	ret.d[m(2, 2)] = -kb / (1.0f - kr);
 
-		.d[m(3, 3)] = 1.0f,
-	};
+	ret.d[m(3, 3)] = 1.0f;
 
 	return ret;
 }
 
 static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e)
 {
+	struct igt_mat4 ret = {};
 	float kr, kg, kb;
 
 	kr = e->kr;
 	kb = e->kb;
 	kg = 1.0f - kr - kb;
 
-	struct igt_mat4 ret = {
-		.d[m(0, 0)] = 1.0f,
-		.d[m(0, 1)] = 0.0f,
-		.d[m(0, 2)] = 1.0 - kr,
+	ret.d[m(0, 0)] = 1.0f;
+	ret.d[m(0, 1)] = 0.0f;
+	ret.d[m(0, 2)] = 1.0 - kr;
 
-		.d[m(1, 0)] = 1.0f,
-		.d[m(1, 1)] = -(1.0 - kb) * kb / kg,
-		.d[m(1, 2)] = -(1.0 - kr) * kr / kg,
+	ret.d[m(1, 0)] = 1.0f;
+	ret.d[m(1, 1)] = -(1.0 - kb) * kb / kg;
+	ret.d[m(1, 2)] = -(1.0 - kr) * kr / kg;
 
-		.d[m(2, 0)] = 1.0f,
-		.d[m(2, 1)] = 1.0 - kb,
-		.d[m(2, 2)] = 0.0f,
+	ret.d[m(2, 0)] = 1.0f;
+	ret.d[m(2, 1)] = 1.0 - kb;
+	ret.d[m(2, 2)] = 0.0f;
 
-		.d[m(3, 3)] = 1.0f,
-	};
+	ret.d[m(3, 3)] = 1.0f;
 
 	return ret;
 }
Signature · 6 lines
2.16.4

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#8 lore raw

PATCH 4/4 lib/igt_fb: Round to nearest when clamping rgb

In reply to Ville Syrjala

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

I think round to nearest is maybe more correct here. Also do the clamp with integers as it actually makes the resulting code measurably faster.

Cc Maarten Lankhorst <[email protected]>
---
 lib/igt_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_fb.c +1 -1
index a926a08d44e1..6ff90d53f433 100644
@@ -1323,7 +1323,7 @@ struct fb_convert_blit_upload {
 
 static uint8_t clamprgb(float val)
 {
-	return clamp(val, 0.0f, 255.0f);
+	return clamp((int)(val + 0.5f), 0, 255);
 }
 
 static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit)
Signature · 6 lines
2.16.4

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/4
#10 lore raw
In reply to Ville Syrjala

Quoting Ville Syrjala (2018-06-06 21:16:39)

Quoted 8 lines

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

Using the current igt_matrix for NV12 conversion ends up being about 4x as slow as the current non-igt_matrix based code. Unrolling and inlining igt_matrix_transform() improves that factor to ~1.5x.

Cc Maarten Lankhorst <[email protected]>

-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 2/4
#2 lore raw

Re: [igt-dev] [PATCH i-g-t 2/4] lib/igt_color_encoding: Use the m(row, col) macro to address the matrix cells

In reply to Ville Syrjala

Quoting Ville Syrjala (2018-06-06 21:16:40)

Quoted 7 lines

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

Sinec the m(row,col) macro is now in igt_matrix.h let's use it when constructing the ycbcr<->rgb matrices.

-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

Re: [igt-dev] [PATCH i-g-t 3/4] lib/igt_color_encoding: Appease c90

In reply to Ville Syrjala

Quoting Ville Syrjala (2018-06-06 21:16:41)

Quoted 7 lines

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

Apparently we stil build in c90 mode or something with autotools. It doesn't like mixed code and declarations.

Quoted 7 lines

---
static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e) {

+       struct igt_mat4 ret = {};
        float kr, kg, kb;
 
        kr = e->kr;

+float kr =...;

Quoted 1 line
        kb = e->kb;

+float kb = ...;

Quoted 1 line
        kg = 1.0f - kr - kb;

+float kg = ...;

Would have been the simpler patch :)
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#11 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform()

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform()
URL : https://patchwork.freedesktop.org/series/44372/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4282 -> IGTPW_1421 =

== Summary - WARNING ==

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1421, 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/44372/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_gttfill@basic:
      fi-pnv-d510:        SKIP -> PASS

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         PASS -> FAIL (fdo#102575)

    
    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-glk-j4005:       FAIL (fdo#100368) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927

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

Additional (1): fi-hsw-peppy
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* IGT: IGT_4508 -> IGTPW_1421

CI_DRM_4282: c1064b9be065603680d060184da1a93d404dcf0c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1421: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1421/
IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#12 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform()

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform()
URL : https://patchwork.freedesktop.org/series/44372/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4508_full -> IGTPW_1421_full =

== Summary - WARNING ==

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1421_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/44372/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_mocs_settings@mocs-rc6-ctx-dirty-render:
      shard-kbl:          PASS -> SKIP +1

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_render_linear_blits@basic:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-snb:          PASS -> FAIL (fdo#106641)

    igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
      shard-hsw:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#102887, fdo#105363)

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#105189)

    igt@kms_flip_tiling@flip-to-y-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724, fdo#103822)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-snb:          PASS -> FAIL (fdo#103166, fdo#104724)

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          PASS -> FAIL (fdo#103925, fdo#104724)

    igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend:
      shard-glk:          PASS -> INCOMPLETE (fdo#103359, k.org#198133)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_gtt:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@gem_exec_basic@gtt-vebox:
      shard-snb:          INCOMPLETE (fdo#105411) -> SKIP

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL (fdo#105703) -> PASS

    igt@kms_flip_tiling@flip-to-x-tiled:
      shard-glk:          FAIL (fdo#104724, fdo#103822) -> PASS

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

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

    igt@testdisplay:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS

    
    ==== Warnings ====

    igt@gem_eio@suspend:
      shard-snb:          INCOMPLETE (fdo#105411) -> FAIL (fdo#105957)

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

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

No changes in participating hosts

== Build changes ==

* IGT: IGT_4508 -> IGTPW_1421
* Linux: CI_DRM_4280 -> CI_DRM_4282

CI_DRM_4280: 967aa2f22752af3adc629b50e7d2ed2b7e061e44 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4282: c1064b9be065603680d060184da1a93d404dcf0c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1421: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1421/
IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

Reviewed-by on v1 4/4
#9 lore raw

Re: [igt-dev] [PATCH i-g-t 4/4] lib/igt_fb: Round to nearest when clamping rgb

In reply to Ville Syrjala

Op 06-06-18 om 22:16 schreef Ville Syrjala:

Quoted 17 lines

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

I think round to nearest is maybe more correct here. Also do the clamp with integers as it actually makes the resulting code measurably faster.

Cc Maarten Lankhorst <[email protected]>
---
 lib/igt_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/igt_fb.c +0 -0
index a926a08d44e1..6ff90d53f433 100644

lib/igt_fb.c struct fb_convert_blit_upload { · line 1329

Quoted 8 lines
lib/igt_fb.c +1 -1
@@ -1323,7 +1323,7 @@ struct fb_convert_blit_upload {
 
 static uint8_t clamprgb(float val)
 {
-	return clamp(val, 0.0f, 255.0f);
+	return clamp((int)(val + 0.5f), 0, 255);
 }
 
 static void convert_nv12_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit)

No algorithm:
real 0m22,052s

Original algorithm:
real 0m26,091s

New algorithm:
real 0m29,342s

Amount of conversions that are 2560x1440: 18. Some smaller 64x64 and 128x128 are done too but not where most time will be spent..

Each conversion (back and forth) approximately takes .405s, which would interpolate to 0.911s for a 4K fb. Just about doable without further optimizations.

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

PATCH v2 3/4 lib/igt_color_encoding: Appease c90

In reply to Ville Syrjala

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

Apparently we stil build in c90 mode or something with autotools. It doesn't like mixed code and declarations.

v2: Do it the sane way (Chris)

---
 lib/igt_color_encoding.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
lib/igt_color_encoding.c +6 -10
index fc9edef1e331..f445dbbc0250 100644
@@ -36,11 +36,9 @@ static const struct color_encoding color_encodings[IGT_NUM_COLOR_ENCODINGS] = {
 
 static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e)
 {
-	float kr, kg, kb;
-
-	kr = e->kr;
-	kb = e->kb;
-	kg = 1.0f - kr - kb;
+	float kr = e->kr;
+	float kb = e->kb;
+	float kg = 1.0f - kr - kb;
 
 	struct igt_mat4 ret = {
 		.d[m(0, 0)] = kr,
@@ -63,11 +61,9 @@ static struct igt_mat4 rgb_to_ycbcr_matrix(const struct color_encoding *e)
 
 static struct igt_mat4 ycbcr_to_rgb_matrix(const struct color_encoding *e)
 {
-	float kr, kg, kb;
-
-	kr = e->kr;
-	kb = e->kb;
-	kg = 1.0f - kr - kb;
+	float kr = e->kr;
+	float kb = e->kb;
+	float kg = 1.0f - kr - kb;
 
 	struct igt_mat4 ret = {
 		.d[m(0, 0)] = 1.0f,
Signature · 6 lines
2.16.4

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v2 3/4
#6 lore raw

Re: [igt-dev] [PATCH i-g-t v2 3/4] lib/igt_color_encoding: Appease c90

Quoting Ville Syrjala (2018-06-07 12:43:01)

Quoted 9 lines

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

Apparently we stil build in c90 mode or something with autotools. It doesn't like mixed code and declarations.

v2: Do it the sane way (Chris)

-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#7 lore raw

Re: [igt-dev] [PATCH i-g-t v2 3/4] lib/igt_color_encoding: Appease c90

Quoted 11 lines · Chris Wilson

Quoting Ville Syrjala (2018-06-07 12:43:01)

Quoted 9 lines

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

Apparently we stil build in c90 mode or something with autotools. It doesn't like mixed code and declarations.

v2: Do it the sane way (Chris)

Thanks for the reviews. Series pushed.

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#13 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform() (rev2)

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform() (rev2)
URL : https://patchwork.freedesktop.org/series/44372/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4282 -> IGTPW_1425 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/44372/revisions/2/mbox/

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       PASS -> DMESG-WARN (fdo#105128)

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         PASS -> FAIL (fdo#102575)

    igt@gem_sync@basic-many-each:
      fi-cnl-y3:          NOTRUN -> INCOMPLETE (fdo#105086)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000) +1

    
    ==== Possible fixes ====

    igt@core_auth@basic-auth:
      fi-bdw-gvtdvm:      DMESG-WARN (fdo#105600) -> PASS +2

    igt@gem_sync@basic-each:
      fi-cnl-y3:          INCOMPLETE (fdo#105086) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000

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

Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* IGT: IGT_4508 -> IGTPW_1425

CI_DRM_4282: c1064b9be065603680d060184da1a93d404dcf0c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1425: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1425/
IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#14 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform() (rev2)

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/4] lib/igt_matrix: Unroll and inline igt_matrix_transform() (rev2)
URL : https://patchwork.freedesktop.org/series/44372/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4508_full -> IGTPW_1425_full =

== Summary - WARNING ==

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_1425_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/44372/revisions/2/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd1:
      shard-kbl:          SKIP -> PASS

    igt@gem_mocs_settings@mocs-rc6-vebox:
      shard-kbl:          PASS -> SKIP +2

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
      shard-glk:          PASS -> FAIL (fdo#105703)

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-glk:          PASS -> INCOMPLETE (k.org#198133, fdo#103359)

    igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
      shard-glk:          PASS -> FAIL (fdo#104873)

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#105363)

    igt@kms_flip@2x-plain-flip-ts-check:
      shard-hsw:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#102887, fdo#105363)

    igt@kms_flip@modeset-vs-vblank-race:
      shard-hsw:          PASS -> FAIL (fdo#103060)

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368) +1

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

    igt@pm_rps@min-max-config-idle:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_gtt:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@gem_exec_basic@gtt-vebox:
      shard-snb:          INCOMPLETE (fdo#105411) -> SKIP

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL (fdo#105703) -> PASS

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

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

    igt@testdisplay:
      shard-glk:          INCOMPLETE (k.org#198133, fdo#103359) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
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 (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* IGT: IGT_4508 -> IGTPW_1425
* Linux: CI_DRM_4280 -> CI_DRM_4282

CI_DRM_4280: 967aa2f22752af3adc629b50e7d2ed2b7e061e44 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_4282: c1064b9be065603680d060184da1a93d404dcf0c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_1425: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1425/
IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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