From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org,
Rob Clark <robdclark@chromium.org>,
freedreno@lists.freedesktop.org,
Fritz Koenig <frkoenig@google.com>,
David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Bruce Wang <bzwang@chromium.org>, Sean Paul <sean@poorly.run>
Subject: Re: [PATCH] drm/msm/dpu: add rotation property
Date: Thu, 22 Aug 2019 15:26:52 +0300 [thread overview]
Message-ID: <20190822122652.GM5942@intel.com> (raw)
In-Reply-To: <20190822015756.30807-1-robdclark@gmail.com>
On Wed, Aug 21, 2019 at 06:57:24PM -0700, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index 45bfac9e3af7..c5653771e8fa 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -1040,8 +1040,21 @@ static void dpu_plane_sspp_atomic_update(struct drm_plane *plane)
> pstate->multirect_mode);
>
> if (pdpu->pipe_hw->ops.setup_format) {
> + unsigned int rotation;
> +
> src_flags = 0x0;
>
> + rotation = drm_rotation_simplify(state->rotation,
> + DRM_MODE_ROTATE_0 |
> + DRM_MODE_REFLECT_X |
> + DRM_MODE_REFLECT_Y);
> +
> + if (rotation & DRM_MODE_REFLECT_X)
> + src_flags |= DPU_SSPP_FLIP_UD;
> +
> + if (rotation & DRM_MODE_REFLECT_Y)
> + src_flags |= DPU_SSPP_FLIP_LR;
> +
UD vs. LR (assuming those mean what I think they mean) seem the wrong
way around here.
>
> /* update format */
> pdpu->pipe_hw->ops.setup_format(pdpu->pipe_hw, fmt, src_flags,
> pstate->multirect_index);
> @@ -1522,6 +1535,13 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
> if (ret)
> DPU_ERROR("failed to install zpos property, rc = %d\n", ret);
>
> + drm_plane_create_rotation_property(plane,
> + DRM_MODE_ROTATE_0,
> + DRM_MODE_ROTATE_0 |
> + DRM_MODE_ROTATE_180 |
> + DRM_MODE_REFLECT_X |
> + DRM_MODE_REFLECT_Y);
> +
> drm_plane_enable_fb_damage_clips(plane);
>
> /* success! finalize initialization */
> --
> 2.21.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2019-08-22 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 1:57 [PATCH] drm/msm/dpu: add rotation property Rob Clark
2019-08-22 12:26 ` Ville Syrjälä [this message]
2019-08-22 15:45 ` Rob Clark
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=20190822122652.GM5942@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=bzwang@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=frkoenig@google.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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).