summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
diff options
context:
space:
mode:
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>2019-05-22 18:05:41 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-22 09:34:14 -0500
commitbda9afdacf8942c313a47cc95582737345a91c5e (patch)
tree93c6ddff82040a2b1baba38e14026d800da59767 /drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
parenta6465d1f3b8f863bd4ffd4048d10de3558b378d5 (diff)
downloadlinux-bda9afdacf8942c313a47cc95582737345a91c5e.tar.bz2
drm/amd/display: move vmid determination logic to a module
Currently vmid is decided internally inside dc. With the introduction of new asics we are required to coordinate vmid use with external components. This change converts vmid logic to a DAL module allowing vmid to be passed in as a parameter to DC. Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/vm_helper.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/vm_helper.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h b/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
index 193407f76a80..8bfcef0a3675 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
@@ -28,29 +28,21 @@
#include "dc_types.h"
-#define MAX_VMID 16
#define MAX_HUBP 6
struct vmid_usage {
- uint16_t vmid_usage[2];
+ int vmid_usage[2];
};
struct vm_helper {
unsigned int num_vmid;
- unsigned int num_hubp;
- unsigned int num_vmids_available;
- uint64_t ptb_assigned_to_vmid[MAX_VMID];
struct vmid_usage hubp_vmid_usage[MAX_HUBP];
};
-uint8_t get_vmid_for_ptb(
- struct vm_helper *vm_helper,
- int64_t ptb,
- uint8_t pipe_idx);
+void vm_helper_mark_vmid_used(struct vm_helper *vm_helper, unsigned int pos, uint8_t hubp_idx);
-void init_vm_helper(
+void vm_helper_init(
struct vm_helper *vm_helper,
- unsigned int num_vmid,
- unsigned int num_hubp);
+ unsigned int num_vmid);
#endif /* DC_INC_VM_HELPER_H_ */