Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4321804ybf; Wed, 4 Mar 2020 01:33:30 -0800 (PST) X-Google-Smtp-Source: ADFU+vtZPZ6wVhpRST2zFCMpQ4dzHOcItKNcu3qTcp+zcQEV8WpPgDQvFuvKNC5762dSk2QUUsp6 X-Received: by 2002:a9d:7c81:: with SMTP id q1mr1572245otn.112.1583314410119; Wed, 04 Mar 2020 01:33:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583314410; cv=none; d=google.com; s=arc-20160816; b=r02GsbVEzwEv6/IvxQKFFj9QUpf1gjszzo+uoMoufX2cbtJpxiUqBjfw+e8ujVbVf+ 7HEn+i1SUDVAklfjHZGMEvIn9QQxnhFijL5/j0ogcmNcJ76yu+xWzgTXHO8MRQYtH6sL /RYWsNjowhww4C2z3V2EpIM9Ezy343+TBH2mzzJPpbmV1ErnitXn9DHwQKLTR8slLHyY UFEcb+p7S4vhEYZKrmGbmLVABcv0sjzF7JzRjICvA/gvhLoH3x6MvL/fr89Z2SwkS4sB ZkXZSThZ1heDw/12VTZafmAdsZfJYsv1ybhG4Uc5vKelonTkIc3M66u3r5OtsI/+vlwR Xbtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LM09aI8hT3E7eSpPRMixvbuVdkHccR+97mzsVvQTqFw=; b=Vl9qz5bAfEkXzz/JjTDLze+sUvgCvbAgJfoKh9xeQTnLUENs3H3J1kB1txMfVz+0V6 KwGZuaaUIjbi9g3GoxhnC57qomIYzcFXSsqHLydJCzjLmQGWS5HlJtDmHxr7UDvktfJc fzwEBjZYQWsI2rqwXS4Hjy4f7eJPfi24dIx0Fcq7lfhbkxKdlBLn2EkUvj8ACL9O2tR6 uzcVbi6hLlVJu5SLRuZCJoVpKi1Kx8kdatHz3YvrTpxvsq4NaFPqeMODfgu9xGGHb28Z NuUehTudqWBXzu2XXylzP+qcI+DQb5md3GGhKahGPTe2kswkW2NKE1bECYGC3hfLwWwe wrYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fwzzrgG0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y184si837098oia.22.2020.03.04.01.33.16; Wed, 04 Mar 2020 01:33:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fwzzrgG0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728988AbgCDJcm (ORCPT + 99 others); Wed, 4 Mar 2020 04:32:42 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42183 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728916AbgCDJcm (ORCPT ); Wed, 4 Mar 2020 04:32:42 -0500 Received: by mail-wr1-f65.google.com with SMTP id z11so1462299wro.9 for ; Wed, 04 Mar 2020 01:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LM09aI8hT3E7eSpPRMixvbuVdkHccR+97mzsVvQTqFw=; b=fwzzrgG0U/O8OvHqSLknOC1y/PyQ5EAazTL3Z+i8L15pFlC/bcTiRIb44KxPXD7w93 gco1q4LgIgfXkvDy5KFN2I1Tsqe7nSrg0S+0Andr8tSTto08bFpbf6Y3o8a8XtRx+AgL S5XAPzjmPTqEhv5UR5WG/H2JFHRUyNOc9/Sdxm6V1VO/caryvLJ9uCBq1B6y5T8wn6Nj rp5ZOawQwLFY5yYF6MZXpcdQTQug4MAnXFKcfh/vO4050UwSPYX/6XWISpM4op7C+wVM MuMP0lpRuB78BDDZ7lBenC8atVcJqr5N28tcgYr1cD8BDimcu3h846h1+TESnitIrZgO fKIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LM09aI8hT3E7eSpPRMixvbuVdkHccR+97mzsVvQTqFw=; b=o0pj8RGNWbpKBnExyCsDLsECx+RWIqge+RkQlmDlo27GYTQRMb7B8u9Lxel2LGOFjH tpvyalIWkaQILvWh1Cs/4UUSbsF/s9xdrLbvnzkPM+tb7b0fJBnxPlIXSPA0woG+ck1f AnfVq3eURrrCUjAzw7f6niN/yshPEu4F1j9Csm6NUNhU0jJTE6YNrfb2hIJ0Q6dp3I6f KiIHpvNiP4rUQF7uor+Fhka7FkMd4zFcH8PEIUF8YysXeEjmAiTah9o5kO22vOyLrUQ8 QMHL3oh9i56aNs/JZkLoj07AJ6k494pZ4KEiBfcOjSZdAcG5cF+O2MRx2ar5YXd8bmHe 9Ong== X-Gm-Message-State: ANhLgQ3fBLKrXfSX/Np0jtZpSGgYB9OZbchTyaM0T9nBvZjyjRhy2bft 8tRiRA2bevErSs9R15cqhmCdK9T2YEz1n0t/xr2abQ== X-Received: by 2002:adf:ffc4:: with SMTP id x4mr3266322wrs.306.1583314359012; Wed, 04 Mar 2020 01:32:39 -0800 (PST) MIME-Version: 1.0 References: <20200303163228.52741-1-john.stultz@linaro.org> In-Reply-To: From: Xinliang Liu Date: Wed, 4 Mar 2020 17:32:24 +0800 Message-ID: Subject: Re: [PATCH] drm: kirin: Revert "Fix for hikey620 display offset problem" To: John Stultz Cc: lkml , Rongrong Zou , Xinwei Kong , Chen Feng , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Mar 2020 at 17:28, Xinliang Liu wrote: > > On Wed, 4 Mar 2020 at 00:32, John Stultz wrote: > > > > This reverts commit ff57c6513820efe945b61863cf4a51b79f18b592. > > > > With the commit ff57c6513820 ("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. > > Sorry to hear that. Then it seems such underflow errors can't be > recovered via reset. > Anyway, for this patch > Acked-by: Xinliang Liu Sorry , should be: Acked-by: Xinliang Liu > > And applied to drm-misc . > > -xinliang > > > > > Cc: Xinliang Liu > > Cc: Rongrong Zou > > Cc: Xinwei Kong > > Cc: Chen Feng > > Cc: Sam Ravnborg > > Cc: David Airlie > > Cc: Daniel Vetter > > Cc: dri-devel > > Fixes: ff57c6513820 ("drm: kirin: Fix for hikey620 display offset problem") > > Signed-off-by: John Stultz > > --- > > .../gpu/drm/hisilicon/kirin/kirin_ade_reg.h | 1 - > > .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 20 ------------------- > > 2 files changed, 21 deletions(-) > > > > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h b/drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h > > index 0da860200410..e2ac09894a6d 100644 > > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h > > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h > > @@ -83,7 +83,6 @@ > > #define VSIZE_OFST 20 > > #define LDI_INT_EN 0x741C > > #define FRAME_END_INT_EN_OFST 1 > > -#define UNDERFLOW_INT_EN_OFST 2 > > #define LDI_CTRL 0x7420 > > #define BPP_OFST 3 > > #define DATA_GATE_EN BIT(2) > > diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > > index 73cd28a6ea07..86000127d4ee 100644 > > --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > > +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c > > @@ -46,7 +46,6 @@ struct ade_hw_ctx { > > struct clk *media_noc_clk; > > struct clk *ade_pix_clk; > > struct reset_control *reset; > > - struct work_struct display_reset_wq; > > bool power_on; > > int irq; > > > > @@ -136,7 +135,6 @@ static void ade_init(struct ade_hw_ctx *ctx) > > */ > > ade_update_bits(base + ADE_CTRL, FRM_END_START_OFST, > > FRM_END_START_MASK, REG_EFFECTIVE_IN_ADEEN_FRMEND); > > - ade_update_bits(base + LDI_INT_EN, UNDERFLOW_INT_EN_OFST, MASK(1), 1); > > } > > > > static bool ade_crtc_mode_fixup(struct drm_crtc *crtc, > > @@ -304,17 +302,6 @@ static void ade_crtc_disable_vblank(struct drm_crtc *crtc) > > MASK(1), 0); > > } > > > > -static void drm_underflow_wq(struct work_struct *work) > > -{ > > - struct ade_hw_ctx *ctx = container_of(work, struct ade_hw_ctx, > > - display_reset_wq); > > - struct drm_device *drm_dev = ctx->crtc->dev; > > - struct drm_atomic_state *state; > > - > > - state = drm_atomic_helper_suspend(drm_dev); > > - drm_atomic_helper_resume(drm_dev, state); > > -} > > - > > static irqreturn_t ade_irq_handler(int irq, void *data) > > { > > struct ade_hw_ctx *ctx = data; > > @@ -331,12 +318,6 @@ static irqreturn_t ade_irq_handler(int irq, void *data) > > MASK(1), 1); > > drm_crtc_handle_vblank(crtc); > > } > > - if (status & BIT(UNDERFLOW_INT_EN_OFST)) { > > - ade_update_bits(base + LDI_INT_CLR, UNDERFLOW_INT_EN_OFST, > > - MASK(1), 1); > > - DRM_ERROR("LDI underflow!"); > > - schedule_work(&ctx->display_reset_wq); > > - } > > > > return IRQ_HANDLED; > > } > > @@ -919,7 +900,6 @@ static void *ade_hw_ctx_alloc(struct platform_device *pdev, > > if (ret) > > return ERR_PTR(-EIO); > > > > - INIT_WORK(&ctx->display_reset_wq, drm_underflow_wq); > > ctx->crtc = crtc; > > > > return ctx; > > -- > > 2.17.1 > >