diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2019-09-27 11:13:00 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2019-10-04 10:01:05 +0200 |
commit | 2c51a6601693ffbcef2eb3e47f6c2b8cb3949b86 (patch) | |
tree | 71e4b1a2678e0c72a9587a515ab47b69add372f5 /drivers/gpu/drm/mgag200/mgag200_ttm.c | |
parent | 378c18386a256947055a89e177e71af6f8a60934 (diff) | |
download | talos-op-linux-2c51a6601693ffbcef2eb3e47f6c2b8cb3949b86.tar.gz talos-op-linux-2c51a6601693ffbcef2eb3e47f6c2b8cb3949b86.zip |
drm/mgag200: Reserve video memory for cursor plane
The double-buffered cursor image is currently stored in video memory
by creating two BOs and pinning them to VRAM. The exact location is
chosen by VRAM helpers. The pinned cursor BOs can conflict with
framebuffer BOs and prevent the primary plane from displaying its
framebuffer.
As a first step to solving this problem, we reserve dedicated space at
the high end of the video memory for the cursor images. As the amount
of video memory now differs from the amount of available framebuffer
memory, size tests are adapted accordingly.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_ttm.c')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_ttm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c index 69c81ebf3745..99997d737362 100644 --- a/drivers/gpu/drm/mgag200/mgag200_ttm.c +++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c @@ -50,6 +50,8 @@ int mgag200_mm_init(struct mga_device *mdev) mdev->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0), pci_resource_len(dev->pdev, 0)); + mdev->vram_fb_available = mdev->mc.vram_size; + return 0; } @@ -57,6 +59,8 @@ void mgag200_mm_fini(struct mga_device *mdev) { struct drm_device *dev = mdev->dev; + mdev->vram_fb_available = 0; + drm_vram_helper_release_mm(dev); arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0), |