Skip to contentSkip to conversation

drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support.

PATCH Superseded StanLis 3 participants 4 messages Jul 2, 2018 – Jul 3, 2018

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

StanLis

author
#0 lore raw

PATCH v3 1/1 drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support.

From: Stanislav Lisovskiy <[email protected]>

PLANE_CTL_FORMAT_AYUV is already supported, according to hardware specification.

v2: Edited commit message, removed redundant whitespaces.

v3: Fixed fallthrough logic for the format switch cases.

---
 drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++
 drivers/gpu/drm/i915/intel_sprite.c  |  5 +++++
 2 files changed, 15 insertions(+)
drivers/gpu/drm/i915/intel_display.c +10 -0
index 56818a45181c..2447a620abb5 100644
@@ -86,6 +86,7 @@ static const uint32_t skl_primary_formats[] = {
 	DRM_FORMAT_YVYU,
 	DRM_FORMAT_UYVY,
 	DRM_FORMAT_VYUY,
+	DRM_FORMAT_AYUV,
 };
 
 static const uint32_t skl_pri_planar_formats[] = {
@@ -102,6 +103,7 @@ static const uint32_t skl_pri_planar_formats[] = {
 	DRM_FORMAT_UYVY,
 	DRM_FORMAT_VYUY,
 	DRM_FORMAT_NV12,
+	DRM_FORMAT_AYUV,
 };
 
 static const uint64_t skl_format_modifiers_noccs[] = {
@@ -3497,6 +3499,8 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)
 		return PLANE_CTL_FORMAT_XRGB_2101010;
 	case DRM_FORMAT_XBGR2101010:
 		return PLANE_CTL_ORDER_RGBX | PLANE_CTL_FORMAT_XRGB_2101010;
+	case DRM_FORMAT_AYUV:
+		return PLANE_CTL_FORMAT_AYUV;
 	case DRM_FORMAT_YUYV:
 		return PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_YUYV;
 	case DRM_FORMAT_YVYU:
@@ -13371,6 +13375,11 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
 	}
 
 	switch (format) {
+	case DRM_FORMAT_AYUV:
+		if (modifier == DRM_FORMAT_MOD_LINEAR ||
+		    modifier == I915_FORMAT_MOD_X_TILED ||
+		    modifier == I915_FORMAT_MOD_Y_TILED)
+			return true;
 	case DRM_FORMAT_XRGB8888:
 	case DRM_FORMAT_XBGR8888:
 	case DRM_FORMAT_ARGB8888:
@@ -14510,6 +14519,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 			goto err;
 		}
 		break;
+	case DRM_FORMAT_AYUV:
 	case DRM_FORMAT_YUYV:
 	case DRM_FORMAT_UYVY:
 	case DRM_FORMAT_YVYU:
drivers/gpu/drm/i915/intel_sprite.c +5 -0
index 344c0e709b19..0a6958f07dae 100644
@@ -1405,6 +1405,11 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
 	}
 
 	switch (format) {
+	case DRM_FORMAT_AYUV:
+		if (modifier == DRM_FORMAT_MOD_LINEAR ||
+		    modifier == I915_FORMAT_MOD_X_TILED ||
+		    modifier == I915_FORMAT_MOD_Y_TILED)
+			return true;
 	case DRM_FORMAT_XRGB8888:
 	case DRM_FORMAT_XBGR8888:
 	case DRM_FORMAT_ARGB8888:
Signature · 6 lines
2.17.0

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

✓ Fi.CI.BAT: success for drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support. (rev3)

== Series Details ==

== Series Details ==

Series: drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support. (rev3)
URL : https://patchwork.freedesktop.org/series/45774/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4413 -> Patchwork_9499 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/45774/revisions/3/mbox/

== Known issues ==

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

=== IGT changes ===

    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

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

Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

== Build changes ==

* Linux: CI_DRM_4413 -> Patchwork_9499

CI_DRM_4413: df42fb566d33f5889c8d61f9929d3e72d4a16813 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4532: 840d12e2f050b784552197403d6575a57b6e896d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9499: e3d5d0eb50dde824f73f6ee82168f9d3b284bf71 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

e3d5d0eb50dd drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support.

== Logs ==

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

#2 lore raw

✗ Fi.CI.IGT: failure for drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support. (rev3)

In reply to StanLis
== Series Details ==

== Series Details ==

Series: drm/i915: Adding YUV444 packed format(DRM_FORMAT_AYUV) support. (rev3)
URL : https://patchwork.freedesktop.org/series/45774/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4413_full -> Patchwork_9499_full =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_9499_full absolutely need to be verified manually.

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-apl:          PASS -> FAIL

    
    ==== Warnings ====

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

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_big:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540) +1

    igt@gem_exec_schedule@pi-ringfull-bsd2:
      shard-kbl:          NOTRUN -> FAIL (fdo#103158)

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105189)

    igt@kms_flip@2x-plain-flip-fb-recreate:
      shard-glk:          PASS -> FAIL (fdo#100368)

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

    
    ==== Possible fixes ====

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

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
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_4413 -> Patchwork_9499

CI_DRM_4413: df42fb566d33f5889c8d61f9929d3e72d4a16813 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4532: 840d12e2f050b784552197403d6575a57b6e896d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9499: e3d5d0eb50dde824f73f6ee82168f9d3b284bf71 @ 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_9499/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
In reply to StanLis
Quoted 45 lines · StanLis

From: Stanislav Lisovskiy <[email protected]>

PLANE_CTL_FORMAT_AYUV is already supported, according to hardware specification.

v2: Edited commit message, removed redundant whitespaces.

v3: Fixed fallthrough logic for the format switch cases.

---
  drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++
  drivers/gpu/drm/i915/intel_sprite.c  |  5 +++++
  2 files changed, 15 insertions(+)
drivers/gpu/drm/i915/intel_display.c +4 -0
index 56818a45181c..2447a620abb5 100644
@@ -86,6 +86,7 @@ static const uint32_t skl_primary_formats[] = {
  	DRM_FORMAT_YVYU,
  	DRM_FORMAT_UYVY,
  	DRM_FORMAT_VYUY,
+	DRM_FORMAT_AYUV,
  };
 
  static const uint32_t skl_pri_planar_formats[] = {
@@ -102,6 +103,7 @@ static const uint32_t skl_pri_planar_formats[] = {
  	DRM_FORMAT_UYVY,
  	DRM_FORMAT_VYUY,
  	DRM_FORMAT_NV12,
+	DRM_FORMAT_AYUV,
  };
 
  static const uint64_t skl_format_modifiers_noccs[] = {
@@ -3497,6 +3499,8 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)
  		return PLANE_CTL_FORMAT_XRGB_2101010;
  	case DRM_FORMAT_XBGR2101010:
  		return PLANE_CTL_ORDER_RGBX | PLANE_CTL_FORMAT_XRGB_2101010;
+	case DRM_FORMAT_AYUV:
+		return PLANE_CTL_FORMAT_AYUV;
  	case DRM_FORMAT_YUYV:
  		return PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_YUYV;
  	case DRM_FORMAT_YVYU:

drivers/gpu/drm/i915/intel_display.c static bool skl_plane_format_mod_supported(struct drm_plane *_plane, · line 13382

Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +5 -0
@@ -13371,6 +13375,11 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
  	}
 
  	switch (format) {
+	case DRM_FORMAT_AYUV:
+		if (modifier == DRM_FORMAT_MOD_LINEAR ||
+		    modifier == I915_FORMAT_MOD_X_TILED ||
+		    modifier == I915_FORMAT_MOD_Y_TILED)
+			return true;

These modifiers look the same as for C8 format, why not just add AYUV next to C8?

Quoted 16 lines
drivers/gpu/drm/i915/intel_display.c +1 -0
  	case DRM_FORMAT_XRGB8888:
  	case DRM_FORMAT_XBGR8888:
  	case DRM_FORMAT_ARGB8888:
@@ -14510,6 +14519,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
  			goto err;
  		}
  		break;
+	case DRM_FORMAT_AYUV:
  	case DRM_FORMAT_YUYV:
  	case DRM_FORMAT_UYVY:
  	case DRM_FORMAT_YVYU:
drivers/gpu/drm/i915/intel_sprite.c +0 -0
index 344c0e709b19..0a6958f07dae 100644

drivers/gpu/drm/i915/intel_sprite.c static bool skl_plane_format_mod_supported(struct drm_plane *_plane, · line 1412

Quoted 8 lines
drivers/gpu/drm/i915/intel_sprite.c +5 -0
@@ -1405,6 +1405,11 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
  	}
 
  	switch (format) {
+	case DRM_FORMAT_AYUV:
+		if (modifier == DRM_FORMAT_MOD_LINEAR ||
+		    modifier == I915_FORMAT_MOD_X_TILED ||
+		    modifier == I915_FORMAT_MOD_Y_TILED)
+			return true;

same as above.

drivers/gpu/drm/i915/intel_sprite.c static bool skl_plane_format_mod_supported(struct drm_plane *_plane, · line 1415

Quoted 4 lines
drivers/gpu/drm/i915/intel_sprite.c +0 -0
  	case DRM_FORMAT_XRGB8888:
  	case DRM_FORMAT_XBGR8888:
  	case DRM_FORMAT_ARGB8888:

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