Skip to content

Commit 1b79cfd

Browse files
johnstultz-workxin3liang
authored andcommitted
drm: kirin: Revert "Fix for hikey620 display offset problem"
This reverts commit ff57c65. With the commit ff57c65 ("drm: kirin: Fix for hikey620 display offset problem") we added support for handling LDI overflows by resetting the hardware. However, its been observed that when we do hit the LDI overflow condition, the irq seems to be screaming, and we do nothing but stream: [drm:ade_irq_handler [kirin_drm]] *ERROR* LDI underflow! over and over to the screen I've tried a few appraoches to avoid this, but none has yet been successful and the cure here is worse then the original disease, so revert this for now. Cc: Xinliang Liu <[email protected]> Cc: Rongrong Zou <[email protected]> Cc: Xinwei Kong <[email protected]> Cc: Chen Feng <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Fixes: ff57c65 ("drm: kirin: Fix for hikey620 display offset problem") Signed-off-by: John Stultz <[email protected]> Acked-by: Xinliang Liu <[email protected]> Signed-off-by: Xinliang Liu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 20896ef commit 1b79cfd

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
#define VSIZE_OFST 20
8484
#define LDI_INT_EN 0x741C
8585
#define FRAME_END_INT_EN_OFST 1
86-
#define UNDERFLOW_INT_EN_OFST 2
8786
#define LDI_CTRL 0x7420
8887
#define BPP_OFST 3
8988
#define DATA_GATE_EN BIT(2)

drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ struct ade_hw_ctx {
4646
struct clk *media_noc_clk;
4747
struct clk *ade_pix_clk;
4848
struct reset_control *reset;
49-
struct work_struct display_reset_wq;
5049
bool power_on;
5150
int irq;
5251

@@ -136,7 +135,6 @@ static void ade_init(struct ade_hw_ctx *ctx)
136135
*/
137136
ade_update_bits(base + ADE_CTRL, FRM_END_START_OFST,
138137
FRM_END_START_MASK, REG_EFFECTIVE_IN_ADEEN_FRMEND);
139-
ade_update_bits(base + LDI_INT_EN, UNDERFLOW_INT_EN_OFST, MASK(1), 1);
140138
}
141139

142140
static bool ade_crtc_mode_fixup(struct drm_crtc *crtc,
@@ -304,17 +302,6 @@ static void ade_crtc_disable_vblank(struct drm_crtc *crtc)
304302
MASK(1), 0);
305303
}
306304

307-
static void drm_underflow_wq(struct work_struct *work)
308-
{
309-
struct ade_hw_ctx *ctx = container_of(work, struct ade_hw_ctx,
310-
display_reset_wq);
311-
struct drm_device *drm_dev = ctx->crtc->dev;
312-
struct drm_atomic_state *state;
313-
314-
state = drm_atomic_helper_suspend(drm_dev);
315-
drm_atomic_helper_resume(drm_dev, state);
316-
}
317-
318305
static irqreturn_t ade_irq_handler(int irq, void *data)
319306
{
320307
struct ade_hw_ctx *ctx = data;
@@ -331,12 +318,6 @@ static irqreturn_t ade_irq_handler(int irq, void *data)
331318
MASK(1), 1);
332319
drm_crtc_handle_vblank(crtc);
333320
}
334-
if (status & BIT(UNDERFLOW_INT_EN_OFST)) {
335-
ade_update_bits(base + LDI_INT_CLR, UNDERFLOW_INT_EN_OFST,
336-
MASK(1), 1);
337-
DRM_ERROR("LDI underflow!");
338-
schedule_work(&ctx->display_reset_wq);
339-
}
340321

341322
return IRQ_HANDLED;
342323
}
@@ -919,7 +900,6 @@ static void *ade_hw_ctx_alloc(struct platform_device *pdev,
919900
if (ret)
920901
return ERR_PTR(-EIO);
921902

922-
INIT_WORK(&ctx->display_reset_wq, drm_underflow_wq);
923903
ctx->crtc = crtc;
924904

925905
return ctx;

0 commit comments

Comments
 (0)