diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-08-02 11:33:08 +0800 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2021-08-09 17:30:34 -0400 |
commit | bc65754ca61498f2bb351f6b0ad56f853fc7a966 (patch) | |
tree | 784163a68d7cf96f357cd66113f2272c6eca4754 /drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | |
parent | 2bc5da528dd570c5ecabc107e6fbdbc55974276f (diff) | |
download | lwn-bc65754ca61498f2bb351f6b0ad56f853fc7a966.tar.gz lwn-bc65754ca61498f2bb351f6b0ad56f853fc7a966.zip |
drm/vmwgfx: Make use of PFN_ALIGN/PFN_UP helper macro
it's a refactor to make use of PFN_ALIGN/PFN_UP helper macro
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210802033308.927-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c index c84a16c1def0..17a98db00017 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c @@ -607,8 +607,7 @@ struct vmw_resource *vmw_cotable_alloc(struct vmw_private *dev_priv, if (num_entries < co_info[type].min_initial_entries) { vcotbl->res.backup_size = co_info[type].min_initial_entries * co_info[type].size; - vcotbl->res.backup_size = - (vcotbl->res.backup_size + PAGE_SIZE - 1) & PAGE_MASK; + vcotbl->res.backup_size = PFN_ALIGN(vcotbl->res.backup_size); } vcotbl->scrubbed = true; |