diff options
| author | Deepak Rawat <drawat@vmware.com> | 2018-09-13 06:44:13 -0400 |
|---|---|---|
| committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-09-20 02:00:03 -0400 |
| commit | 140b4e67c2e1269a945c5caacdcb0c0346ad4cef (patch) | |
| tree | b42e8344d97d01e811ca1fdf592a37776f66bbc4 | |
| parent | 0c1b174b1b9a497230f937345d4db76fea267398 (diff) | |
drm/vmwgfx: limit mode size for all display unit to texture_max
For all display units, limit mode size exposed to texture_max_width/
height as this is the maximum framebuffer size that virtual device can
create.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 12a41b039167..6a712a8d59e9 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
| @@ -2214,12 +2214,16 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector, | |||
| 2214 | if (dev_priv->assume_16bpp) | 2214 | if (dev_priv->assume_16bpp) |
| 2215 | assumed_bpp = 2; | 2215 | assumed_bpp = 2; |
| 2216 | 2216 | ||
| 2217 | max_width = min(max_width, dev_priv->texture_max_width); | ||
| 2218 | max_height = min(max_height, dev_priv->texture_max_height); | ||
| 2219 | |||
| 2220 | /* | ||
| 2221 | * For STDU extra limit for a mode on SVGA_REG_SCREENTARGET_MAX_WIDTH/ | ||
| 2222 | * HEIGHT registers. | ||
| 2223 | */ | ||
| 2217 | if (dev_priv->active_display_unit == vmw_du_screen_target) { | 2224 | if (dev_priv->active_display_unit == vmw_du_screen_target) { |
| 2218 | max_width = min(max_width, dev_priv->stdu_max_width); | 2225 | max_width = min(max_width, dev_priv->stdu_max_width); |
| 2219 | max_width = min(max_width, dev_priv->texture_max_width); | ||
| 2220 | |||
| 2221 | max_height = min(max_height, dev_priv->stdu_max_height); | 2226 | max_height = min(max_height, dev_priv->stdu_max_height); |
| 2222 | max_height = min(max_height, dev_priv->texture_max_height); | ||
| 2223 | } | 2227 | } |
| 2224 | 2228 | ||
| 2225 | /* Add preferred mode */ | 2229 | /* Add preferred mode */ |
