mirror of https://gitee.com/openkylin/linux.git
drm/amdkfd: correct pipe offset calculation
Correct pipe offset calculation in is_pipe_enabled function, it should be done in queues. Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0269764a73
commit
0d801007f9
|
@ -72,8 +72,8 @@ enum KFD_MQD_TYPE get_mqd_type_from_queue_type(enum kfd_queue_type type)
|
|||
static bool is_pipe_enabled(struct device_queue_manager *dqm, int mec, int pipe)
|
||||
{
|
||||
int i;
|
||||
int pipe_offset = mec * dqm->dev->shared_resources.num_pipe_per_mec
|
||||
+ pipe * dqm->dev->shared_resources.num_queue_per_pipe;
|
||||
int pipe_offset = (mec * dqm->dev->shared_resources.num_pipe_per_mec
|
||||
+ pipe) * dqm->dev->shared_resources.num_queue_per_pipe;
|
||||
|
||||
/* queue is available for KFD usage if bit is 1 */
|
||||
for (i = 0; i < dqm->dev->shared_resources.num_queue_per_pipe; ++i)
|
||||
|
|
Loading…
Reference in New Issue