mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
drm/i915/display: Fix sel fetch plane offset calculation
skl_calc_main_surface_offset() is used to calculate an aligned plane surface address considering the inner framebuffer x and y offset. It can not be used by selective fetch functions becase there is no PLANE_SEL_FETCH_SURF. So the PLANE_SEL_FETCH_OFFSET.y should only be PLANE_OFFSET.y + damaged_area_within_plane.y1. This fixes glitches seen in fbcon caused by typing something in the terminal. BSpec: 55229 Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> 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> Link: https://patchwork.freedesktop.org/patch/msgid/20210815014346.373945-1-jose.souza@intel.com
This commit is contained in:
parent
d8959fb338
commit
7b24b79bf5
1 changed files with 2 additions and 6 deletions
|
@ -1487,8 +1487,8 @@ void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
|
||||||
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
|
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
|
||||||
enum pipe pipe = plane->pipe;
|
enum pipe pipe = plane->pipe;
|
||||||
const struct drm_rect *clip;
|
const struct drm_rect *clip;
|
||||||
u32 val, offset;
|
u32 val;
|
||||||
int ret, x, y;
|
int x, y;
|
||||||
|
|
||||||
if (!crtc_state->enable_psr2_sel_fetch)
|
if (!crtc_state->enable_psr2_sel_fetch)
|
||||||
return;
|
return;
|
||||||
|
@ -1508,10 +1508,6 @@ void intel_psr2_program_plane_sel_fetch(struct intel_plane *plane,
|
||||||
/* TODO: consider auxiliary surfaces */
|
/* TODO: consider auxiliary surfaces */
|
||||||
x = plane_state->uapi.src.x1 >> 16;
|
x = plane_state->uapi.src.x1 >> 16;
|
||||||
y = (plane_state->uapi.src.y1 >> 16) + clip->y1;
|
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;
|
val = y << 16 | x;
|
||||||
intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane->id),
|
intel_de_write_fw(dev_priv, PLANE_SEL_FETCH_OFFSET(pipe, plane->id),
|
||||||
val);
|
val);
|
||||||
|
|
Loading…
Reference in a new issue