disp: msm: sde: cache encoder_mask for vblank_work

There is a race between disable commit swap-state on display
thread and vblank work on event thread which may skip applying
the vblank vote if the encoder_mask has already been cleared.
To avoid the race, use a cached encoder_mask that is gauranteed
to be valid between the vblank_on and vblank_off calls.

Also, vblank queue work is initializing a variable that's never
used and msm_disable_outputs has 2 instances of pointers to old
CRTC state. Remove this dead code.

Change-Id: I5e4a482b8f067e272a2aef5afa08cc0e1ab89434
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
このコミットが含まれているのは:
Steve Cohen
2020-11-11 14:37:10 -05:00
コミット aa064ada86
4個のファイルの変更23行の追加25行の削除

ファイルの表示

@@ -291,6 +291,7 @@ struct sde_crtc_misr_info {
* @static_cache_read_work: delayed worker to transition cache state to read
* @cache_state : Current static image cache state
* @dspp_blob_info : blob containing dspp hw capability information
* @cached_encoder_mask : cached encoder_mask for vblank work
*/
struct sde_crtc {
struct drm_crtc base;
@@ -381,6 +382,7 @@ struct sde_crtc {
enum sde_crtc_cache_state cache_state;
struct drm_property_blob *dspp_blob_info;
u32 cached_encoder_mask;
};
enum sde_crtc_dirty_flags {