[RFC PATCH] drm/amdgpu: allocate entities on demand

Nirmoy nirmodas at amd.com
Mon Jan 20 13:05:32 UTC 2020


Hi Christian,

On 11/26/19 10:45 AM, Christian König wrote:
> It looks like a start, but there numerous things which needs to be fixed.
>
> Question number one is: What's that good for? Entities are not the 
> problem here. The real issue is the fence ring and the rq_list.
>
> The rq_list could actually be made constant since it should never be 
> changed by the entity. It is only changed for backward compatibility 
> in drm_sched_entity_set_priority().
>
> So I would start there and cleanup the drm_sched_entity_set_priority() 
> to actually just set a new constant rq list instead.
>
> Then we could embed the fences in amdgpu_ctx_entity as dynamic array 
> at the end of the structure.
>
amdgpu_ctx_entity already contains a fence array. Do you mean another 
fence array ?

struct amdgpu_ctx_entity {

         uint64_t                sequence;
         struct dma_fence        **fences;
         struct drm_sched_entity entity;
};



Regards,

Nirmoy

> And last we can start to dynamic allocate and initialize the 
> amdgpu_ctx_entity() structures.
>
> Regards,
> Christian.
>
>


More information about the amd-gfx mailing list