disp: msm: sde: fix potential race condition
Move the hist irq handling out of callback function, i.e., the hw interrupt irq_lock context, to avoid dead lock between crtc spin_lock and irq_lock. This change also extends crtc spin_lock coverage in _sde_cp_crtc_enable_hist_irq to prevent null pointer dereference on event node, which can be deleted during crtc event de-registration. Change-Id: Iadaed54ab93c4c4abe065a8762d2addccb0c65c6 Signed-off-by: Ping Li <pingli@codeaurora.org>
Tento commit je obsažen v:

odevzdal
Gerrit - the friendly Code Review server

rodič
b02eea56af
revize
7ed51b95a2
@@ -290,6 +290,7 @@ struct sde_crtc_misr_info {
|
||||
* @ltm_buffer_lock : muttx to protect ltm_buffers allcation and free
|
||||
* @ltm_lock : Spinlock to protect ltm buffer_cnt, hist_en and ltm lists
|
||||
* @needs_hw_reset : Initiate a hw ctl reset
|
||||
* @hist_irq_idx : hist interrupt irq idx
|
||||
* @src_bpp : source bpp used to calculate compression ratio
|
||||
* @target_bpp : target bpp used to calculate compression ratio
|
||||
* @static_cache_read_work: delayed worker to transition cache state to read
|
||||
@@ -383,6 +384,7 @@ struct sde_crtc {
|
||||
struct mutex ltm_buffer_lock;
|
||||
spinlock_t ltm_lock;
|
||||
bool needs_hw_reset;
|
||||
int hist_irq_idx;
|
||||
|
||||
int src_bpp;
|
||||
int target_bpp;
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele