diff mbox

[1/2] drm/i915: call intel_tile_height with correct parameter

Message ID 1431141767-29455-2-git-send-email-chandra.konduru@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chandra Konduru May 9, 2015, 3:22 a.m. UTC
In skylake update plane functions, intel_tile_height() is called with
bits_per_pixel instead of pixel_format. Correcting it.

Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 drivers/gpu/drm/i915/intel_sprite.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Tvrtko Ursulin May 11, 2015, 9:41 a.m. UTC | #1
On 05/09/2015 04:22 AM, Chandra Konduru wrote:
> In skylake update plane functions, intel_tile_height() is called with
> bits_per_pixel instead of pixel_format. Correcting it.
>
> Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c |    2 +-
>   drivers/gpu/drm/i915/intel_sprite.c  |    2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

This BTW fixes a bug in:

commit 3b7a5119b5d2def1161226a4c6a643db537dff7e
Author: Sonika Jindal <sonika.jindal@intel.com>
Date:   Fri Apr 10 14:37:29 2015 +0530

     drm/i915/skl: Support for 90/270 rotation

I've also posted last week "drm/i915: Remove duplicated 
intel_tile_height declaration" which fixes one part of the fallout, but 
didn't notice this as well.

So I think both of these fixes can be merged early.

A bit intriguing is how passing in bits per pixel instead of pixel 
format and things still worked. Don't see at the moment how tile height 
could have been correct for 90/270 as exercised from kms_rotation_crc.

Regards,

Tvrtko
Daniel Vetter May 11, 2015, 10:28 a.m. UTC | #2
On Fri, May 08, 2015 at 08:22:46PM -0700, Chandra Konduru wrote:
> In skylake update plane functions, intel_tile_height() is called with
> bits_per_pixel instead of pixel_format. Correcting it.
> 
> Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
Queued for -next, thanks for the patch.
> ---
>  drivers/gpu/drm/i915/intel_display.c |    2 +-
>  drivers/gpu/drm/i915/intel_sprite.c  |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 66c78b6..c385a3b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3157,7 +3157,7 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
>  
>  	if (intel_rotation_90_or_270(rotation)) {
>  		/* stride = Surface height in tiles */
> -		tile_height = intel_tile_height(dev, fb->bits_per_pixel,
> +		tile_height = intel_tile_height(dev, fb->pixel_format,
>  						fb->modifier[0], 0);
>  		stride = DIV_ROUND_UP(fb->height, tile_height);
>  		x_offset = stride * tile_height - y - src_h;
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index fc1505b7..e23fe8e 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -232,7 +232,7 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,
>  
>  	if (intel_rotation_90_or_270(rotation)) {
>  		/* stride: Surface height in tiles */
> -		tile_height = intel_tile_height(dev, fb->bits_per_pixel,
> +		tile_height = intel_tile_height(dev, fb->pixel_format,
>  						fb->modifier[0], 0);

Alignment isn't properly patched up here, continuatino should line up with
the opening (. I've fixed this while applying.
-Daniel

>  		stride = DIV_ROUND_UP(fb->height, tile_height);
>  		plane_size = (src_w << 16) | src_h;
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 66c78b6..c385a3b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3157,7 +3157,7 @@  static void skylake_update_primary_plane(struct drm_crtc *crtc,
 
 	if (intel_rotation_90_or_270(rotation)) {
 		/* stride = Surface height in tiles */
-		tile_height = intel_tile_height(dev, fb->bits_per_pixel,
+		tile_height = intel_tile_height(dev, fb->pixel_format,
 						fb->modifier[0], 0);
 		stride = DIV_ROUND_UP(fb->height, tile_height);
 		x_offset = stride * tile_height - y - src_h;
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index fc1505b7..e23fe8e 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -232,7 +232,7 @@  skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc,
 
 	if (intel_rotation_90_or_270(rotation)) {
 		/* stride: Surface height in tiles */
-		tile_height = intel_tile_height(dev, fb->bits_per_pixel,
+		tile_height = intel_tile_height(dev, fb->pixel_format,
 						fb->modifier[0], 0);
 		stride = DIV_ROUND_UP(fb->height, tile_height);
 		plane_size = (src_w << 16) | src_h;