From: Sandy Huang <hjc@rock-chips.com> To: dri-devel@lists.freedesktop.org, "James (Qian) Wang" <james.qian.wang@arm.com>, Liviu Dudau <liviu.dudau@arm.com>, Brian Starkey <brian.starkey@arm.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch> Cc: hjc@rock-chips.com, linux-kernel@vger.kernel.org Subject: [PATCH 10/36] drm/arm: use bpp instead of cpp for drm_format_info Date: Mon, 23 Sep 2019 20:41:14 +0800 [thread overview] Message-ID: <1569242500-182337-11-git-send-email-hjc@rock-chips.com> (raw) In-Reply-To: <1569242500-182337-7-git-send-email-hjc@rock-chips.com> 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/arm/display/komeda/komeda_framebuffer.c | 2 +- drivers/gpu/drm/arm/malidp_hw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c index 3b0a70e..d02dfc6 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c @@ -89,7 +89,7 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct drm_file *file, alignment_header); kfb->afbc_size = kfb->offset_payload + n_blocks * - ALIGN(info->cpp[0] * AFBC_SUPERBLK_PIXELS, + ALIGN(info->bpp[0] / 8 * AFBC_SUPERBLK_PIXELS, AFBC_SUPERBLK_ALIGNMENT); min_size = kfb->afbc_size + fb->offsets[0]; if (min_size > obj->size) { diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index bd8265f..54be8d1 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -384,7 +384,7 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode * int malidp_format_get_bpp(u32 fmt) { const struct drm_format_info *info = drm_format_info(fmt); - int bpp = info->cpp[0] * 8; + int bpp = info->bpp[0]; if (bpp == 0) { switch (fmt) { diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 3c70a53..628f325 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -225,7 +225,7 @@ bool malidp_format_mod_supported(struct drm_device *drm, if (modifier & AFBC_SPLIT) { if (!info->is_yuv) { - if (info->cpp[0] <= 2) { + if (info->bpp[0] <= 16) { DRM_DEBUG_KMS("RGB formats <= 16bpp are not supported with SPLIT\n"); return false; } -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Sandy Huang <hjc@rock-chips.com> To: dri-devel@lists.freedesktop.org, "James (Qian) Wang" <james.qian.wang@arm.com>, Liviu Dudau <liviu.dudau@arm.com>, Brian Starkey <brian.starkey@arm.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch> Cc: linux-kernel@vger.kernel.org Subject: [PATCH 10/36] drm/arm: use bpp instead of cpp for drm_format_info Date: Mon, 23 Sep 2019 20:41:14 +0800 [thread overview] Message-ID: <1569242500-182337-11-git-send-email-hjc@rock-chips.com> (raw) In-Reply-To: <1569242500-182337-7-git-send-email-hjc@rock-chips.com> 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/arm/display/komeda/komeda_framebuffer.c | 2 +- drivers/gpu/drm/arm/malidp_hw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c index 3b0a70e..d02dfc6 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c @@ -89,7 +89,7 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct drm_file *file, alignment_header); kfb->afbc_size = kfb->offset_payload + n_blocks * - ALIGN(info->cpp[0] * AFBC_SUPERBLK_PIXELS, + ALIGN(info->bpp[0] / 8 * AFBC_SUPERBLK_PIXELS, AFBC_SUPERBLK_ALIGNMENT); min_size = kfb->afbc_size + fb->offsets[0]; if (min_size > obj->size) { diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index bd8265f..54be8d1 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -384,7 +384,7 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode * int malidp_format_get_bpp(u32 fmt) { const struct drm_format_info *info = drm_format_info(fmt); - int bpp = info->cpp[0] * 8; + int bpp = info->bpp[0]; if (bpp == 0) { switch (fmt) { diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 3c70a53..628f325 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -225,7 +225,7 @@ bool malidp_format_mod_supported(struct drm_device *drm, if (modifier & AFBC_SPLIT) { if (!info->is_yuv) { - if (info->cpp[0] <= 2) { + if (info->bpp[0] <= 16) { DRM_DEBUG_KMS("RGB formats <= 16bpp are not supported with SPLIT\n"); return false; } -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-09-23 12:52 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-23 12:41 [PATCH 06/36] drm/amd: use bpp instead of cpp for drm_format_info Sandy Huang 2019-09-23 12:41 ` Sandy Huang 2019-09-23 12:41 ` [PATCH 07/36] drm/gma500: " Sandy Huang 2019-09-23 12:41 ` [PATCH 08/36] drm/msm: " Sandy Huang 2019-09-23 16:53 ` Rob Clark 2019-09-23 16:53 ` Rob Clark 2019-09-23 12:41 ` [PATCH 09/36] dm/vmwgfx: " Sandy Huang 2019-09-23 12:41 ` Sandy Huang 2019-09-23 12:41 ` Sandy Huang [this message] 2019-09-23 12:41 ` [PATCH 10/36] drm/arm: " Sandy Huang 2019-09-23 12:46 Sandy Huang 2019-09-23 13:49 ` Liviu Dudau
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=1569242500-182337-11-git-send-email-hjc@rock-chips.com \ --to=hjc@rock-chips.com \ --cc=airlied@linux.ie \ --cc=brian.starkey@arm.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=james.qian.wang@arm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=liviu.dudau@arm.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.