mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 07:43:57 -04:00
drm/ttm: rename bo->mem and make it a pointer
When we want to decouble resource management from buffer management we need to be able to handle resources separately. Add a resource pointer and rename bo->mem so that all code needs to change to access the pointer instead. No functional change. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210430092508.60710-4-christian.koenig@amd.com
This commit is contained in:
@@ -576,11 +576,11 @@ static int vmw_cmd_emit_dummy_legacy_query(struct vmw_private *dev_priv,
|
||||
cmd->body.cid = cid;
|
||||
cmd->body.type = SVGA3D_QUERYTYPE_OCCLUSION;
|
||||
|
||||
if (bo->mem.mem_type == TTM_PL_VRAM) {
|
||||
if (bo->resource->mem_type == TTM_PL_VRAM) {
|
||||
cmd->body.guestResult.gmrId = SVGA_GMR_FRAMEBUFFER;
|
||||
cmd->body.guestResult.offset = bo->mem.start << PAGE_SHIFT;
|
||||
cmd->body.guestResult.offset = bo->resource->start << PAGE_SHIFT;
|
||||
} else {
|
||||
cmd->body.guestResult.gmrId = bo->mem.start;
|
||||
cmd->body.guestResult.gmrId = bo->resource->start;
|
||||
cmd->body.guestResult.offset = 0;
|
||||
}
|
||||
|
||||
@@ -621,8 +621,8 @@ static int vmw_cmd_emit_dummy_gb_query(struct vmw_private *dev_priv,
|
||||
cmd->header.size = sizeof(cmd->body);
|
||||
cmd->body.cid = cid;
|
||||
cmd->body.type = SVGA3D_QUERYTYPE_OCCLUSION;
|
||||
BUG_ON(bo->mem.mem_type != VMW_PL_MOB);
|
||||
cmd->body.mobid = bo->mem.start;
|
||||
BUG_ON(bo->resource->mem_type != VMW_PL_MOB);
|
||||
cmd->body.mobid = bo->resource->start;
|
||||
cmd->body.offset = 0;
|
||||
|
||||
vmw_cmd_commit(dev_priv, sizeof(*cmd));
|
||||
|
||||
Reference in New Issue
Block a user