mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 08:35:08 +08:00
drm/amd/display: Remove redundant vblank workqueues in DM
[Why] Display Manager initializes array of vblank workqueues, but only 1 is used. [How] Use single instance init instead of array. Reviewed-by: Qingqing Zhou <Qingqing.Zhuo@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Roman Li <Roman.Li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2eedeb070e
commit
8c0fc3bf1a
@ -1066,19 +1066,15 @@ static void event_mall_stutter(struct work_struct *work)
|
|||||||
|
|
||||||
static struct vblank_workqueue *vblank_create_workqueue(struct amdgpu_device *adev, struct dc *dc)
|
static struct vblank_workqueue *vblank_create_workqueue(struct amdgpu_device *adev, struct dc *dc)
|
||||||
{
|
{
|
||||||
|
|
||||||
int max_caps = dc->caps.max_links;
|
|
||||||
struct vblank_workqueue *vblank_work;
|
struct vblank_workqueue *vblank_work;
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
vblank_work = kcalloc(max_caps, sizeof(*vblank_work), GFP_KERNEL);
|
vblank_work = kzalloc(sizeof(*vblank_work), GFP_KERNEL);
|
||||||
if (ZERO_OR_NULL_PTR(vblank_work)) {
|
if (ZERO_OR_NULL_PTR(vblank_work)) {
|
||||||
kfree(vblank_work);
|
kfree(vblank_work);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < max_caps; i++)
|
INIT_WORK(&vblank_work->mall_work, event_mall_stutter);
|
||||||
INIT_WORK(&vblank_work[i].mall_work, event_mall_stutter);
|
|
||||||
|
|
||||||
return vblank_work;
|
return vblank_work;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user