From: Matthew Auld <matthew.auld@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Reject non-canonical rotations
Date: Tue, 22 Mar 2016 10:35:41 +0000 [thread overview]
Message-ID: <1458642941-8092-1-git-send-email-matthew.auld@intel.com> (raw)
Reject any rotation value which incorrectly represents multiple rotations.
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/intel_atomic_plane.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 7de7721..6cb564f 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -156,6 +156,11 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
intel_state->clip.y2 =
crtc_state->base.enable ? crtc_state->pipe_src_h : 0;
+ if (!is_power_of_2(state->rotation)) {
+ DRM_DEBUG_KMS("Multiple rotations are not supported!\n");
+ return -EINVAL;
+ }
+
if (state->fb && intel_rotation_90_or_270(state->rotation)) {
if (!(state->fb->modifier[0] == I915_FORMAT_MOD_Y_TILED ||
state->fb->modifier[0] == I915_FORMAT_MOD_Yf_TILED)) {
--
2.4.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-03-22 10:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 10:35 Matthew Auld [this message]
2016-03-22 10:43 ` [PATCH] drm/i915: Reject non-canonical rotations Ville Syrjälä
2016-03-22 10:48 ` Matthew Auld
2016-03-22 10:59 ` Ville Syrjälä
2016-03-22 11:36 ` Daniel Vetter
2016-03-22 14:14 ` Matthew Auld
2016-03-23 8:58 ` Daniel Vetter
2016-03-23 13:30 ` Joonas Lahtinen
2016-03-23 16:18 ` Daniel Vetter
2016-03-23 16:24 ` Matthew Auld
2016-03-23 16:30 ` Ville Syrjälä
2016-03-22 12:32 ` ✗ Fi.CI.BAT: warning for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458642941-8092-1-git-send-email-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).