From: Paul Cercueil <paul@crapouillou.net>
To: Sandy Huang <hjc@rock-chips.com>
Cc: dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 29/36] drm/ingenic: use bpp instead of cpp for drm_format_info
Date: Wed, 25 Sep 2019 16:50:25 +0200 [thread overview]
Message-ID: <1569423025.1909.1@crapouillou.net> (raw)
In-Reply-To: <1569243189-183445-4-git-send-email-hjc@rock-chips.com>
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
>
>
>
next prev parent reply other threads:[~2019-09-25 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-09-23 12:53 ` [PATCH 30/36] drm/sti: " Sandy Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1569423025.1909.1@crapouillou.net \
--to=paul@crapouillou.net \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hjc@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox