From: Damien Lespiau <damien.lespiau@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/skl: Add 180 degree HW rotation support
Date: Sat, 4 Oct 2014 10:58:03 +0100 [thread overview]
Message-ID: <20141004095803.GD11034@strange.ger.corp.intel.com> (raw)
In-Reply-To: <1412416411-7669-1-git-send-email-damien.lespiau@intel.com>
On Sat, Oct 04, 2014 at 10:53:31AM +0100, Damien Lespiau wrote:
> From: Sonika Jindal <sonika.jindal@intel.com>
>
> Add support for 180 degree rotation for primary and sprite planes
>
> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
--
Damien
> ---
> drivers/gpu/drm/i915/i915_reg.h | 3 +++
> drivers/gpu/drm/i915/intel_display.c | 2 ++
> drivers/gpu/drm/i915/intel_sprite.c | 3 +++
> 3 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index a56d9a7..6db369a 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -4579,6 +4579,9 @@ enum punit_power_well {
> #define PLANE_CTL_ALPHA_DISABLE ( 0 << 4)
> #define PLANE_CTL_ALPHA_SW_PREMULTIPLY ( 2 << 4)
> #define PLANE_CTL_ALPHA_HW_PREMULTIPLY ( 3 << 4)
> +#define PLANE_CTL_ROTATE_MASK 0x3
> +#define PLANE_CTL_ROTATE_0 0x0
> +#define PLANE_CTL_ROTATE_180 0x2
> #define _PLANE_STRIDE_1_A 0x70188
> #define _PLANE_STRIDE_2_A 0x70288
> #define _PLANE_STRIDE_3_A 0x70388
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index c51d950..c496571 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2697,6 +2697,8 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
> }
>
> plane_ctl |= PLANE_CTL_PLANE_GAMMA_DISABLE;
> + if (to_intel_plane(crtc->primary)->rotation == BIT(DRM_ROTATE_180))
> + plane_ctl |= PLANE_CTL_ROTATE_180;
>
> I915_WRITE(PLANE_CTL(pipe, 0), plane_ctl);
>
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 750b634..2c060ad 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -162,6 +162,7 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,
> plane_ctl &= ~PLANE_CTL_YUV422_ORDER_MASK;
> plane_ctl &= ~PLANE_CTL_TILED_MASK;
> plane_ctl &= ~PLANE_CTL_ALPHA_MASK;
> + plane_ctl &= ~PLANE_CTL_ROTATE_MASK;
>
> /* Trickle feed has to be enabled */
> plane_ctl &= ~PLANE_CTL_TRICKLE_FEED_DISABLE;
> @@ -217,6 +218,8 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,
> default:
> BUG();
> }
> + if (intel_plane->rotation == BIT(DRM_ROTATE_180))
> + plane_ctl |= PLANE_CTL_ROTATE_180;
>
> plane_ctl |= PLANE_CTL_ENABLE;
> plane_ctl |= PLANE_CTL_PIPE_CSC_ENABLE;
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2014-10-04 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 9:53 [PATCH] drm/i915/skl: Add 180 degree HW rotation support Damien Lespiau
2014-10-04 9:58 ` Damien Lespiau [this message]
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=20141004095803.GD11034@strange.ger.corp.intel.com \
--to=damien.lespiau@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.