From: "Mun, Gwan-gyeong" <gwan-gyeong.mun@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Souza, Jose" <jose.souza@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 5/6] RFC/WIP: drm/i915/display/psr: Consider tiling when doing the plane offset calculation
Date: Fri, 27 Nov 2020 10:19:18 +0000 [thread overview]
Message-ID: <c30919c0e05a3c8af3d7b91d557263dc35111bb8.camel@intel.com> (raw)
In-Reply-To: <20201027234526.33043-5-jose.souza@intel.com>
It works properly on a normal rgba plane.
In order to apply this patch, the commit messaged need to be polished.
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Tested-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
On Tue, 2020-10-27 at 16:45 -0700, José Roberto de Souza wrote:
> Do the calculation of x and y offsets using
> skl_calc_main_surface_offset().
>
> RFC/WIP: This causes the value of the calculated x to be different
> than
> plane_state->color_plane[color_plane].x, not sure if that is
> expected.
>
> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_psr.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 96ee51484dd6..00c76ea82f92 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1188,7 +1188,8 @@ void intel_psr2_program_plane_sel_fetch(struct
> intel_plane *plane,
> struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
> enum pipe pipe = plane->pipe;
> const struct drm_rect *clip;
> - u32 val;
> + u32 val, offset;
> + int ret, x, y;
>
> if (!crtc_state->enable_psr2_sel_fetch)
> return;
> @@ -1205,9 +1206,14 @@ void intel_psr2_program_plane_sel_fetch(struct
> intel_plane *plane,
> val |= plane_state->uapi.dst.x1;
> intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_POS(pipe, plane-
> >id), val);
>
> - /* TODO: consider tiling and auxiliary surfaces */
> - val = (clip->y1 + plane_state->color_plane[color_plane].y) <<
> 16;
> - val |= plane_state->color_plane[color_plane].x;
> + /* TODO: consider auxiliary surfaces */
> + x = plane_state->uapi.src.x1 >> 16;
> + y = (plane_state->uapi.src.y1 >> 16) + clip->y1;
> + ret = skl_calc_main_surface_offset(plane_state, &x, &y,
> &offset);
> + if (ret)
> + drm_warn_once(&dev_priv->drm,
> "skl_calc_main_surface_offset() returned %i\n",
> + ret);
> + val = y << 16 | x;
> intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane-
> >id),
> val);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-11-27 10:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 23:45 [Intel-gfx] [PATCH v2 1/6] drm/i915/display/psr: Calculate selective fetch plane registers José Roberto de Souza
2020-10-27 23:45 ` [Intel-gfx] [PATCH v2 2/6] drm/i915/display/psr: Use plane damage clips to calculate damaged area José Roberto de Souza
2020-10-27 23:45 ` [Intel-gfx] [PATCH v2 3/6] drm/i915/display/psr: Consider other planes to damaged area calculation José Roberto de Souza
2020-10-27 23:45 ` [Intel-gfx] [PATCH v2 4/6] drm/i915/display: Split and export main surface calculation from skl_check_main_surface() José Roberto de Souza
2020-11-27 10:14 ` Mun, Gwan-gyeong
2020-10-27 23:45 ` [Intel-gfx] [PATCH v2 5/6] RFC/WIP: drm/i915/display/psr: Consider tiling when doing the plane offset calculation José Roberto de Souza
2020-11-27 10:19 ` Mun, Gwan-gyeong [this message]
2020-10-27 23:45 ` [Intel-gfx] [PATCH v2 6/6] HAX/DO_NOT_MERGE_IT: drm/i915/display: Enable PSR2 selective fetch for testing José Roberto de Souza
2020-10-28 5:25 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v2,1/6] drm/i915/display/psr: Calculate selective fetch plane registers Patchwork
2020-10-28 5:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-10-29 0:13 ` Souza, Jose
2020-10-29 21:37 ` [Intel-gfx] [PATCH v2 1/6] " Mun, Gwan-gyeong
2020-11-02 19:18 ` Souza, Jose
2020-11-27 10:13 ` Mun, Gwan-gyeong
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=c30919c0e05a3c8af3d7b91d557263dc35111bb8.camel@intel.com \
--to=gwan-gyeong.mun@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@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;
as well as URLs for NNTP newsgroup(s).