All of lore.kernel.org
 help / color / mirror / Atom feed
From: brichang <Brian.Chang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Brian Chang <Brian.Chang@amd.com>,
	Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	qingqing.zhuo@amd.com, Rodrigo.Siqueira@amd.com,
	roman.li@amd.com, Samson Tam <Samson.Tam@amd.com>,
	solomon.chiu@amd.com, Aurabindo.Pillai@amd.com,
	Alvin Lee <Alvin.Lee2@amd.com>,
	wayne.lin@amd.com, Bhawanpreet.Lakha@amd.com,
	agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: [PATCH 13/14] drm/amd/display: Use pitch when calculating size to cache in MALL
Date: Sat, 13 Aug 2022 06:12:21 +0800	[thread overview]
Message-ID: <20220812221222.1700948-14-Brian.Chang@amd.com> (raw)
In-Reply-To: <20220812221222.1700948-1-Brian.Chang@amd.com>

From: Alvin Lee <Alvin.Lee2@amd.com>

[Description]
Use pitch when calculating size to cache in MALL

Reviewed-by: Samson Tam <Samson.Tam@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
index b3f8503cea9c..955f52e6064d 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c
@@ -63,7 +63,7 @@ uint32_t dcn32_helper_calculate_num_ways_for_subvp(struct dc *dc, struct dc_stat
 		if (pipe->stream && pipe->plane_state && !pipe->top_pipe &&
 				pipe->stream->mall_stream_config.type == SUBVP_PHANTOM) {
 			bytes_per_pixel = pipe->plane_state->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 ? 8 : 4;
-			mall_region_pixels = pipe->stream->timing.h_addressable * pipe->stream->timing.v_addressable;
+			mall_region_pixels = pipe->plane_state->plane_size.surface_pitch * pipe->stream->timing.v_addressable;
 
 			// For bytes required in MALL, calculate based on number of MBlks required
 			num_mblks = (mall_region_pixels * bytes_per_pixel +
-- 
2.25.1


  parent reply	other threads:[~2022-08-13  2:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 22:12 [PATCH 00/14] DC Patches August 12, 2022 brichang
2022-08-12 22:12 ` [PATCH 01/14] drm/amd/display: reverted limiting vscsdp_for_colorimetry and ARGB16161616 pixel format addition brichang
2022-08-12 22:12 ` [PATCH 02/14] drm/amd/display: 3.2.198 brichang
2022-08-12 22:12 ` [PATCH 03/14] drm/amd/display: Fix pixel clock programming brichang
2022-08-12 22:12 ` [PATCH 04/14] Add reserved dc_log_type brichang
2022-08-12 22:12 ` [PATCH 05/14] drm/amd/display: do not compare integers of different widths brichang
2022-08-12 22:12 ` [PATCH 06/14] drm/amd/display: add chip revision to DCN32 brichang
2022-08-12 22:12 ` [PATCH 07/14] drm/amd/display: Add debug parameter to retain default clock table brichang
2022-08-12 22:12 ` [PATCH 08/14] drm/amd/display: Fix plug/unplug external monitor will hang while playback MPO video brichang
2022-08-12 22:12 ` [PATCH 09/14] drm/amd/display: Include scaling factor for SubVP command brichang
2022-08-12 22:12 ` [PATCH 10/14] drm/amd/display: Modify header inclusion pattern brichang
2022-08-12 22:12 ` [PATCH 11/14] drm/amd/display: Update clock table policy for DCN314 brichang
2022-08-12 22:12 ` [PATCH 12/14] drm/amd/display: Don't set DSC for phantom pipes brichang
2022-08-12 22:12 ` brichang [this message]
2022-08-12 22:12 ` [PATCH 14/14] drm/amd/display: avoid doing vm_init multiple time brichang

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=20220812221222.1700948-14-Brian.Chang@amd.com \
    --to=brian.chang@amd.com \
    --cc=Alvin.Lee2@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Samson.Tam@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=agustin.gutierrez@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=pavle.kotarac@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=solomon.chiu@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=wayne.lin@amd.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: link
Be 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.