From: Paul Cercueil 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 Message-ID: <1569423025.1909.1@crapouillou.net> References: <1569243189-183445-1-git-send-email-hjc@rock-chips.com> <1569243189-183445-4-git-send-email-hjc@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1569243189-183445-4-git-send-email-hjc@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org To: Sandy Huang Cc: dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org Hi Sandy, Le lun. 23 sept. 2019 =E0 14:53, Sandy Huang a=20 =E9crit : > cpp[BytePerPlane] can't describe the 10bit data format correctly, > So we use bpp[BitPerPlane] to instead cpp. >=20 > Signed-off-by: Sandy Huang > --- > drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c=20 > 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=20 > ingenic_drm_plane_atomic_update(struct drm_plane *plane, >=20 > width =3D state->crtc->state->adjusted_mode.hdisplay; > height =3D state->crtc->state->adjusted_mode.vdisplay; > - cpp =3D state->fb->format->cpp[plane->index]; > + cpp =3D state->fb->format->bpp[plane->index] / 8; That wouldn't work with 15-bit rgb555... >=20 > priv->dma_hwdesc->addr =3D drm_fb_cma_get_gem_addr(state->fb, state,=20 > 0); > priv->dma_hwdesc->cmd =3D width * height * cpp / 4; > -- > 2.7.4 >=20 >=20 >=20 =