]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/mdp5: Write to SMP registers even if allocations don't change
authorArchit Taneja <architt@codeaurora.org>
Fri, 28 Jul 2017 10:47:06 +0000 (16:17 +0530)
committerRob Clark <robdclark@gmail.com>
Wed, 2 Aug 2017 11:53:46 +0000 (07:53 -0400)
commit86c4a3f462aa5e5bddf2f15467967a3423536936
treec59f45de87f4f0f79c95433766d5e61513a47111
parent8c4ecb39c0c84f9deb6e1fb3556f4df3f8dac4ed
drm/msm/mdp5: Write to SMP registers even if allocations don't change

Requests for assigning/freeing SMP blocks by planes are collected during
the atomic check phase, and represented by mdp5_smp_state's 'assigned'
and 'released' members.

Once the atomic state is committed, these members are reset to 0,
indicating that the existing configuration satisfies all the planes.
Future atomic commits will copy the old mdp5_smp_state, and the 'assigned'
and 'released' members would be updated only if there was a change in
the plane configurations.

When we disable and re-enable display, we lose the values we wrote to the
SMP registers, but the code doesn't program the registers because there
isn't any change in mdp5_smp_state.

Fix this by writing to the registers irrespective of whether there was
a change in SMP state or not. We do this by keeping a cache of the
register values, and write them every time we commit a state.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c