mirror of https://gitee.com/openkylin/linux.git
drm/komeda: Add event handling for EMPTY/FULL
EMPTY/FULL are HW input/output FIFO condition identifer, which are useful information for addressing the problem, so expose them. Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com> Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191212072737.30116-1-james.qian.wang@arm.com
This commit is contained in:
parent
52028bfcb2
commit
8f902dbd6e
|
@ -20,8 +20,10 @@ static u64 get_lpu_event(struct d71_pipeline *d71_pipeline)
|
|||
evts |= KOMEDA_EVENT_IBSY;
|
||||
if (raw_status & LPU_IRQ_EOW)
|
||||
evts |= KOMEDA_EVENT_EOW;
|
||||
if (raw_status & LPU_IRQ_OVR)
|
||||
evts |= KOMEDA_EVENT_OVR;
|
||||
|
||||
if (raw_status & (LPU_IRQ_ERR | LPU_IRQ_IBSY)) {
|
||||
if (raw_status & (LPU_IRQ_ERR | LPU_IRQ_IBSY | LPU_IRQ_OVR)) {
|
||||
u32 restore = 0, tbu_status;
|
||||
/* Check error of LPU status */
|
||||
status = malidp_read32(reg, BLK_STATUS);
|
||||
|
@ -45,6 +47,15 @@ static u64 get_lpu_event(struct d71_pipeline *d71_pipeline)
|
|||
restore |= LPU_STATUS_ACE3;
|
||||
evts |= KOMEDA_ERR_ACE3;
|
||||
}
|
||||
if (status & LPU_STATUS_FEMPTY) {
|
||||
restore |= LPU_STATUS_FEMPTY;
|
||||
evts |= KOMEDA_EVENT_EMPTY;
|
||||
}
|
||||
if (status & LPU_STATUS_FFULL) {
|
||||
restore |= LPU_STATUS_FFULL;
|
||||
evts |= KOMEDA_EVENT_FULL;
|
||||
}
|
||||
|
||||
if (restore != 0)
|
||||
malidp_write32_mask(reg, BLK_STATUS, restore, 0);
|
||||
|
||||
|
|
|
@ -175,6 +175,7 @@
|
|||
#define TBU_DOUTSTDCAPB_MASK 0x3F
|
||||
|
||||
/* LPU_IRQ_BITS */
|
||||
#define LPU_IRQ_OVR BIT(9)
|
||||
#define LPU_IRQ_IBSY BIT(10)
|
||||
#define LPU_IRQ_ERR BIT(11)
|
||||
#define LPU_IRQ_EOW BIT(12)
|
||||
|
@ -185,6 +186,8 @@
|
|||
#define LPU_STATUS_AXIE BIT(4)
|
||||
#define LPU_STATUS_AXIRP BIT(5)
|
||||
#define LPU_STATUS_AXIWP BIT(6)
|
||||
#define LPU_STATUS_FEMPTY BIT(11)
|
||||
#define LPU_STATUS_FFULL BIT(14)
|
||||
#define LPU_STATUS_ACE0 BIT(16)
|
||||
#define LPU_STATUS_ACE1 BIT(17)
|
||||
#define LPU_STATUS_ACE2 BIT(18)
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#define KOMEDA_EVENT_OVR BIT_ULL(4)
|
||||
#define KOMEDA_EVENT_EOW BIT_ULL(5)
|
||||
#define KOMEDA_EVENT_MODE BIT_ULL(6)
|
||||
#define KOMEDA_EVENT_FULL BIT_ULL(7)
|
||||
#define KOMEDA_EVENT_EMPTY BIT_ULL(8)
|
||||
|
||||
#define KOMEDA_ERR_TETO BIT_ULL(14)
|
||||
#define KOMEDA_ERR_TEMR BIT_ULL(15)
|
||||
|
@ -49,7 +51,8 @@
|
|||
KOMEDA_ERR_ZME | KOMEDA_ERR_MERR | KOMEDA_ERR_TCF |\
|
||||
KOMEDA_ERR_TTNG | KOMEDA_ERR_TTF)
|
||||
|
||||
#define KOMEDA_WARN_EVENTS KOMEDA_ERR_CSCE
|
||||
#define KOMEDA_WARN_EVENTS \
|
||||
(KOMEDA_ERR_CSCE | KOMEDA_EVENT_FULL | KOMEDA_EVENT_EMPTY)
|
||||
|
||||
#define KOMEDA_INFO_EVENTS (0 \
|
||||
| KOMEDA_EVENT_VSYNC \
|
||||
|
|
|
@ -78,6 +78,8 @@ static void evt_str(struct komeda_str *str, u64 events)
|
|||
|
||||
/* LPU errors or events */
|
||||
evt_sprintf(str, events & KOMEDA_EVENT_IBSY, "IBSY|");
|
||||
evt_sprintf(str, events & KOMEDA_EVENT_EMPTY, "EMPTY|");
|
||||
evt_sprintf(str, events & KOMEDA_EVENT_FULL, "FULL|");
|
||||
evt_sprintf(str, events & KOMEDA_ERR_AXIE, "AXIE|");
|
||||
evt_sprintf(str, events & KOMEDA_ERR_ACE0, "ACE0|");
|
||||
evt_sprintf(str, events & KOMEDA_ERR_ACE1, "ACE1|");
|
||||
|
|
Loading…
Reference in New Issue