linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 22/36] drm/atmel-hlcdc: use bpp instead of cpp for drm_format_info
       [not found] <1569243119-183293-1-git-send-email-hjc@rock-chips.com>
@ 2019-09-23 12:51 ` Sandy Huang
  2019-09-23 17:31   ` Sam Ravnborg
  2019-09-23 12:51 ` [PATCH 25/36] drm/imx: " Sandy Huang
  1 sibling, 1 reply; 3+ messages in thread
From: Sandy Huang @ 2019-09-23 12:51 UTC (permalink / raw)
  To: dri-devel, Sam Ravnborg, Boris Brezillon, David Airlie,
	Daniel Vetter, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches
  Cc: hjc, linux-arm-kernel, linux-kernel

cpp[BytePerPlane] can't describe the 10bit data format correctly,
So we use bpp[BitPerPlane] to instead cpp.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index 89f5a75..ab7d423 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -644,7 +644,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
 		int xdiv = i ? fb->format->hsub : 1;
 		int ydiv = i ? fb->format->vsub : 1;
 
-		state->bpp[i] = fb->format->cpp[i];
+		state->bpp[i] = fb->format->bpp[i] / 8;
 		if (!state->bpp[i])
 			return -EINVAL;
 
-- 
2.7.4




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 25/36] drm/imx: use bpp instead of cpp for drm_format_info
       [not found] <1569243119-183293-1-git-send-email-hjc@rock-chips.com>
  2019-09-23 12:51 ` [PATCH 22/36] drm/atmel-hlcdc: use bpp instead of cpp for drm_format_info Sandy Huang
@ 2019-09-23 12:51 ` Sandy Huang
  1 sibling, 0 replies; 3+ messages in thread
From: Sandy Huang @ 2019-09-23 12:51 UTC (permalink / raw)
  To: dri-devel, Philipp Zabel, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer
  Cc: linux-kernel, hjc, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam, linux-arm-kernel

cpp[BytePerPlane] can't describe the 10bit data format correctly,
So we use bpp[BitPerPlane] to instead cpp.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
---
 drivers/gpu/drm/imx/ipuv3-plane.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index 28826c0..f7c7036 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -101,7 +101,7 @@ drm_plane_state_to_eba(struct drm_plane_state *state, int plane)
 	BUG_ON(!cma_obj);
 
 	return cma_obj->paddr + fb->offsets[plane] + fb->pitches[plane] * y +
-	       fb->format->cpp[plane] * x;
+	       fb->format->bpp[plane] / 8 * x;
 }
 
 static inline unsigned long
@@ -120,7 +120,7 @@ drm_plane_state_to_ubo(struct drm_plane_state *state)
 	y /= fb->format->vsub;
 
 	return cma_obj->paddr + fb->offsets[1] + fb->pitches[1] * y +
-	       fb->format->cpp[1] * x - eba;
+	       fb->format->bpp[1] / 8 * x - eba;
 }
 
 static inline unsigned long
@@ -139,7 +139,7 @@ drm_plane_state_to_vbo(struct drm_plane_state *state)
 	y /= fb->format->vsub;
 
 	return cma_obj->paddr + fb->offsets[2] + fb->pitches[2] * y +
-	       fb->format->cpp[2] * x - eba;
+	       fb->format->bpp[2] / 8 * x - eba;
 }
 
 void ipu_plane_put_resources(struct ipu_plane *ipu_plane)
@@ -628,7 +628,7 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
 	width = drm_rect_width(&state->src) >> 16;
 	height = drm_rect_height(&state->src) >> 16;
 	info = drm_format_info(fb->format->format);
-	ipu_calculate_bursts(width, info->cpp[0], fb->pitches[0],
+	ipu_calculate_bursts(width, info->bpp[0] / 8, fb->pitches[0],
 			     &burstsize, &num_bursts);
 
 	ipu_cpmem_zero(ipu_plane->ipu_ch);
-- 
2.7.4




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 22/36] drm/atmel-hlcdc: use bpp instead of cpp for drm_format_info
  2019-09-23 12:51 ` [PATCH 22/36] drm/atmel-hlcdc: use bpp instead of cpp for drm_format_info Sandy Huang
@ 2019-09-23 17:31   ` Sam Ravnborg
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2019-09-23 17:31 UTC (permalink / raw)
  To: Sandy Huang
  Cc: Alexandre Belloni, Boris Brezillon, David Airlie, dri-devel,
	linux-kernel, Ludovic Desroches, Daniel Vetter, linux-arm-kernel

Hi Sandy.

Thanks for taking care of this, but...

On Mon, Sep 23, 2019 at 08:51:45PM +0800, Sandy Huang wrote:
> cpp[BytePerPlane] can't describe the 10bit data format correctly,
> So we use bpp[BitPerPlane] to instead cpp.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> index 89f5a75..ab7d423 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> @@ -644,7 +644,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
>  		int xdiv = i ? fb->format->hsub : 1;
>  		int ydiv = i ? fb->format->vsub : 1;
>  
> -		state->bpp[i] = fb->format->cpp[i];
> +		state->bpp[i] = fb->format->bpp[i] / 8;
>  		if (!state->bpp[i])
>  			return -EINVAL;

Awaiting conclusion on Daniels comment on PATCH 1 and has dropped this
patch for now.
And please address the concerns Rob has about bisectability in your
cover letter for v2.

	Sam

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-23 17:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1569243119-183293-1-git-send-email-hjc@rock-chips.com>
2019-09-23 12:51 ` [PATCH 22/36] drm/atmel-hlcdc: use bpp instead of cpp for drm_format_info Sandy Huang
2019-09-23 17:31   ` Sam Ravnborg
2019-09-23 12:51 ` [PATCH 25/36] drm/imx: " Sandy Huang

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).