diff options
author | Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> | 2019-05-22 18:05:41 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-11 12:50:44 -0500 |
commit | 11cd74cdb98aa6f4d6f54a0082dd28e0d4743746 (patch) | |
tree | cb4565e9f860543b164669b0ab46909157d4d85e /drivers/gpu/drm/amd/display/dc/inc/vm_helper.h | |
parent | acbf7faaf925a5843d128dfbd30daaaab2de42f7 (diff) | |
download | linux-11cd74cdb98aa6f4d6f54a0082dd28e0d4743746.tar.gz linux-11cd74cdb98aa6f4d6f54a0082dd28e0d4743746.tar.bz2 linux-11cd74cdb98aa6f4d6f54a0082dd28e0d4743746.zip |
drm/amd/display: move vmid determination logic out of dc
Currently vmid is decided internally inside dc. This makes it
difficult to use vmid use with external components.
This change moves vmid logic outside dc and 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.h | 16 |
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_ */ |