nouveau: report byte usage in VRAM usage.
authorDave Airlie <airlied@redhat.com>
Mon, 26 Feb 2024 07:16:10 +0000 (17:16 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 1 Mar 2024 05:26:28 +0000 (15:26 +1000)
Turns out usage is always in bytes not shifted.

Fixes: 72fa02fdf833 ("nouveau: add an ioctl to report vram usage")
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nouveau_abi16.c

index cd14f993bdd1bdad352a70eba9acc473ceab7bdb..80f74ee0fc78677f8f890e8cc5daf8f363817b34 100644 (file)
@@ -269,7 +269,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
                break;
        case NOUVEAU_GETPARAM_VRAM_USED: {
                struct ttm_resource_manager *vram_mgr = ttm_manager_type(&drm->ttm.bdev, TTM_PL_VRAM);
-               getparam->value = (u64)ttm_resource_manager_usage(vram_mgr) << PAGE_SHIFT;
+               getparam->value = (u64)ttm_resource_manager_usage(vram_mgr);
                break;
        }
        default: