@@ -599,14 +599,17 @@ void dispc_k2g_set_irqenable(struct dispc_device *dispc, dispc_irq_t mask)
599
599
{
600
600
dispc_irq_t old_mask = dispc_k2g_read_irqenable (dispc );
601
601
602
- /* clear the irqstatus for newly enabled irqs */
602
+ /* clear the irqstatus for irqs that will be enabled */
603
603
dispc_k2g_clear_irqstatus (dispc , (mask ^ old_mask ) & mask );
604
604
605
605
dispc_k2g_vp_set_irqenable (dispc , 0 , mask );
606
606
dispc_k2g_vid_set_irqenable (dispc , 0 , mask );
607
607
608
608
dispc_write (dispc , DISPC_IRQENABLE_SET , (1 << 0 ) | (1 << 7 ));
609
609
610
+ /* clear the irqstatus for irqs that were disabled */
611
+ dispc_k2g_clear_irqstatus (dispc , (mask ^ old_mask ) & old_mask );
612
+
610
613
/* flush posted write */
611
614
dispc_k2g_read_irqenable (dispc );
612
615
}
@@ -738,7 +741,7 @@ static void dispc_k3_set_irqenable(struct dispc_device *dispc,
738
741
739
742
old_mask = dispc_k3_read_irqenable (dispc );
740
743
741
- /* clear the irqstatus for newly enabled irqs */
744
+ /* clear the irqstatus for irqs that will be enabled */
742
745
dispc_k3_clear_irqstatus (dispc , (old_mask ^ mask ) & mask );
743
746
744
747
for (i = 0 ; i < dispc -> feat -> num_vps ; ++ i ) {
@@ -763,6 +766,9 @@ static void dispc_k3_set_irqenable(struct dispc_device *dispc,
763
766
if (main_disable )
764
767
dispc_write (dispc , DISPC_IRQENABLE_CLR , main_disable );
765
768
769
+ /* clear the irqstatus for irqs that were disabled */
770
+ dispc_k3_clear_irqstatus (dispc , (old_mask ^ mask ) & old_mask );
771
+
766
772
/* Flush posted writes */
767
773
dispc_read (dispc , DISPC_IRQENABLE_SET );
768
774
}
0 commit comments