public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sonika Jindal <sonika.jindal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Swapping 90 and 270 to be compliant with Xrandr
Date: Wed, 20 May 2015 11:15:57 +0200	[thread overview]
Message-ID: <20150520091557.GD15256@phenom.ffwll.local> (raw)
In-Reply-To: <1432109448-31345-1-git-send-email-sonika.jindal@intel.com>

On Wed, May 20, 2015 at 01:40:48PM +0530, Sonika Jindal wrote:
> Since DRM_ROTATE is counter clockwise (which is compliant with Xrandr),
> and HW rotation is clockwise, swapping 90/270 to work as expected from
> userspace.
> 
> v2: Rebased
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

I've fixed the summary to make it clear this is skl-only and applied the
patch to dinq, thanks.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 9d2d6fb..a583422 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3010,12 +3010,16 @@ u32 skl_plane_ctl_rotation(unsigned int rotation)
>  	switch (rotation) {
>  	case BIT(DRM_ROTATE_0):
>  		break;
> +	/*
> +	 * DRM_ROTATE_ is counter clockwise to stay compatible with Xrandr
> +	 * while i915 HW rotation is clockwise, thats why this swapping.
> +	 */
>  	case BIT(DRM_ROTATE_90):
> -		return PLANE_CTL_ROTATE_90;
> +		return PLANE_CTL_ROTATE_270;
>  	case BIT(DRM_ROTATE_180):
>  		return PLANE_CTL_ROTATE_180;
>  	case BIT(DRM_ROTATE_270):
> -		return PLANE_CTL_ROTATE_270;
> +		return PLANE_CTL_ROTATE_90;
>  	default:
>  		MISSING_CASE(rotation);
>  	}
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-05-20  9:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  9:07 [PATCH 1/2] drm/i915/skl: Allow universal planes to position Sonika Jindal
2015-04-10  9:07 ` [PATCH 2/2] drm/i915/skl: Support for 90/270 rotation Sonika Jindal
2015-04-10 14:17   ` Daniel Vetter
2015-04-10 14:44     ` Ville Syrjälä
2015-04-13  4:06       ` Jindal, Sonika
2015-04-13 10:10         ` Ville Syrjälä
2015-04-13 10:23           ` Jindal, Sonika
2015-04-13 10:49             ` Ville Syrjälä
2015-04-13 23:39               ` Matt Roper
2015-04-14 12:19                 ` Jindal, Sonika
2015-04-14 17:27                   ` Daniel Vetter
2015-04-15 10:05                     ` [PATCH 1/2] drm/i915: Swapping 90 and 270 to be compliant with Xrandr Sonika Jindal
2015-04-15 10:05                       ` [PATCH 2/2] Documentation/drm: Update rotation property with 90/270 and description Sonika Jindal
2015-04-15 10:27                         ` Daniel Vetter
2015-04-15 10:29                           ` Jindal, Sonika
2015-04-15 10:42                             ` Daniel Vetter
2015-04-15 10:35                               ` [PATCH] " Sonika Jindal
2015-05-12 12:50                                 ` [Intel-gfx] " Ville Syrjälä
2015-05-13  4:27                                   ` Jindal, Sonika
2015-05-20  6:39                                     ` Jindal, Sonika
2015-05-20  7:49                                     ` Jindal, Sonika
2015-05-20 14:03                                       ` Ville Syrjälä
2015-05-28 11:05                                         ` [PATCH] Documentation/drm: Update rotation property Sonika Jindal
2015-05-28 11:19                                           ` [Intel-gfx] " Daniel Vetter
2015-05-12 12:35                       ` [PATCH 1/2] drm/i915: Swapping 90 and 270 to be compliant with Xrandr Ville Syrjälä
2015-05-20  8:10                         ` [PATCH] " Sonika Jindal
2015-05-20  9:15                           ` Daniel Vetter [this message]
2015-04-13 11:10             ` [PATCH 2/2] drm/i915/skl: Support for 90/270 rotation Damien Lespiau
2015-04-13  4:02     ` Jindal, Sonika
2015-04-14  3:56   ` shuang.he
2015-10-06 13:32 ` [PATCH 1/2] drm/i915/skl: Allow universal planes to position Tvrtko Ursulin
2015-10-06 14:29   ` Matt Roper
2015-10-06 14:42     ` Ville Syrjälä
2015-10-06 15:16       ` Matt Roper
2015-10-06 16:28         ` Ville Syrjälä
2015-10-07 14:19           ` Daniel Vetter
2015-10-08  8:58             ` Tvrtko Ursulin
2015-10-16 12:23               ` Tvrtko Ursulin

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=20150520091557.GD15256@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sonika.jindal@intel.com \
    /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