AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Wu <ray.wu@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Aurabindo Pillai <aurabindo.pillai@amd.com>,
	Roman Li <roman.li@amd.com>, Wayne Lin <wayne.lin@amd.com>,
	Tom Chung <chiahsuan.chung@amd.com>,
	"Fangzhi Zuo" <jerry.zuo@amd.com>,
	Dan Wheeler <daniel.wheeler@amd.com>, Ray Wu <Ray.Wu@amd.com>,
	Ivan Lipski <ivan.lipski@amd.com>, Alex Hung <alex.hung@amd.com>,
	Dillon Varone <Dillon.Varone@amd.com>,
	Alvin Lee <alvin.lee2@amd.com>, Ray Wu <ray.wu@amd.com>
Subject: [PATCH 09/13] drm/amd/display: Revert DCN4 max buffered cursor size to 64
Date: Wed, 29 Oct 2025 11:02:57 +0800	[thread overview]
Message-ID: <20251029030935.2785560-10-ray.wu@amd.com> (raw)
In-Reply-To: <20251029030935.2785560-1-ray.wu@amd.com>

From: Dillon Varone <Dillon.Varone@amd.com>

[Why & How]
The buffered cursor cap is expressed assuming a square cursor, and usage
of the cursor buffer is limited by the request size. For greater than 32
pixels, the request size is fixed at 256 bytes, so the maximum width
must be floored to the nearest 256th byte. At 4bpp this means even with
24kB DCN4 can only hold a 64x64 cursor in the buffer as even 65 pixels
would require 512 bytes per line instead of 256.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
---
 drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
index 81e64e17d0cb..a9ebd15b9783 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
@@ -2200,7 +2200,8 @@ static bool dcn32_resource_construct(
 	dc->caps.i2c_speed_in_khz_hdcp = 100; /*1.4 w/a applied by default*/
 	/* TODO: Bring max_cursor_size back to 256 after subvp cursor corruption is fixed*/
 	dc->caps.max_cursor_size = 64;
-	dc->caps.max_buffered_cursor_size = 64; // sqrt(16 * 1024 / 4)
+	/* floor(sqrt(buf_size_bytes / bpp ) * bpp, fixed_req_size) / bpp = max_width */
+	dc->caps.max_buffered_cursor_size = 64; // floor(sqrt(16 * 1024 / 4) * 4, 256) / 4 = 64
 	dc->caps.min_horizontal_blanking_period = 80;
 	dc->caps.dmdata_alloc_size = 2048;
 	dc->caps.mall_size_per_mem_channel = 4;
-- 
2.43.0


  parent reply	other threads:[~2025-10-29  3:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29  3:02 [PATCH 00/13] DC Patches November 3, 2025 Ray Wu
2025-10-29  3:02 ` [PATCH 01/13] drm/amd/display: fw locality check refactors Ray Wu
2025-10-29  3:02 ` [PATCH 02/13] drm/amd/display: Extend inbox0 lock to run Replay/PSR Ray Wu
2025-10-29  3:02 ` [PATCH 03/13] drm/amd/display: Add pte_buffer_mode and force_one_row_for_frame in dchub reg Ray Wu
2025-10-29  3:02 ` [PATCH 04/13] drm/amd/display: Remove old PMO options Ray Wu
2025-10-29  3:02 ` [PATCH 05/13] drm/amd/display: Update P-state naming for clarity Ray Wu
2025-10-29  3:02 ` [PATCH 06/13] drm/amd/display: Refactor VActive implementation Ray Wu
2025-10-29  3:02 ` [PATCH 07/13] drm/amd/display: Add Pstate viewport reduction Ray Wu
2025-10-29  3:02 ` [PATCH 08/13] drm/amd/display: Persist stream refcount through restore Ray Wu
2025-10-29  3:02 ` Ray Wu [this message]
2025-10-29  3:02 ` [PATCH 10/13] drm/amd/display: Increase IB mem size Ray Wu
2025-10-29  3:02 ` [PATCH 11/13] drm/amd/display: Fix black screen with HDMI outputs Ray Wu
2025-10-29  8:07   ` Timur Kristóf
2025-10-29 15:56     ` Alex Hung
2025-10-29  3:03 ` [PATCH 12/13] drm/amd/display: [FW Promotion] Release 0.1.34.0 Ray Wu
2025-10-29  3:03 ` [PATCH 13/13] drm/amd/display: Promote DC to 3.2.357 Ray Wu
2025-11-03 13:59 ` [PATCH 00/13] DC Patches November 3, 2025 Wheeler, Daniel

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=20251029030935.2785560-10-ray.wu@amd.com \
    --to=ray.wu@amd.com \
    --cc=Dillon.Varone@amd.com \
    --cc=alex.hung@amd.com \
    --cc=alvin.lee2@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=daniel.wheeler@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=ivan.lipski@amd.com \
    --cc=jerry.zuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=sunpeng.li@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox