* [PATCH 26/36] drm/vboxvideo: use bpp instead of cpp for drm_format_info
@ 2019-09-23 12:52 Sandy Huang
2019-09-23 12:53 ` [PATCH 27/36] drm/pl111: " Sandy Huang
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Sandy Huang @ 2019-09-23 12:52 UTC (permalink / raw)
To: dri-devel, Hans de Goede, David Airlie, Daniel Vetter; +Cc: hjc, 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/vboxvideo/vbox_mode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvideo/vbox_mode.c
index e1e48ba..838120b 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
@@ -38,7 +38,7 @@ static void vbox_do_modeset(struct drm_crtc *crtc)
vbox = crtc->dev->dev_private;
width = vbox_crtc->width ? vbox_crtc->width : 640;
height = vbox_crtc->height ? vbox_crtc->height : 480;
- bpp = fb ? fb->format->cpp[0] * 8 : 32;
+ bpp = fb ? fb->format->bpp[0] : 32;
pitch = fb ? fb->pitches[0] : width * bpp / 8;
x_offset = vbox->single_framebuffer ? vbox_crtc->x : vbox_crtc->x_hint;
y_offset = vbox->single_framebuffer ? vbox_crtc->y : vbox_crtc->y_hint;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 27/36] drm/pl111: use bpp instead of cpp for drm_format_info
2019-09-23 12:52 [PATCH 26/36] drm/vboxvideo: use bpp instead of cpp for drm_format_info Sandy Huang
@ 2019-09-23 12:53 ` Sandy Huang
2019-09-23 12:53 ` [PATCH 28/36] drm/qxl: " Sandy Huang
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Sandy Huang @ 2019-09-23 12:53 UTC (permalink / raw)
To: dri-devel, Eric Anholt, David Airlie, Daniel Vetter; +Cc: hjc, 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/pl111/pl111_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
index 024771a4..9bc1664 100644
--- a/drivers/gpu/drm/pl111/pl111_display.c
+++ b/drivers/gpu/drm/pl111/pl111_display.c
@@ -103,7 +103,7 @@ static int pl111_display_check(struct drm_simple_display_pipe *pipe,
/* There's no pitch register -- the mode's hdisplay
* controls it.
*/
- if (fb->pitches[0] != mode->hdisplay * fb->format->cpp[0])
+ if (fb->pitches[0] != mode->hdisplay * fb->format->bpp[0] / 8)
return -EINVAL;
/* We can't change the FB format in a flicker-free
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 28/36] drm/qxl: use bpp instead of cpp for drm_format_info
2019-09-23 12:52 [PATCH 26/36] drm/vboxvideo: use bpp instead of cpp for drm_format_info Sandy Huang
2019-09-23 12:53 ` [PATCH 27/36] drm/pl111: " Sandy Huang
@ 2019-09-23 12:53 ` Sandy Huang
2019-09-23 12:53 ` [PATCH 29/36] drm/ingenic: " Sandy Huang
2019-09-23 12:53 ` [PATCH 30/36] drm/sti: " Sandy Huang
3 siblings, 0 replies; 6+ messages in thread
From: Sandy Huang @ 2019-09-23 12:53 UTC (permalink / raw)
To: dri-devel, Dave Airlie, Gerd Hoffmann, David Airlie, Daniel Vetter
Cc: hjc, virtualization, spice-devel, 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/qxl/qxl_draw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c
index 5bebf1e..71c18e6 100644
--- a/drivers/gpu/drm/qxl/qxl_draw.c
+++ b/drivers/gpu/drm/qxl/qxl_draw.c
@@ -141,7 +141,7 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
struct qxl_rect *rects;
int stride = fb->pitches[0];
/* depth is not actually interesting, we don't mask with it */
- int depth = fb->format->cpp[0] * 8;
+ int depth = fb->format->bpp[0];
uint8_t *surface_base;
struct qxl_release *release;
struct qxl_bo *clips_bo;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 29/36] drm/ingenic: use bpp instead of cpp for drm_format_info
2019-09-23 12:52 [PATCH 26/36] drm/vboxvideo: use bpp instead of cpp for drm_format_info Sandy Huang
2019-09-23 12:53 ` [PATCH 27/36] drm/pl111: " Sandy Huang
2019-09-23 12:53 ` [PATCH 28/36] drm/qxl: " Sandy Huang
@ 2019-09-23 12:53 ` Sandy Huang
2019-09-25 14:50 ` Paul Cercueil
2019-09-23 12:53 ` [PATCH 30/36] drm/sti: " Sandy Huang
3 siblings, 1 reply; 6+ messages in thread
From: Sandy Huang @ 2019-09-23 12:53 UTC (permalink / raw)
To: dri-devel, Paul Cercueil, David Airlie, Daniel Vetter; +Cc: hjc, 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/ingenic/ingenic-drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index ec32e1c..70ccec5 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -375,7 +375,7 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,
width = state->crtc->state->adjusted_mode.hdisplay;
height = state->crtc->state->adjusted_mode.vdisplay;
- cpp = state->fb->format->cpp[plane->index];
+ cpp = state->fb->format->bpp[plane->index] / 8;
priv->dma_hwdesc->addr = drm_fb_cma_get_gem_addr(state->fb, state, 0);
priv->dma_hwdesc->cmd = width * height * cpp / 4;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 30/36] drm/sti: use bpp instead of cpp for drm_format_info
2019-09-23 12:52 [PATCH 26/36] drm/vboxvideo: use bpp instead of cpp for drm_format_info Sandy Huang
` (2 preceding siblings ...)
2019-09-23 12:53 ` [PATCH 29/36] drm/ingenic: " Sandy Huang
@ 2019-09-23 12:53 ` Sandy Huang
3 siblings, 0 replies; 6+ messages in thread
From: Sandy Huang @ 2019-09-23 12:53 UTC (permalink / raw)
To: dri-devel, Benjamin Gaignard, Vincent Abriou, David Airlie,
Daniel Vetter
Cc: hjc, 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/sti/sti_gdp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index 11595c7..9280271 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -775,7 +775,7 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane,
(unsigned long)cma_obj->paddr);
/* pixel memory location */
- bpp = fb->format->cpp[0];
+ bpp = fb->format->bpp[0] / 8;
top_field->gam_gdp_pml = (u32)cma_obj->paddr + fb->offsets[0];
top_field->gam_gdp_pml += src_x * bpp;
top_field->gam_gdp_pml += src_y * fb->pitches[0];
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 29/36] drm/ingenic: use bpp instead of cpp for drm_format_info
2019-09-23 12:53 ` [PATCH 29/36] drm/ingenic: " Sandy Huang
@ 2019-09-25 14:50 ` Paul Cercueil
0 siblings, 0 replies; 6+ messages in thread
From: Paul Cercueil @ 2019-09-25 14:50 UTC (permalink / raw)
To: Sandy Huang; +Cc: dri-devel, David Airlie, Daniel Vetter, linux-kernel
Hi Sandy,
Le lun. 23 sept. 2019 à 14:53, Sandy Huang <hjc@rock-chips.com> a
écrit :
> 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/ingenic/ingenic-drm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c
> b/drivers/gpu/drm/ingenic/ingenic-drm.c
> index ec32e1c..70ccec5 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
> @@ -375,7 +375,7 @@ static void
> ingenic_drm_plane_atomic_update(struct drm_plane *plane,
>
> width = state->crtc->state->adjusted_mode.hdisplay;
> height = state->crtc->state->adjusted_mode.vdisplay;
> - cpp = state->fb->format->cpp[plane->index];
> + cpp = state->fb->format->bpp[plane->index] / 8;
That wouldn't work with 15-bit rgb555...
>
> priv->dma_hwdesc->addr = drm_fb_cma_get_gem_addr(state->fb, state,
> 0);
> priv->dma_hwdesc->cmd = width * height * cpp / 4;
> --
> 2.7.4
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-25 14:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 12:52 [PATCH 26/36] drm/vboxvideo: use bpp instead of cpp for drm_format_info Sandy Huang
2019-09-23 12:53 ` [PATCH 27/36] drm/pl111: " Sandy Huang
2019-09-23 12:53 ` [PATCH 28/36] drm/qxl: " Sandy Huang
2019-09-23 12:53 ` [PATCH 29/36] drm/ingenic: " Sandy Huang
2019-09-25 14:50 ` Paul Cercueil
2019-09-23 12:53 ` [PATCH 30/36] drm/sti: " 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).