* [PATCH v4 1/2] drm: Add drm_any_plane_has_format()
@ 2018-10-29 18:34 Ville Syrjala
2018-10-29 18:34 ` [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code Ville Syrjala
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Ville Syrjala @ 2018-10-29 18:34 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, Dhinakaran Pandiyan
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Add a function to check whether there is at least one plane that
supports a specific format and modifier combination. Drivers can
use this to reject unsupported formats/modifiers in .fb_create().
v2: Accept anyformat if the driver doesn't do planes (Eric)
s/planes_have_format/any_plane_has_format/ (Eric)
Check the modifier as well since we already have a function
that does both
v3: Don't do the check in the core since we may not know the
modifier yet, instead export the function and let drivers
call it themselves
Cc: Eric Anholt <eric@anholt.net>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
drivers/gpu/drm/drm_plane.c | 23 +++++++++++++++++++++++
include/drm/drm_mode_config.h | 6 ++++++
include/drm/drm_plane.h | 2 ++
3 files changed, 31 insertions(+)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 1fa98bd12003..679455e36829 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -636,6 +636,29 @@ static int __setplane_check(struct drm_plane *plane,
return 0;
}
+/**
+ * drm_any_plane_has_format - Check whether any plane supports this format and modifier combination
+ * @dev: DRM device
+ * @format: pixel format (DRM_FORMAT_*)
+ * @modifier: data layout modifier
+ *
+ * Returns:
+ * Whether at least one plane supports the specified format and modifier combination.
+ */
+bool drm_any_plane_has_format(struct drm_device *dev,
+ u32 format, u64 modifier)
+{
+ struct drm_plane *plane;
+
+ drm_for_each_plane(plane, dev) {
+ if (drm_plane_check_pixel_format(plane, format, modifier) == 0)
+ return true;
+ }
+
+ return false;
+}
+EXPORT_SYMBOL(drm_any_plane_has_format);
+
/*
* __setplane_internal - setplane handler for internal callers
*
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index d643d268693e..5dbeabdbaf91 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -52,6 +52,12 @@ struct drm_mode_config_funcs {
* requested metadata, but most of that is left to the driver. See
* &struct drm_mode_fb_cmd2 for details.
*
+ * To validate the pixel format and modifier drivers can use
+ * drm_any_plane_has_format() to make sure at least one plane supports
+ * the requested values. Note that the driver must first determine the
+ * actual modifier used if the request doesn't have it specified,
+ * ie. when (@mode_cmd->flags & DRM_MODE_FB_MODIFIERS) == 0.
+ *
* If the parameters are deemed valid and the backing storage objects in
* the underlying memory manager all exist, then the driver allocates
* a new &drm_framebuffer structure, subclassed to contain
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0a0834bef8bd..3701f56c3362 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -798,5 +798,7 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,
#define drm_for_each_plane(plane, dev) \
list_for_each_entry(plane, &(dev)->mode_config.plane_list, head)
+bool drm_any_plane_has_format(struct drm_device *dev,
+ u32 format, u64 modifier);
#endif
--
2.18.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code
2018-10-29 18:34 [PATCH v4 1/2] drm: Add drm_any_plane_has_format() Ville Syrjala
@ 2018-10-29 18:34 ` Ville Syrjala
2018-10-29 19:23 ` Dhinakaran Pandiyan
2018-10-29 20:48 ` ✓ Fi.CI.BAT: success for series starting with [v4,1/2] drm: Add drm_any_plane_has_format() Patchwork
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Ville Syrjala @ 2018-10-29 18:34 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, Dhinakaran Pandiyan
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Replace the messy framebuffer format/modifier validation code
with a single call to drm_any_plane_has_format(). The code was
extremely annoying to maintain as you had to have a lot of platform
checks for different formats. The new code requires zero maintenance.
v2: Nuke the modifier checks as well since the core does that too now
v3: Call drm_any_plane_has_format() from the driver code
v4: Rebase
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 105 ++-------------------------
1 file changed, 8 insertions(+), 97 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9b549d3dd055..de38d5545f3b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14368,7 +14368,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
{
struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
struct drm_framebuffer *fb = &intel_fb->base;
- struct drm_format_name_buf format_name;
u32 pitch_limit;
unsigned int tiling, stride;
int ret = -EINVAL;
@@ -14399,39 +14398,14 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
}
}
- /* Passed in modifier sanity checking. */
- switch (mode_cmd->modifier[0]) {
- case I915_FORMAT_MOD_Y_TILED_CCS:
- case I915_FORMAT_MOD_Yf_TILED_CCS:
- switch (mode_cmd->pixel_format) {
- case DRM_FORMAT_XBGR8888:
- case DRM_FORMAT_ABGR8888:
- case DRM_FORMAT_XRGB8888:
- case DRM_FORMAT_ARGB8888:
- break;
- default:
- DRM_DEBUG_KMS("RC supported only with RGB8888 formats\n");
- goto err;
- }
- /* fall through */
- case I915_FORMAT_MOD_Yf_TILED:
- if (mode_cmd->pixel_format == DRM_FORMAT_C8) {
- DRM_DEBUG_KMS("Indexed format does not support Yf tiling\n");
- goto err;
- }
- /* fall through */
- case I915_FORMAT_MOD_Y_TILED:
- if (INTEL_GEN(dev_priv) < 9) {
- DRM_DEBUG_KMS("Unsupported tiling 0x%llx!\n",
- mode_cmd->modifier[0]);
- goto err;
- }
- break;
- case DRM_FORMAT_MOD_LINEAR:
- case I915_FORMAT_MOD_X_TILED:
- break;
- default:
- DRM_DEBUG_KMS("Unsupported fb modifier 0x%llx!\n",
+ if (!drm_any_plane_has_format(&dev_priv->drm,
+ mode_cmd->pixel_format,
+ mode_cmd->modifier[0])) {
+ struct drm_format_name_buf format_name;
+
+ DRM_DEBUG_KMS("unsupported pixel format %s / modifier 0x%llx\n",
+ drm_get_format_name(mode_cmd->pixel_format,
+ &format_name),
mode_cmd->modifier[0]);
goto err;
}
@@ -14466,69 +14440,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
goto err;
}
- /* Reject formats not supported by any plane early. */
- switch (mode_cmd->pixel_format) {
- case DRM_FORMAT_C8:
- case DRM_FORMAT_RGB565:
- case DRM_FORMAT_XRGB8888:
- case DRM_FORMAT_ARGB8888:
- break;
- case DRM_FORMAT_XRGB1555:
- if (INTEL_GEN(dev_priv) > 3) {
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format, &format_name));
- goto err;
- }
- break;
- case DRM_FORMAT_ABGR8888:
- if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv) &&
- INTEL_GEN(dev_priv) < 9) {
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format, &format_name));
- goto err;
- }
- break;
- case DRM_FORMAT_XBGR8888:
- case DRM_FORMAT_XRGB2101010:
- case DRM_FORMAT_XBGR2101010:
- if (INTEL_GEN(dev_priv) < 4) {
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format, &format_name));
- goto err;
- }
- break;
- case DRM_FORMAT_ABGR2101010:
- if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) {
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format, &format_name));
- goto err;
- }
- break;
- case DRM_FORMAT_YUYV:
- case DRM_FORMAT_UYVY:
- case DRM_FORMAT_YVYU:
- case DRM_FORMAT_VYUY:
- if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv)) {
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format, &format_name));
- goto err;
- }
- break;
- case DRM_FORMAT_NV12:
- if (INTEL_GEN(dev_priv) < 9 || IS_SKYLAKE(dev_priv) ||
- IS_BROXTON(dev_priv)) {
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format,
- &format_name));
- goto err;
- }
- break;
- default:
- DRM_DEBUG_KMS("unsupported pixel format: %s\n",
- drm_get_format_name(mode_cmd->pixel_format, &format_name));
- goto err;
- }
-
/* FIXME need to adjust LINOFF/TILEOFF accordingly. */
if (mode_cmd->offsets[0] != 0)
goto err;
--
2.18.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code
2018-10-29 18:34 ` [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code Ville Syrjala
@ 2018-10-29 19:23 ` Dhinakaran Pandiyan
0 siblings, 0 replies; 9+ messages in thread
From: Dhinakaran Pandiyan @ 2018-10-29 19:23 UTC (permalink / raw)
To: Ville Syrjala, dri-devel; +Cc: intel-gfx
On Mon, 2018-10-29 at 20:34 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the messy framebuffer format/modifier validation code
> with a single call to drm_any_plane_has_format(). The code was
> extremely annoying to maintain as you had to have a lot of platform
> checks for different formats. The new code requires zero maintenance.
>
> v2: Nuke the modifier checks as well since the core does that too now
> v3: Call drm_any_plane_has_format() from the driver code
> v4: Rebase
>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
-DK
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 105 ++-----------------------
> --
> 1 file changed, 8 insertions(+), 97 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 9b549d3dd055..de38d5545f3b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14368,7 +14368,6 @@ static int intel_framebuffer_init(struct
> intel_framebuffer *intel_fb,
> {
> struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
> struct drm_framebuffer *fb = &intel_fb->base;
> - struct drm_format_name_buf format_name;
> u32 pitch_limit;
> unsigned int tiling, stride;
> int ret = -EINVAL;
> @@ -14399,39 +14398,14 @@ static int intel_framebuffer_init(struct
> intel_framebuffer *intel_fb,
> }
> }
>
> - /* Passed in modifier sanity checking. */
> - switch (mode_cmd->modifier[0]) {
> - case I915_FORMAT_MOD_Y_TILED_CCS:
> - case I915_FORMAT_MOD_Yf_TILED_CCS:
> - switch (mode_cmd->pixel_format) {
> - case DRM_FORMAT_XBGR8888:
> - case DRM_FORMAT_ABGR8888:
> - case DRM_FORMAT_XRGB8888:
> - case DRM_FORMAT_ARGB8888:
> - break;
> - default:
> - DRM_DEBUG_KMS("RC supported only with RGB8888
> formats\n");
> - goto err;
> - }
> - /* fall through */
> - case I915_FORMAT_MOD_Yf_TILED:
> - if (mode_cmd->pixel_format == DRM_FORMAT_C8) {
> - DRM_DEBUG_KMS("Indexed format does not support
> Yf tiling\n");
> - goto err;
> - }
> - /* fall through */
> - case I915_FORMAT_MOD_Y_TILED:
> - if (INTEL_GEN(dev_priv) < 9) {
> - DRM_DEBUG_KMS("Unsupported tiling 0x%llx!\n",
> - mode_cmd->modifier[0]);
> - goto err;
> - }
> - break;
> - case DRM_FORMAT_MOD_LINEAR:
> - case I915_FORMAT_MOD_X_TILED:
> - break;
> - default:
> - DRM_DEBUG_KMS("Unsupported fb modifier 0x%llx!\n",
> + if (!drm_any_plane_has_format(&dev_priv->drm,
> + mode_cmd->pixel_format,
> + mode_cmd->modifier[0])) {
> + struct drm_format_name_buf format_name;
> +
> + DRM_DEBUG_KMS("unsupported pixel format %s / modifier
> 0x%llx\n",
> + drm_get_format_name(mode_cmd-
> >pixel_format,
> + &format_name),
> mode_cmd->modifier[0]);
> goto err;
> }
> @@ -14466,69 +14440,6 @@ static int intel_framebuffer_init(struct
> intel_framebuffer *intel_fb,
> goto err;
> }
>
> - /* Reject formats not supported by any plane early. */
> - switch (mode_cmd->pixel_format) {
> - case DRM_FORMAT_C8:
> - case DRM_FORMAT_RGB565:
> - case DRM_FORMAT_XRGB8888:
> - case DRM_FORMAT_ARGB8888:
> - break;
> - case DRM_FORMAT_XRGB1555:
> - if (INTEL_GEN(dev_priv) > 3) {
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format, &format_name));
> - goto err;
> - }
> - break;
> - case DRM_FORMAT_ABGR8888:
> - if (!IS_VALLEYVIEW(dev_priv) &&
> !IS_CHERRYVIEW(dev_priv) &&
> - INTEL_GEN(dev_priv) < 9) {
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format, &format_name));
> - goto err;
> - }
> - break;
> - case DRM_FORMAT_XBGR8888:
> - case DRM_FORMAT_XRGB2101010:
> - case DRM_FORMAT_XBGR2101010:
> - if (INTEL_GEN(dev_priv) < 4) {
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format, &format_name));
> - goto err;
> - }
> - break;
> - case DRM_FORMAT_ABGR2101010:
> - if (!IS_VALLEYVIEW(dev_priv) &&
> !IS_CHERRYVIEW(dev_priv)) {
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format, &format_name));
> - goto err;
> - }
> - break;
> - case DRM_FORMAT_YUYV:
> - case DRM_FORMAT_UYVY:
> - case DRM_FORMAT_YVYU:
> - case DRM_FORMAT_VYUY:
> - if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv)) {
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format, &format_name));
> - goto err;
> - }
> - break;
> - case DRM_FORMAT_NV12:
> - if (INTEL_GEN(dev_priv) < 9 || IS_SKYLAKE(dev_priv) ||
> - IS_BROXTON(dev_priv)) {
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format,
> - &format_name)
> );
> - goto err;
> - }
> - break;
> - default:
> - DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> - drm_get_format_name(mode_cmd-
> >pixel_format, &format_name));
> - goto err;
> - }
> -
> /* FIXME need to adjust LINOFF/TILEOFF accordingly. */
> if (mode_cmd->offsets[0] != 0)
> goto err;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [v4,1/2] drm: Add drm_any_plane_has_format()
2018-10-29 18:34 [PATCH v4 1/2] drm: Add drm_any_plane_has_format() Ville Syrjala
2018-10-29 18:34 ` [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code Ville Syrjala
@ 2018-10-29 20:48 ` Patchwork
2018-10-29 23:00 ` [PATCH v4 1/2] " Eric Anholt
2018-10-30 1:48 ` ✓ Fi.CI.IGT: success for series starting with [v4,1/2] " Patchwork
3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-10-29 20:48 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== Series Details ==
Series: series starting with [v4,1/2] drm: Add drm_any_plane_has_format()
URL : https://patchwork.freedesktop.org/series/51700/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_5050 -> Patchwork_10633 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51700/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10633 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: PASS -> FAIL (fdo#103167)
==== Possible fixes ====
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS
==== Warnings ====
igt@drv_selftest@live_contexts:
fi-icl-u: INCOMPLETE (fdo#108535) -> DMESG-FAIL (fdo#108569)
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#108535 https://bugs.freedesktop.org/show_bug.cgi?id=108535
fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569
== Participating hosts (49 -> 43) ==
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-gdg-551
== Build changes ==
* Linux: CI_DRM_5050 -> Patchwork_10633
CI_DRM_5050: bc6dcb88d08376d667bcb0fa1e5b8d06ac2251f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4699: 1270ec553741ac20c45178d2b26f9a9562ea565f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10633: 9053e8add523c4bc75de6a9f83b5becea96bb19c @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
9053e8add523 drm/i915: Eliminate the horrendous format check code
cce1ebf50ced drm: Add drm_any_plane_has_format()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10633/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/2] drm: Add drm_any_plane_has_format()
2018-10-29 18:34 [PATCH v4 1/2] drm: Add drm_any_plane_has_format() Ville Syrjala
2018-10-29 18:34 ` [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code Ville Syrjala
2018-10-29 20:48 ` ✓ Fi.CI.BAT: success for series starting with [v4,1/2] drm: Add drm_any_plane_has_format() Patchwork
@ 2018-10-29 23:00 ` Eric Anholt
2018-10-30 9:35 ` Daniel Vetter
2018-10-30 1:48 ` ✓ Fi.CI.IGT: success for series starting with [v4,1/2] " Patchwork
3 siblings, 1 reply; 9+ messages in thread
From: Eric Anholt @ 2018-10-29 23:00 UTC (permalink / raw)
To: Ville Syrjala, dri-devel; +Cc: intel-gfx, Dhinakaran Pandiyan
[-- Attachment #1.1: Type: text/plain, Size: 1170 bytes --]
Ville Syrjala <ville.syrjala@linux.intel.com> writes:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add a function to check whether there is at least one plane that
> supports a specific format and modifier combination. Drivers can
> use this to reject unsupported formats/modifiers in .fb_create().
>
> v2: Accept anyformat if the driver doesn't do planes (Eric)
> s/planes_have_format/any_plane_has_format/ (Eric)
> Check the modifier as well since we already have a function
> that does both
> v3: Don't do the check in the core since we may not know the
> modifier yet, instead export the function and let drivers
> call it themselves
>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
I don't particularly see the point in having FB creation duplicate the
validation that atomic check will eventually do, and it means that FB
creation cost scales with plane count, but if i915's going to do this,
it seems reasonable for them.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [v4,1/2] drm: Add drm_any_plane_has_format()
2018-10-29 18:34 [PATCH v4 1/2] drm: Add drm_any_plane_has_format() Ville Syrjala
` (2 preceding siblings ...)
2018-10-29 23:00 ` [PATCH v4 1/2] " Eric Anholt
@ 2018-10-30 1:48 ` Patchwork
3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-10-30 1:48 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== Series Details ==
Series: series starting with [v4,1/2] drm: Add drm_any_plane_has_format()
URL : https://patchwork.freedesktop.org/series/51700/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_5050_full -> Patchwork_10633_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_10633_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_10633_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_10633_full:
=== IGT changes ===
==== Warnings ====
igt@perf_pmu@rc6:
shard-kbl: SKIP -> PASS
== Known issues ==
Here are the changes found in Patchwork_10633_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_schedule@pi-ringfull-bsd:
shard-skl: NOTRUN -> FAIL (fdo#103158)
igt@gem_softpin@noreloc-s3:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_color@pipe-c-degamma:
shard-apl: PASS -> FAIL (fdo#104782)
igt@kms_cursor_crc@cursor-128x42-onscreen:
shard-skl: NOTRUN -> FAIL (fdo#103232) +1
igt@kms_cursor_crc@cursor-256x85-random:
shard-apl: PASS -> FAIL (fdo#103232) +2
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
shard-glk: PASS -> FAIL (fdo#103167) +2
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
shard-skl: NOTRUN -> FAIL (fdo#105682)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_plane@pixel-format-pipe-c-planes:
shard-skl: NOTRUN -> DMESG-FAIL (fdo#106885, fdo#103166)
igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
shard-skl: NOTRUN -> FAIL (fdo#108145)
igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
shard-skl: NOTRUN -> FAIL (fdo#107815, fdo#108145) +2
igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
shard-skl: NOTRUN -> FAIL (fdo#107815)
igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
shard-apl: PASS -> FAIL (fdo#103166)
igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
shard-skl: NOTRUN -> FAIL (fdo#107815, fdo#103166)
==== Possible fixes ====
igt@gem_eio@in-flight-contexts-1us:
shard-glk: FAIL (fdo#105957) -> PASS
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: INCOMPLETE (fdo#106023, fdo#106887, fdo#103665) -> PASS
igt@gem_userptr_blits@unsync-unmap:
shard-glk: DMESG-WARN (fdo#105763, fdo#106538) -> PASS +1
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
shard-hsw: DMESG-WARN (fdo#107956) -> PASS
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c:
shard-kbl: DMESG-WARN (fdo#107956) -> PASS
igt@kms_cursor_crc@cursor-256x85-onscreen:
shard-apl: FAIL (fdo#103232) -> PASS +6
igt@kms_draw_crc@draw-method-rgb565-pwrite-ytiled:
shard-glk: FAIL (fdo#103184) -> PASS +1
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-pwrite:
shard-apl: FAIL (fdo#103167) -> PASS +1
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
shard-glk: FAIL (fdo#103167) -> PASS +2
igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-onoff:
shard-glk: DMESG-FAIL (fdo#106538) -> PASS
igt@kms_plane@plane-position-covered-pipe-a-planes:
shard-apl: FAIL (fdo#103166) -> PASS +2
igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
shard-glk: FAIL (fdo#103166) -> PASS
igt@kms_setmode@basic:
shard-hsw: FAIL (fdo#99912) -> PASS
igt@perf@polling:
shard-hsw: FAIL (fdo#102252) -> PASS
igt@pm_rpm@system-suspend-devices:
shard-skl: INCOMPLETE (fdo#107807) -> PASS
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103184 https://bugs.freedesktop.org/show_bug.cgi?id=103184
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106885 https://bugs.freedesktop.org/show_bug.cgi?id=106885
fdo#106887 https://bugs.freedesktop.org/show_bug.cgi?id=106887
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 6) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_5050 -> Patchwork_10633
CI_DRM_5050: bc6dcb88d08376d667bcb0fa1e5b8d06ac2251f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4699: 1270ec553741ac20c45178d2b26f9a9562ea565f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10633: 9053e8add523c4bc75de6a9f83b5becea96bb19c @ 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_10633/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/2] drm: Add drm_any_plane_has_format()
2018-10-29 23:00 ` [PATCH v4 1/2] " Eric Anholt
@ 2018-10-30 9:35 ` Daniel Vetter
2018-10-30 14:18 ` Ville Syrjälä
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Vetter @ 2018-10-30 9:35 UTC (permalink / raw)
To: Eric Anholt; +Cc: intel-gfx, dri-devel, Dhinakaran Pandiyan
On Mon, Oct 29, 2018 at 04:00:04PM -0700, Eric Anholt wrote:
> Ville Syrjala <ville.syrjala@linux.intel.com> writes:
>
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Add a function to check whether there is at least one plane that
> > supports a specific format and modifier combination. Drivers can
> > use this to reject unsupported formats/modifiers in .fb_create().
> >
> > v2: Accept anyformat if the driver doesn't do planes (Eric)
> > s/planes_have_format/any_plane_has_format/ (Eric)
> > Check the modifier as well since we already have a function
> > that does both
> > v3: Don't do the check in the core since we may not know the
> > modifier yet, instead export the function and let drivers
> > call it themselves
> >
> > Cc: Eric Anholt <eric@anholt.net>
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
>
> I don't particularly see the point in having FB creation duplicate the
> validation that atomic check will eventually do, and it means that FB
> creation cost scales with plane count, but if i915's going to do this,
> it seems reasonable for them.
atomic_check checks for a given plane only, I do think it makes sense to
make sure you can't create framebuffers that are impossible to use on a
given driver at addfb time.
In case the overhead is ever critical, we could compile a static map of
this at driver load time, and then check that.
Aside: Shouldn't we make this the default for atomic drivers? With
atomic drivers we can assume that all planes have valid format lists
(because atomic_check checks them already). Only with non-atomic drivers,
how might have a faked primary plane is this not a valid assumption ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/2] drm: Add drm_any_plane_has_format()
2018-10-30 9:35 ` Daniel Vetter
@ 2018-10-30 14:18 ` Ville Syrjälä
2018-10-30 15:35 ` Daniel Vetter
0 siblings, 1 reply; 9+ messages in thread
From: Ville Syrjälä @ 2018-10-30 14:18 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx, Dhinakaran Pandiyan, dri-devel
On Tue, Oct 30, 2018 at 10:35:07AM +0100, Daniel Vetter wrote:
> On Mon, Oct 29, 2018 at 04:00:04PM -0700, Eric Anholt wrote:
> > Ville Syrjala <ville.syrjala@linux.intel.com> writes:
> >
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Add a function to check whether there is at least one plane that
> > > supports a specific format and modifier combination. Drivers can
> > > use this to reject unsupported formats/modifiers in .fb_create().
> > >
> > > v2: Accept anyformat if the driver doesn't do planes (Eric)
> > > s/planes_have_format/any_plane_has_format/ (Eric)
> > > Check the modifier as well since we already have a function
> > > that does both
> > > v3: Don't do the check in the core since we may not know the
> > > modifier yet, instead export the function and let drivers
> > > call it themselves
> > >
> > > Cc: Eric Anholt <eric@anholt.net>
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> >
> > I don't particularly see the point in having FB creation duplicate the
> > validation that atomic check will eventually do, and it means that FB
> > creation cost scales with plane count, but if i915's going to do this,
> > it seems reasonable for them.
>
> atomic_check checks for a given plane only, I do think it makes sense to
> make sure you can't create framebuffers that are impossible to use on a
> given driver at addfb time.
>
> In case the overhead is ever critical, we could compile a static map of
> this at driver load time, and then check that.
>
> Aside: Shouldn't we make this the default for atomic drivers? With
> atomic drivers we can assume that all planes have valid format lists
> (because atomic_check checks them already). Only with non-atomic drivers,
> how might have a faked primary plane is this not a valid assumption ...
The problem of making this automagic for everyone was the
legacy tiling->modifier thing.
https://patchwork.freedesktop.org/patch/210193/ +
https://patchwork.freedesktop.org/patch/208070/
is the best I could really come up with when I tried to make this
entirely automagic. I haven't bothered to revisit those because I
wasn't entirely happy with needing the extra vfunc, and people
didn't seem too excited about this idea.
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/2] drm: Add drm_any_plane_has_format()
2018-10-30 14:18 ` Ville Syrjälä
@ 2018-10-30 15:35 ` Daniel Vetter
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2018-10-30 15:35 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx, dri-devel, Dhinakaran Pandiyan
On Tue, Oct 30, 2018 at 04:18:28PM +0200, Ville Syrjälä wrote:
> On Tue, Oct 30, 2018 at 10:35:07AM +0100, Daniel Vetter wrote:
> > On Mon, Oct 29, 2018 at 04:00:04PM -0700, Eric Anholt wrote:
> > > Ville Syrjala <ville.syrjala@linux.intel.com> writes:
> > >
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > Add a function to check whether there is at least one plane that
> > > > supports a specific format and modifier combination. Drivers can
> > > > use this to reject unsupported formats/modifiers in .fb_create().
> > > >
> > > > v2: Accept anyformat if the driver doesn't do planes (Eric)
> > > > s/planes_have_format/any_plane_has_format/ (Eric)
> > > > Check the modifier as well since we already have a function
> > > > that does both
> > > > v3: Don't do the check in the core since we may not know the
> > > > modifier yet, instead export the function and let drivers
> > > > call it themselves
> > > >
> > > > Cc: Eric Anholt <eric@anholt.net>
> > > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > >
> > > I don't particularly see the point in having FB creation duplicate the
> > > validation that atomic check will eventually do, and it means that FB
> > > creation cost scales with plane count, but if i915's going to do this,
> > > it seems reasonable for them.
> >
> > atomic_check checks for a given plane only, I do think it makes sense to
> > make sure you can't create framebuffers that are impossible to use on a
> > given driver at addfb time.
> >
> > In case the overhead is ever critical, we could compile a static map of
> > this at driver load time, and then check that.
> >
> > Aside: Shouldn't we make this the default for atomic drivers? With
> > atomic drivers we can assume that all planes have valid format lists
> > (because atomic_check checks them already). Only with non-atomic drivers,
> > how might have a faked primary plane is this not a valid assumption ...
>
> The problem of making this automagic for everyone was the
> legacy tiling->modifier thing.
>
> https://patchwork.freedesktop.org/patch/210193/ +
> https://patchwork.freedesktop.org/patch/208070/
> is the best I could really come up with when I tried to make this
> entirely automagic. I haven't bothered to revisit those because I
> wasn't entirely happy with needing the extra vfunc, and people
> didn't seem too excited about this idea.
Hm yeah for full format+modifier checking we need a hook. For format-only
checking we can get by with requiring atomic only I think.
Anyway, kinda orthogonal to all this.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-10-30 15:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 18:34 [PATCH v4 1/2] drm: Add drm_any_plane_has_format() Ville Syrjala
2018-10-29 18:34 ` [PATCH v4 2/2] drm/i915: Eliminate the horrendous format check code Ville Syrjala
2018-10-29 19:23 ` Dhinakaran Pandiyan
2018-10-29 20:48 ` ✓ Fi.CI.BAT: success for series starting with [v4,1/2] drm: Add drm_any_plane_has_format() Patchwork
2018-10-29 23:00 ` [PATCH v4 1/2] " Eric Anholt
2018-10-30 9:35 ` Daniel Vetter
2018-10-30 14:18 ` Ville Syrjälä
2018-10-30 15:35 ` Daniel Vetter
2018-10-30 1:48 ` ✓ Fi.CI.IGT: success for series starting with [v4,1/2] " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox