diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2017-01-20 09:28:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-01 02:33:11 -0500 |
commit | 181478cdb75eb4d9865064b15cb93418c72759f2 (patch) | |
tree | e3ab743831f6e66cb006ae04d6517f9435fca880 /drivers/gpu/drm | |
parent | ff4956555513d0ad0088866c748a30bf10a61019 (diff) |
drm/i915: Fix calculation of rotated x and y offsets for planar formats
commit 3781bd6e7d64d5f5bea9fdee11ab9460a700c0e4 upstream.
Parameters tile_size, tile_width and tile_height were passed in the
wrong order to _intel_adjust_tile_offset() when calculating the rotated
offsets.
This doesn't fix any user visible bug, since for packed formats new
and old offset are the same and the rotated offsets are within a tile
before they are fed to _intel_adjust_tile_offset(). In that case, the
offsets are unchanged. That is not true for planar formats, but those
are currently not supported.
Fixes: 66a2d927cb0e ("drm/i915: Make intel_adjust_tile_offset() work for linear buffers")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-3-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 46a1bd289507dfcc428fb9daf65421ed6be6af8b)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3c9cb35e46ab..944e067a9f28 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2587,8 +2587,9 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv, | |||
2587 | * We only keep the x/y offsets, so push all of the | 2587 | * We only keep the x/y offsets, so push all of the |
2588 | * gtt offset into the x/y offsets. | 2588 | * gtt offset into the x/y offsets. |
2589 | */ | 2589 | */ |
2590 | _intel_adjust_tile_offset(&x, &y, tile_size, | 2590 | _intel_adjust_tile_offset(&x, &y, |
2591 | tile_width, tile_height, pitch_tiles, | 2591 | tile_width, tile_height, |
2592 | tile_size, pitch_tiles, | ||
2592 | gtt_offset_rotated * tile_size, 0); | 2593 | gtt_offset_rotated * tile_size, 0); |
2593 | 2594 | ||
2594 | gtt_offset_rotated += rot_info->plane[i].width * rot_info->plane[i].height; | 2595 | gtt_offset_rotated += rot_info->plane[i].width * rot_info->plane[i].height; |