* [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
@ 2017-11-03 14:37 Juha-Pekka Heikkila
2017-11-03 14:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2017-11-03 14:37 UTC (permalink / raw)
To: intel-gfx
90/270 16bpp rotation is supported in hadrware from Gen10 onwards. I modified
kms_rotation_crc igt test to test this feature:
https://patchwork.freedesktop.org/patch/186179/
/Juha-Pekka
Juha-Pekka Heikkila (2):
drm/i915: Move 90/270 rotation validity check into its own function
drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards.
drivers/gpu/drm/i915/intel_atomic_plane.c | 60 +++++++++++++++++++------------
1 file changed, 37 insertions(+), 23 deletions(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function
2017-11-03 14:37 [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Juha-Pekka Heikkila
@ 2017-11-03 14:37 ` Juha-Pekka Heikkila
2017-11-03 15:50 ` Ville Syrjälä
2017-11-03 14:37 ` [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards Juha-Pekka Heikkila
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2017-11-03 14:37 UTC (permalink / raw)
To: intel-gfx
This makes intel_plane_atomic_check_with_state() generally shorter.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
drivers/gpu/drm/i915/intel_atomic_plane.c | 53 +++++++++++++++++--------------
1 file changed, 30 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 8e6dc15..6c4c82e2d 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -107,6 +107,35 @@ intel_plane_destroy_state(struct drm_plane *plane,
drm_atomic_helper_plane_destroy_state(plane, state);
}
+static bool intel_valid_rotation(const struct drm_plane_state *state)
+{
+ struct drm_format_name_buf format_name;
+
+ if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
+ state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
+ DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
+ return false;
+ }
+
+ /*
+ * 90/270 is not allowed with RGB64 16:16:16:16,
+ * RGB 16-bit 5:6:5, and Indexed 8-bit.
+ * TBD: Add RGB64 case once its added in supported format list.
+ */
+ switch (state->fb->format->format) {
+ case DRM_FORMAT_C8:
+ case DRM_FORMAT_RGB565:
+ DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
+ drm_get_format_name(state->fb->format->format,
+ &format_name));
+ return false;
+
+ default:
+ break;
+ }
+ return true;
+}
+
int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
struct intel_crtc_state *crtc_state,
const struct intel_plane_state *old_plane_state,
@@ -138,30 +167,8 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
if (state->fb && drm_rotation_90_or_270(state->rotation)) {
- struct drm_format_name_buf format_name;
-
- if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
- state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
- DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
+ if (!intel_valid_rotation(state))
return -EINVAL;
- }
-
- /*
- * 90/270 is not allowed with RGB64 16:16:16:16,
- * RGB 16-bit 5:6:5, and Indexed 8-bit.
- * TBD: Add RGB64 case once its added in supported format list.
- */
- switch (state->fb->format->format) {
- case DRM_FORMAT_C8:
- case DRM_FORMAT_RGB565:
- DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
- drm_get_format_name(state->fb->format->format,
- &format_name));
- return -EINVAL;
-
- default:
- break;
- }
}
/* CHV ignores the mirror bit when the rotate bit is set :( */
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function
2017-11-03 14:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
@ 2017-11-03 15:50 ` Ville Syrjälä
2017-11-03 15:52 ` Ville Syrjälä
0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2017-11-03 15:50 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: intel-gfx
On Fri, Nov 03, 2017 at 04:37:57PM +0200, Juha-Pekka Heikkila wrote:
> This makes intel_plane_atomic_check_with_state() generally shorter.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_atomic_plane.c | 53 +++++++++++++++++--------------
> 1 file changed, 30 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index 8e6dc15..6c4c82e2d 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -107,6 +107,35 @@ intel_plane_destroy_state(struct drm_plane *plane,
> drm_atomic_helper_plane_destroy_state(plane, state);
> }
>
> +static bool intel_valid_rotation(const struct drm_plane_state *state)
> +{
> + struct drm_format_name_buf format_name;
> +
> + if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
> + state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
> + DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
> + return false;
> + }
> +
> + /*
> + * 90/270 is not allowed with RGB64 16:16:16:16,
> + * RGB 16-bit 5:6:5, and Indexed 8-bit.
> + * TBD: Add RGB64 case once its added in supported format list.
> + */
> + switch (state->fb->format->format) {
> + case DRM_FORMAT_C8:
> + case DRM_FORMAT_RGB565:
> + DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
> + drm_get_format_name(state->fb->format->format,
> + &format_name));
> + return false;
> +
> + default:
> + break;
> + }
Usually there's an empty line after the final return.
> + return true;
> +}
> +
> int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
> struct intel_crtc_state *crtc_state,
> const struct intel_plane_state *old_plane_state,
> @@ -138,30 +167,8 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
> crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
>
> if (state->fb && drm_rotation_90_or_270(state->rotation)) {
I'd pull these checks into the new function as well (as an early
return so that we don't have to needlessly indent the whole
function body). Otherwise the function name doesn't really match
the implementation.
> - struct drm_format_name_buf format_name;
> -
> - if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
> - state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
> - DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
> + if (!intel_valid_rotation(state))
> return -EINVAL;
> - }
> -
> - /*
> - * 90/270 is not allowed with RGB64 16:16:16:16,
> - * RGB 16-bit 5:6:5, and Indexed 8-bit.
> - * TBD: Add RGB64 case once its added in supported format list.
> - */
> - switch (state->fb->format->format) {
> - case DRM_FORMAT_C8:
> - case DRM_FORMAT_RGB565:
> - DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
> - drm_get_format_name(state->fb->format->format,
> - &format_name));
> - return -EINVAL;
> -
> - default:
> - break;
> - }
> }
>
> /* CHV ignores the mirror bit when the rotate bit is set :( */
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function
2017-11-03 15:50 ` Ville Syrjälä
@ 2017-11-03 15:52 ` Ville Syrjälä
0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2017-11-03 15:52 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: intel-gfx
On Fri, Nov 03, 2017 at 05:50:17PM +0200, Ville Syrjälä wrote:
> On Fri, Nov 03, 2017 at 04:37:57PM +0200, Juha-Pekka Heikkila wrote:
> > This makes intel_plane_atomic_check_with_state() generally shorter.
> >
> > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> > ---
> > drivers/gpu/drm/i915/intel_atomic_plane.c | 53 +++++++++++++++++--------------
> > 1 file changed, 30 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> > index 8e6dc15..6c4c82e2d 100644
> > --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> > @@ -107,6 +107,35 @@ intel_plane_destroy_state(struct drm_plane *plane,
> > drm_atomic_helper_plane_destroy_state(plane, state);
> > }
> >
> > +static bool intel_valid_rotation(const struct drm_plane_state *state)
Oh and please name this parameter 'plane_state'. We're trying to slowly
clean up the mess with inconsistent naming of things.
> > +{
> > + struct drm_format_name_buf format_name;
> > +
> > + if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
> > + state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
> > + DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
> > + return false;
> > + }
> > +
> > + /*
> > + * 90/270 is not allowed with RGB64 16:16:16:16,
> > + * RGB 16-bit 5:6:5, and Indexed 8-bit.
> > + * TBD: Add RGB64 case once its added in supported format list.
> > + */
> > + switch (state->fb->format->format) {
> > + case DRM_FORMAT_C8:
> > + case DRM_FORMAT_RGB565:
> > + DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
> > + drm_get_format_name(state->fb->format->format,
> > + &format_name));
> > + return false;
> > +
> > + default:
> > + break;
> > + }
>
> Usually there's an empty line after the final return.
>
> > + return true;
> > +}
> > +
> > int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
> > struct intel_crtc_state *crtc_state,
> > const struct intel_plane_state *old_plane_state,
> > @@ -138,30 +167,8 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
> > crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
> >
> > if (state->fb && drm_rotation_90_or_270(state->rotation)) {
>
> I'd pull these checks into the new function as well (as an early
> return so that we don't have to needlessly indent the whole
> function body). Otherwise the function name doesn't really match
> the implementation.
>
> > - struct drm_format_name_buf format_name;
> > -
> > - if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
> > - state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
> > - DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
> > + if (!intel_valid_rotation(state))
> > return -EINVAL;
> > - }
> > -
> > - /*
> > - * 90/270 is not allowed with RGB64 16:16:16:16,
> > - * RGB 16-bit 5:6:5, and Indexed 8-bit.
> > - * TBD: Add RGB64 case once its added in supported format list.
> > - */
> > - switch (state->fb->format->format) {
> > - case DRM_FORMAT_C8:
> > - case DRM_FORMAT_RGB565:
> > - DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
> > - drm_get_format_name(state->fb->format->format,
> > - &format_name));
> > - return -EINVAL;
> > -
> > - default:
> > - break;
> > - }
> > }
> >
> > /* CHV ignores the mirror bit when the rotate bit is set :( */
> > --
> > 2.7.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Ville Syrjälä
> Intel OTC
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards.
2017-11-03 14:37 [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Juha-Pekka Heikkila
2017-11-03 14:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
@ 2017-11-03 14:37 ` Juha-Pekka Heikkila
2017-11-03 16:03 ` Ville Syrjälä
2017-11-03 15:17 ` ✓ Fi.CI.BAT: success for drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Patchwork
2017-11-03 18:10 ` ✗ Fi.CI.IGT: warning " Patchwork
3 siblings, 1 reply; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2017-11-03 14:37 UTC (permalink / raw)
To: intel-gfx
From gen10 onwards 16bpp 90/270 rotation is supported on hardware.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Testcase: https://patchwork.freedesktop.org/patch/186179/
---
drivers/gpu/drm/i915/intel_atomic_plane.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 6c4c82e2d..502d27a 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -107,7 +107,8 @@ intel_plane_destroy_state(struct drm_plane *plane,
drm_atomic_helper_plane_destroy_state(plane, state);
}
-static bool intel_valid_rotation(const struct drm_plane_state *state)
+static bool intel_valid_rotation(const struct drm_plane_state *state,
+ const struct drm_i915_private *dev_priv)
{
struct drm_format_name_buf format_name;
@@ -118,13 +119,19 @@ static bool intel_valid_rotation(const struct drm_plane_state *state)
}
/*
- * 90/270 is not allowed with RGB64 16:16:16:16,
- * RGB 16-bit 5:6:5, and Indexed 8-bit.
+ * 90/270 is not allowed with RGB64 16:16:16:16 and Indexed 8-bit.
+ * RGB 16-bit 5:6:5 is allowed gen10 onwards.
* TBD: Add RGB64 case once its added in supported format list.
*/
switch (state->fb->format->format) {
- case DRM_FORMAT_C8:
case DRM_FORMAT_RGB565:
+ /*
+ * gen10 onwards supports 16bpp 90/270 rotation
+ */
+ if (INTEL_GEN(dev_priv) >= 10)
+ break;
+
+ case DRM_FORMAT_C8:
DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
drm_get_format_name(state->fb->format->format,
&format_name));
@@ -167,7 +174,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
if (state->fb && drm_rotation_90_or_270(state->rotation)) {
- if (!intel_valid_rotation(state))
+ if (!intel_valid_rotation(state, dev_priv))
return -EINVAL;
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards.
2017-11-03 14:37 ` [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards Juha-Pekka Heikkila
@ 2017-11-03 16:03 ` Ville Syrjälä
0 siblings, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2017-11-03 16:03 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: intel-gfx
On Fri, Nov 03, 2017 at 04:37:58PM +0200, Juha-Pekka Heikkila wrote:
> From gen10 onwards 16bpp 90/270 rotation is supported on hardware.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Testcase: https://patchwork.freedesktop.org/patch/186179/
> ---
> drivers/gpu/drm/i915/intel_atomic_plane.c | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index 6c4c82e2d..502d27a 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -107,7 +107,8 @@ intel_plane_destroy_state(struct drm_plane *plane,
> drm_atomic_helper_plane_destroy_state(plane, state);
> }
>
> -static bool intel_valid_rotation(const struct drm_plane_state *state)
> +static bool intel_valid_rotation(const struct drm_plane_state *state,
> + const struct drm_i915_private *dev_priv)
> {
I wouldn't pass the dev_priv. We can dig it out here, eg:
struct intel_plane *plane = to_intel_plane(plane_state->base.plane);
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
When we do pass dev_priv, it's usually the first parameter to the
function.
> struct drm_format_name_buf format_name;
>
> @@ -118,13 +119,19 @@ static bool intel_valid_rotation(const struct drm_plane_state *state)
> }
>
> /*
> - * 90/270 is not allowed with RGB64 16:16:16:16,
> - * RGB 16-bit 5:6:5, and Indexed 8-bit.
> + * 90/270 is not allowed with RGB64 16:16:16:16 and Indexed 8-bit.
> + * RGB 16-bit 5:6:5 is allowed gen10 onwards.
> * TBD: Add RGB64 case once its added in supported format list.
> */
> switch (state->fb->format->format) {
> - case DRM_FORMAT_C8:
> case DRM_FORMAT_RGB565:
> + /*
> + * gen10 onwards supports 16bpp 90/270 rotation
> + */
This comment looks rather redundant.
> + if (INTEL_GEN(dev_priv) >= 10)
> + break;
> +
+ /* fall through */
I believe we have -Wimplicit-fallthrough now enabled, and I think that
would warn about this w/o the comment if you have a recent enough gcc.
> + case DRM_FORMAT_C8:
> DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
> drm_get_format_name(state->fb->format->format,
> &format_name));
> @@ -167,7 +174,7 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
> crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
>
> if (state->fb && drm_rotation_90_or_270(state->rotation)) {
> - if (!intel_valid_rotation(state))
> + if (!intel_valid_rotation(state, dev_priv))
> return -EINVAL;
> }
>
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
2017-11-03 14:37 [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Juha-Pekka Heikkila
2017-11-03 14:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
2017-11-03 14:37 ` [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards Juha-Pekka Heikkila
@ 2017-11-03 15:17 ` Patchwork
2017-11-03 18:10 ` ✗ Fi.CI.IGT: warning " Patchwork
3 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2017-11-03 15:17 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
URL : https://patchwork.freedesktop.org/series/33133/
State : success
== Summary ==
Series 33133v1 drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
https://patchwork.freedesktop.org/api/1.0/series/33133/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-wb-set-default:
incomplete -> PASS (fi-glk-dsi)
Test gem_exec_reloc:
Subgroup basic-write-gtt-active:
fail -> PASS (fi-gdg-551) fdo#102582
Test kms_busy:
Subgroup basic-flip-b:
fail -> PASS (fi-bwr-2160)
Subgroup basic-flip-c:
notrun -> INCOMPLETE (fi-glk-dsi)
Test drv_module_reload:
Subgroup basic-no-display:
fail -> PASS (fi-hsw-4770r) fdo#103534
fdo#102582 https://bugs.freedesktop.org/show_bug.cgi?id=102582
fdo#103534 https://bugs.freedesktop.org/show_bug.cgi?id=103534
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:449s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:449s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:377s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:549s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:276s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:505s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:503s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:505s
fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:490s
fi-cfl-s total:289 pass:254 dwarn:3 dfail:0 fail:0 skip:32 time:555s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:428s
fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:263s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:583s
fi-glk-dsi total:208 pass:185 dwarn:0 dfail:0 fail:0 skip:22
fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:435s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:432s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:426s
fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:499s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:461s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:494s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:575s
fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:479s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:585s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:564s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:452s
fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:600s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:647s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:517s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:502s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:454s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:588s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:425s
de359919ae463cdaef6bc6890156df84e19dee2a drm-tip: 2017y-11m-03d-14h-00m-37s UTC integration manifest
0f5c0cbf06bf drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards.
523e634c3ba8 drm/i915: Move 90/270 rotation validity check into its own function
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6942/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread* ✗ Fi.CI.IGT: warning for drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
2017-11-03 14:37 [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Juha-Pekka Heikkila
` (2 preceding siblings ...)
2017-11-03 15:17 ` ✓ Fi.CI.BAT: success for drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Patchwork
@ 2017-11-03 18:10 ` Patchwork
3 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2017-11-03 18:10 UTC (permalink / raw)
To: Juha-Pekka Heikkila; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
URL : https://patchwork.freedesktop.org/series/33133/
State : warning
== Summary ==
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-C:
pass -> DMESG-WARN (shard-hsw)
Test drv_suspend:
Subgroup fence-restore-untiled-hibernate:
dmesg-fail -> FAIL (shard-hsw) fdo#103375
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
shard-hsw total:2539 pass:1433 dwarn:1 dfail:0 fail:8 skip:1097 time:9296s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6942/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10
@ 2017-11-21 14:15 Juha-Pekka Heikkila
2017-11-21 14:15 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
0 siblings, 1 reply; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2017-11-21 14:15 UTC (permalink / raw)
To: intel-gfx
90/270 16bpp rotation is supported in hadrware from Gen10 onwards. I modified
kms_rotation_crc igt test to test this feature:
https://patchwork.freedesktop.org/series/33132/
v2: (Ville Syrjälä) move all rotation related checks from
intel_plane_atomic_check_with_state into new function
and don't pass dev_priv pointer around.
v3: (Ville Syrjälä) rebase and small detail changes.
/Juha-Pekka
Juha-Pekka Heikkila (2):
drm/i915: Move 90/270 rotation validity check into its own function
drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards.
drivers/gpu/drm/i915/intel_atomic_plane.c | 81 ++++++++++++++++++-------------
1 file changed, 48 insertions(+), 33 deletions(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function
2017-11-21 14:15 [PATCH 0/2] " Juha-Pekka Heikkila
@ 2017-11-21 14:15 ` Juha-Pekka Heikkila
0 siblings, 0 replies; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2017-11-21 14:15 UTC (permalink / raw)
To: intel-gfx
This makes intel_plane_atomic_check_with_state() generally shorter.
v2: (Ville Syrjälä) move all rotation related checks into new function and don't pass dev_priv pointer around.
v3: (Ville Syljälä) rebase and small detail changes.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
drivers/gpu/drm/i915/intel_atomic_plane.c | 78 ++++++++++++++++++-------------
1 file changed, 45 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 8e6dc15..8be50309 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -107,6 +107,50 @@ intel_plane_destroy_state(struct drm_plane *plane,
drm_atomic_helper_plane_destroy_state(plane, state);
}
+static bool intel_plane_valid_rotation(const struct drm_plane_state *plane_state)
+{
+ struct intel_plane *plane = to_intel_plane(plane_state->plane);
+ struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
+
+ if (plane_state->fb &&
+ drm_rotation_90_or_270(plane_state->rotation)) {
+ struct drm_format_name_buf format_name;
+
+ if (plane_state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
+ plane_state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
+ DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
+ return false;
+ }
+
+ /*
+ * 90/270 is not allowed with RGB64 16:16:16:16,
+ * RGB 16-bit 5:6:5, and Indexed 8-bit.
+ * TBD: Add RGB64 case once its added in supported format
+ * list.
+ */
+ switch (plane_state->fb->format->format) {
+ case DRM_FORMAT_C8:
+ case DRM_FORMAT_RGB565:
+ DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
+ drm_get_format_name(plane_state->fb->format->format,
+ &format_name));
+ return false;
+ default:
+ break;
+ }
+ }
+
+ /* CHV ignores the mirror bit when the rotate bit is set :( */
+ if (IS_CHERRYVIEW(dev_priv) &&
+ plane_state->rotation & DRM_MODE_ROTATE_180 &&
+ plane_state->rotation & DRM_MODE_REFLECT_X) {
+ DRM_DEBUG_KMS("Cannot rotate and reflect at the same time\n");
+ return false;
+ }
+
+ return true;
+}
+
int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
struct intel_crtc_state *crtc_state,
const struct intel_plane_state *old_plane_state,
@@ -137,40 +181,8 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
intel_state->clip.y2 =
crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
- if (state->fb && drm_rotation_90_or_270(state->rotation)) {
- struct drm_format_name_buf format_name;
-
- if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
- state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
- DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
- return -EINVAL;
- }
-
- /*
- * 90/270 is not allowed with RGB64 16:16:16:16,
- * RGB 16-bit 5:6:5, and Indexed 8-bit.
- * TBD: Add RGB64 case once its added in supported format list.
- */
- switch (state->fb->format->format) {
- case DRM_FORMAT_C8:
- case DRM_FORMAT_RGB565:
- DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
- drm_get_format_name(state->fb->format->format,
- &format_name));
- return -EINVAL;
-
- default:
- break;
- }
- }
-
- /* CHV ignores the mirror bit when the rotate bit is set :( */
- if (IS_CHERRYVIEW(dev_priv) &&
- state->rotation & DRM_MODE_ROTATE_180 &&
- state->rotation & DRM_MODE_REFLECT_X) {
- DRM_DEBUG_KMS("Cannot rotate and reflect at the same time\n");
+ if (!intel_plane_valid_rotation(state))
return -EINVAL;
- }
intel_state->base.visible = false;
ret = intel_plane->check_plane(intel_plane, crtc_state, intel_state);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 0/2] Enable RGB565 rotation from gen11 onwards
@ 2018-08-27 12:37 Juha-Pekka Heikkila
2018-08-27 12:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
0 siblings, 1 reply; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2018-08-27 12:37 UTC (permalink / raw)
To: intel-gfx
These patches enable RGB565 format to be rotated 90 and 270 degrees
on gen11 and later.
Related changes to IGT here:
https://patchwork.freedesktop.org/series/48756/
/Juha-Pekka
Juha-Pekka Heikkila (2):
drm/i915: Move 90/270 rotation validity check into its own function
drm/i915: Enable RGB565 90/270 plane rotation for gen11 onwards.
drivers/gpu/drm/i915/intel_atomic_plane.c | 75 ++++++++++++++++++-------------
1 file changed, 45 insertions(+), 30 deletions(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function
2018-08-27 12:37 [PATCH 0/2] Enable RGB565 rotation from gen11 onwards Juha-Pekka Heikkila
@ 2018-08-27 12:37 ` Juha-Pekka Heikkila
0 siblings, 0 replies; 10+ messages in thread
From: Juha-Pekka Heikkila @ 2018-08-27 12:37 UTC (permalink / raw)
To: intel-gfx
This makes intel_plane_atomic_check_with_state() generally shorter.
v2: (Ville Syrjälä) move all rotation related checks into new function and
don't pass dev_priv pointer around.
v3: (Ville Syljälä) rename new function.
v4: rebase
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
drivers/gpu/drm/i915/intel_atomic_plane.c | 66 ++++++++++++++++++-------------
1 file changed, 39 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index dcba645..344a16b 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -107,44 +107,34 @@ intel_plane_destroy_state(struct drm_plane *plane,
drm_atomic_helper_plane_destroy_state(plane, state);
}
-int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
- struct intel_crtc_state *crtc_state,
- const struct intel_plane_state *old_plane_state,
- struct intel_plane_state *intel_state)
+static bool intel_plane_valid_rotation(const struct drm_plane_state *plane_state)
{
- struct drm_plane *plane = intel_state->base.plane;
- struct drm_i915_private *dev_priv = to_i915(plane->dev);
- struct drm_plane_state *state = &intel_state->base;
- struct intel_plane *intel_plane = to_intel_plane(plane);
- const struct drm_display_mode *adjusted_mode =
- &crtc_state->base.adjusted_mode;
- int ret;
+ struct intel_plane *plane = to_intel_plane(plane_state->plane);
+ struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
- if (!intel_state->base.crtc && !old_plane_state->base.crtc)
- return 0;
-
- if (state->fb && drm_rotation_90_or_270(state->rotation)) {
+ if (plane_state->fb &&
+ drm_rotation_90_or_270(plane_state->rotation)) {
struct drm_format_name_buf format_name;
- if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
- state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
+ if (plane_state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
+ plane_state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
- return -EINVAL;
+ return false;
}
/*
* 90/270 is not allowed with RGB64 16:16:16:16,
* RGB 16-bit 5:6:5, and Indexed 8-bit.
- * TBD: Add RGB64 case once its added in supported format list.
+ * TBD: Add RGB64 case once its added in supported format
+ * list.
*/
- switch (state->fb->format->format) {
+ switch (plane_state->fb->format->format) {
case DRM_FORMAT_C8:
case DRM_FORMAT_RGB565:
DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
- drm_get_format_name(state->fb->format->format,
- &format_name));
- return -EINVAL;
-
+ drm_get_format_name(plane_state->fb->format->format,
+ &format_name));
+ return false;
default:
break;
}
@@ -152,12 +142,34 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
/* CHV ignores the mirror bit when the rotate bit is set :( */
if (IS_CHERRYVIEW(dev_priv) &&
- state->rotation & DRM_MODE_ROTATE_180 &&
- state->rotation & DRM_MODE_REFLECT_X) {
+ plane_state->rotation & DRM_MODE_ROTATE_180 &&
+ plane_state->rotation & DRM_MODE_REFLECT_X) {
DRM_DEBUG_KMS("Cannot rotate and reflect at the same time\n");
- return -EINVAL;
+ return false;
}
+ return true;
+}
+
+int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
+ struct intel_crtc_state *crtc_state,
+ const struct intel_plane_state *old_plane_state,
+ struct intel_plane_state *intel_state)
+{
+ struct drm_plane *plane = intel_state->base.plane;
+ struct drm_i915_private *dev_priv = to_i915(plane->dev);
+ struct drm_plane_state *state = &intel_state->base;
+ struct intel_plane *intel_plane = to_intel_plane(plane);
+ const struct drm_display_mode *adjusted_mode =
+ &crtc_state->base.adjusted_mode;
+ int ret;
+
+ if (!intel_state->base.crtc && !old_plane_state->base.crtc)
+ return 0;
+
+ if (!intel_plane_valid_rotation(state))
+ return -EINVAL;
+
intel_state->base.visible = false;
ret = intel_plane->check_plane(intel_plane, crtc_state, intel_state);
if (ret)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-08-27 12:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 14:37 [PATCH 0/2] drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Juha-Pekka Heikkila
2017-11-03 14:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
2017-11-03 15:50 ` Ville Syrjälä
2017-11-03 15:52 ` Ville Syrjälä
2017-11-03 14:37 ` [PATCH 2/2] drm/i915: Enable 16bpp 90/270 plane rotation for gen10 onwards Juha-Pekka Heikkila
2017-11-03 16:03 ` Ville Syrjälä
2017-11-03 15:17 ` ✓ Fi.CI.BAT: success for drm/i915: This set enables 90/270 degree rotation on 16bpp planes on gen10 Patchwork
2017-11-03 18:10 ` ✗ Fi.CI.IGT: warning " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-11-21 14:15 [PATCH 0/2] " Juha-Pekka Heikkila
2017-11-21 14:15 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
2018-08-27 12:37 [PATCH 0/2] Enable RGB565 rotation from gen11 onwards Juha-Pekka Heikkila
2018-08-27 12:37 ` [PATCH 1/2] drm/i915: Move 90/270 rotation validity check into its own function Juha-Pekka Heikkila
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).