Skip to contentSkip to conversation

lib/igt_fb: Add support for Y21x formats as well, v2.

PATCH New Maarten Lankhorst 2 participants 4 messages Mar 8, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lib/igt_fb: Add support for Y21x formats as well, v2.

Those formats are packed like YUYV, but only 16 bits per component.

Changes since v1:
- Rebase on top of upstream YUV changes.

---
 include/drm-uapi/drm_fourcc.h | 16 ++++++++++++
 lib/igt_color_encoding.c      |  3 +++
 lib/igt_fb.c                  | 46 +++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+)
include/drm-uapi/drm_fourcc.h +16 -0
index bab20298f422..9fa7cf7bb274 100644
@@ -153,6 +153,22 @@ extern "C" {
 #define DRM_FORMAT_AYUV		fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
 #define DRM_FORMAT_XYUV8888		fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
 
+/*
+ * packed Y2xx indicate for each component, xx valid data occupy msb
+ * 16-xx padding occupy lsb
+ */
+#define DRM_FORMAT_Y210         fourcc_code('Y', '2', '1', '0') /* [63:0] Y0:x:Cb0:x:Y1:x:Cr1:x 10:6:10:6:10:6:10:6 little endian per 2 Y pixels */
+#define DRM_FORMAT_Y212         fourcc_code('Y', '2', '1', '2') /* [63:0] Y0:x:Cb0:x:Y1:x:Cr1:x 12:4:12:4:12:4:12:4 little endian per 2 Y pixels */
+#define DRM_FORMAT_Y216         fourcc_code('Y', '2', '1', '6') /* [63:0] Y0:Cb0:Y1:Cr1 16:16:16:16 little endian per 2 Y pixels */
+
+/*
+ * packed Y4xx indicate for each component, xx valid data occupy msb
+ * 16-xx padding occupy lsb except Y410
+ */
+#define DRM_FORMAT_Y410         fourcc_code('Y', '4', '1', '0') /* [31:0] X:V:Y:U 2:10:10:10 little endian */
+#define DRM_FORMAT_Y412         fourcc_code('Y', '4', '1', '2') /* [63:0] X:x:V:x:Y:x:U:x 12:4:12:4:12:4:12:4 little endian */
+#define DRM_FORMAT_Y416         fourcc_code('Y', '4', '1', '6') /* [63:0] X:V:Y:U 16:16:16:16 little endian */
+
 /*
  * packed YCbCr420 2x2 tiled formats
  * first 64 bits will contain Y,Cb,Cr components for a 2x2 tile
lib/igt_color_encoding.c +3 -0
index cc76a9919242..9f9dc1439ee4 100644
@@ -151,6 +151,9 @@ static const struct color_encoding_format {
 	{ DRM_FORMAT_P010, 65472.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 	{ DRM_FORMAT_P012, 65520.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 	{ DRM_FORMAT_P016, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
+	{ DRM_FORMAT_Y210, 65472.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
+	{ DRM_FORMAT_Y212, 65520.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
+	{ DRM_FORMAT_Y216, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 };
 
 static const struct color_encoding_format *lookup_fourcc(uint32_t fourcc)
lib/igt_fb.c +46 -0

94 lines not on this page · raw message

Signature · 6 lines
2.20.1

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

PATCH 2/2 lib/igt_fb: Add support for Y410/Y416 formats, v2.

Y410 is packed with compressed a channel and only 32 bpp, like 10 bits RGB formats. Y416 is a packed 16 bits per component format.

Changes since v1:
- Rebase on top of upstream YUV changes.

---
 include/drm-uapi/drm_fourcc.h |   4 +
 lib/igt_color_encoding.c      |   2 +
 lib/igt_fb.c                  | 133 ++++++++++++++++++++++++++++++++++
 3 files changed, 139 insertions(+)
include/drm-uapi/drm_fourcc.h +4 -0
index 9fa7cf7bb274..0c08c79476c5 100644
@@ -169,6 +169,10 @@ extern "C" {
 #define DRM_FORMAT_Y412         fourcc_code('Y', '4', '1', '2') /* [63:0] X:x:V:x:Y:x:U:x 12:4:12:4:12:4:12:4 little endian */
 #define DRM_FORMAT_Y416         fourcc_code('Y', '4', '1', '6') /* [63:0] X:V:Y:U 16:16:16:16 little endian */
 
+#define DRM_FORMAT_Y410		fourcc_code('Y', '4', '1', '0') /* [31:0] A:V:Y:U 2:10:10:10 little endian */
+#define DRM_FORMAT_Y412		fourcc_code('Y', '4', '1', '2') /* [31:0] A:V:Y:U 2:10:10:10 little endian */
+#define DRM_FORMAT_Y416		fourcc_code('Y', '4', '1', '6') /* [127:0] A:V:Y:U 16:16:16:16 little endian */
+
 /*
  * packed YCbCr420 2x2 tiled formats
  * first 64 bits will contain Y,Cb,Cr components for a 2x2 tile
lib/igt_color_encoding.c +2 -0
index 9f9dc1439ee4..0ebdddcd49c5 100644
@@ -154,6 +154,8 @@ static const struct color_encoding_format {
 	{ DRM_FORMAT_Y210, 65472.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 	{ DRM_FORMAT_Y212, 65520.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 	{ DRM_FORMAT_Y216, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
+	{ DRM_FORMAT_Y410, 1023.f, 64.f, 940.f, 64.f, 512.f, 960.f },
+	{ DRM_FORMAT_Y416, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 };
 
 static const struct color_encoding_format *lookup_fourcc(uint32_t fourcc)
lib/igt_fb.c +133 -0

197 lines not on this page · raw message

Signature · 6 lines
2.20.1

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

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add support for Y21x formats as well, v2.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Add support for Y21x formats as well, v2.
URL : https://patchwork.freedesktop.org/series/57737/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5724 -> IGTPW_2572
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109315] +17

* igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109315] +17

* igt@gem_exec_basic@gtt-bsd1:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57
- fi-icl-u2: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_exec_parse@basic-allowed:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109289] +1

* igt@gem_exec_parse@basic-rejected:
- fi-icl-u3: NOTRUN -> SKIP [fdo#109289] +1

* igt@i915_selftest@live_contexts:
- fi-icl-u3: NOTRUN -> DMESG-FAIL [fdo#108569]
- fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#108569]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@kms_busy@basic-flip-c:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_chamelium@dp-edid-read:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109316] +2

* igt@kms_chamelium@hdmi-edid-read:
- fi-hsw-peppy: NOTRUN -> SKIP [fdo#109271] +46
- fi-icl-u3: NOTRUN -> SKIP [fdo#109284] +8

* igt@kms_chamelium@vga-hpd-fast:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109309] +1

* igt@kms_force_connector_basic@prune-stale-modes:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109285] +3
- fi-icl-u3: NOTRUN -> SKIP [fdo#109285] +3

* igt@kms_frontbuffer_tracking@basic:

    - fi-icl-u3:          NOTRUN -> FAIL [fdo#103167]
    - fi-hsw-peppy:       NOTRUN -> DMESG-FAIL [fdo#102614] / [fdo#107814]
    - fi-icl-u2:          NOTRUN -> FAIL [fdo#103167]

* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: PASS -> DMESG-FAIL [fdo#103182]

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107814]: https://bugs.freedesktop.org/show_bug.cgi?id=107814
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (41 -> 42)
------------------------------

Additional (4): fi-hsw-peppy fi-icl-u3 fi-icl-u2 fi-snb-2520m
Missing (3): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u

Build changes
-------------

* IGT: IGT_4877 -> IGTPW_2572

CI_DRM_5724: 3078a97d3931496cac45c0f4c94dc0f021fcb340 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2572: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2572/
IGT_4877: d15ad69be07a987d5c2ba408201b287adae8ca59 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#3 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add support for Y21x formats as well, v2.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/2] lib/igt_fb: Add support for Y21x formats as well, v2.
URL : https://patchwork.freedesktop.org/series/57737/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5724_full -> IGTPW_2572_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_sseu@invalid-args:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +13

* igt@i915_pm_backlight@bad-brightness:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +20

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: PASS -> SKIP [fdo#109271]
- shard-snb: PASS -> SKIP [fdo#109271]

* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-snb: PASS -> DMESG-WARN [fdo#107956]
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]

* igt@kms_busy@extended-pageflip-hang-oldfb-render-f:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_cursor_crc@cursor-128x42-random:
- shard-apl: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-64x64-dpms:
- shard-kbl: PASS -> FAIL [fdo#103232]

* igt@kms_cursor_crc@cursor-alpha-opaque:
- shard-apl: PASS -> FAIL [fdo#109350]

* igt@kms_flip@dpms-vs-vblank-race:
- shard-glk: PASS -> FAIL [fdo#103060]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: PASS -> FAIL [fdo#102887] / [fdo#105363]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: PASS -> FAIL [fdo#103167] +1

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: PASS -> FAIL [fdo#103167] +3

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-glk: PASS -> FAIL [fdo#103166] +1
- shard-apl: PASS -> FAIL [fdo#103166] +2

* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: PASS -> FAIL [fdo#109016]

* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]

* igt@kms_vblank@pipe-b-ts-continuation-modeset-hang:
- shard-apl: PASS -> FAIL [fdo#104894]

#### Possible fixes ####

* igt@kms_busy@extended-modeset-hang-newfb-render-b:

    - shard-hsw:          DMESG-WARN [fdo#107956] -> PASS +1
    - shard-kbl:          DMESG-WARN [fdo#107956] -> PASS +1
    - shard-snb:          DMESG-WARN [fdo#107956] -> PASS

* igt@kms_busy@extended-modeset-hang-oldfb-render-a:
- shard-snb: SKIP [fdo#109271] / [fdo#109278] -> PASS

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-apl: FAIL [fdo#107725] / [fdo#108145] -> PASS

* igt@kms_color@pipe-a-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS

* igt@kms_color@pipe-a-degamma:
- shard-apl: FAIL [fdo#104782] / [fdo#108145] -> PASS

* igt@kms_color@pipe-b-legacy-gamma:
- shard-apl: FAIL [fdo#104782] -> PASS

* igt@kms_cursor_crc@cursor-128x128-onscreen:
- shard-apl: FAIL [fdo#103232] -> PASS +4

* igt@kms_cursor_crc@cursor-256x256-dpms:
- shard-kbl: FAIL [fdo#103232] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt:
- shard-snb: SKIP [fdo#109271] -> PASS

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-apl: FAIL [fdo#103167] -> PASS +3

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-pwrite:
- shard-glk: FAIL [fdo#103167] -> PASS

* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-kbl: FAIL [fdo#103166] -> PASS +1

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:

    - shard-glk:          FAIL [fdo#108145] -> PASS
    - shard-kbl:          FAIL [fdo#108145] -> PASS
    - shard-apl:          FAIL [fdo#108145] -> PASS

* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-mid:
- shard-apl: DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS +13

* igt@kms_plane_multiple@atomic-pipe-b-tiling-x:
- shard-apl: FAIL [fdo#103166] -> PASS +1

* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-glk: FAIL [fdo#103166] -> PASS +4

* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS +2
- shard-kbl: FAIL [fdo#104894] -> PASS +1

* igt@perf@blocking:
- shard-hsw: FAIL [fdo#102252] -> PASS

#### Warnings ####

* igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
- shard-apl: DMESG-FAIL [fdo#103558] / [fdo#105602] / [fdo#108145] -> FAIL [fdo#108145]

* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-apl: DMESG-FAIL [fdo#103166] / [fdo#103558] / [fdo#105602] -> FAIL [fdo#103166]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102252]: https://bugs.freedesktop.org/show_bug.cgi?id=102252
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

Build changes
-------------

* IGT: IGT_4877 -> IGTPW_2572
* Piglit: piglit_4509 -> None

CI_DRM_5724: 3078a97d3931496cac45c0f4c94dc0f021fcb340 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2572: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2572/
IGT_4877: d15ad69be07a987d5c2ba408201b287adae8ca59 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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