From: Ian Forbes <ian.forbes@broadcom.com>
To: dri-devel@lists.freedesktop.org
Cc: bcm-kernel-feedback-list@broadcom.com, zack.rusin@broadcom.com,
martin.krastev@broadcom.com, maaz.mombasawala@broadcom.com,
Ian Forbes <ian.forbes@broadcom.com>
Subject: [PATCH 2/4] drm/vmwgfx: 3D disabled should not effect STDU memory limits
Date: Thu, 11 Apr 2024 16:26:49 -0500 [thread overview]
Message-ID: <20240411212651.540-3-ian.forbes@broadcom.com> (raw)
In-Reply-To: <20240411212651.540-1-ian.forbes@broadcom.com>
This limit became a hard cap starting with the change referenced below.
Surface creation on the device will fail if the requested size is larger
than this limit so altering the value arbitrarily will expose modes that
are too large for the device's hard limits.
Fixes: 7ebb47c9f9ab ("drm/vmwgfx: Read new register for GB memory when available")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 41ad13e45554..570d5fb65a2d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -958,13 +958,6 @@ static int vmw_driver_load(struct vmw_private *dev_priv, u32 pci_id)
vmw_read(dev_priv,
SVGA_REG_SUGGESTED_GBOBJECT_MEM_SIZE_KB);
- /*
- * Workaround for low memory 2D VMs to compensate for the
- * allocation taken by fbdev
- */
- if (!(dev_priv->capabilities & SVGA_CAP_3D))
- mem_size *= 3;
-
dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE;
dev_priv->max_primary_mem =
vmw_read(dev_priv, SVGA_REG_MAX_PRIMARY_MEM);
--
2.34.1
next prev parent reply other threads:[~2024-04-11 21:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 21:26 [PATCH 0/4] Fix memory limits for STDU Ian Forbes
2024-04-11 21:26 ` [PATCH 1/4] drm/vmwgfx: Filter modes which exceed graphics memory Ian Forbes
2024-04-11 21:26 ` Ian Forbes [this message]
2024-04-11 21:26 ` [PATCH 3/4] drm/vmwgfx: Remove STDU logic from generic mode_valid function Ian Forbes
2024-04-11 21:26 ` [PATCH 4/4] drm/vmwgfx: Standardize use of kibibytes when logging Ian Forbes
2024-04-12 3:22 ` [PATCH 0/4] Fix memory limits for STDU Zack Rusin
2024-04-15 22:08 ` Ian Forbes
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=20240411212651.540-3-ian.forbes@broadcom.com \
--to=ian.forbes@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maaz.mombasawala@broadcom.com \
--cc=martin.krastev@broadcom.com \
--cc=zack.rusin@broadcom.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.