Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4318847ybf; Wed, 4 Mar 2020 01:29:53 -0800 (PST) X-Google-Smtp-Source: ADFU+vsuECxPSfYX2HeqKn0XNynqgoyCn2UUYpQY2UO7SYUEGu8nGp4eK57qmLcuhLI5lOLhGUFz X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr1550833otc.123.1583314193069; Wed, 04 Mar 2020 01:29:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583314193; cv=none; d=google.com; s=arc-20160816; b=M91pcVMtNIErACN6MXeq/v4WzBREBQ6P0dB2pvrcT0YjHl4tN+9YoXHsby2ou6sZYV mpOAkxb1qy2lrlrFuUleY7mg6zt8QhrZBJcAueFX2ExBkGHrhs8E3S6zi+KmOpdkTTEI fAv6BXoVKTU40KgQrAuVJW4Bhmv3sp8eObkXpwjOnYz6/rE87edDp49vuoudMpczNDTD fDQucjPM0vKdKhLdoS/jcfWub9pdH+WR6pM+sAgckDGCJ21N0DHlaTelKJYtqjoStU2q b+1QpRN4C81TZdeqNlsQ3duT2hw/eXPODw3MFD1XReGg5iQU7w3Qg6ggzLuVFQAl7NzI ooJw== 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=PmkN7hwvga6b6nOJQkMBtxiaPHT0wTUKDIjYfaC+JlM=; b=mS0VVU4YzP2QopvxocLBc3n392JrJlwEjU5Rpd7wlJYBwfU+dghFOYdgQ5HPzuUwBz DBWY/1+/y2BYiwElCkXK+u1YBQir4dpCGlxhRdfl8s9tJImoynObHzlXqfn01yq1xiyD Ft2t1V2toZeNxCDrpVZ3JB3oXKw7eS33Dsue9IUxta2a7Anreu7iGHk9f5RsSnqBrUsy 3eDHgGopuxU3pwiuWshIuvOQIdHC3PfvYuweqQpUo7zE1qmJI9t7ZmTqMZlUKXOUQTNH JMOoA21uLmIETs+7JOXzNqxvZclmf1R6fwRd85VKLVzF2COSegVSYN3emapIJxE3aDoV aZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U3q6SAyF; 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 z18si771151oid.82.2020.03.04.01.29.40; Wed, 04 Mar 2020 01:29:53 -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=U3q6SAyF; 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 S2387473AbgCDJ2g (ORCPT + 99 others); Wed, 4 Mar 2020 04:28:36 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44303 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727734AbgCDJ2f (ORCPT ); Wed, 4 Mar 2020 04:28:35 -0500 Received: by mail-wr1-f67.google.com with SMTP id n7so1431742wrt.11 for ; Wed, 04 Mar 2020 01:28:34 -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=PmkN7hwvga6b6nOJQkMBtxiaPHT0wTUKDIjYfaC+JlM=; b=U3q6SAyFqLf4Ao4HllGS0rh74FAspGy70EFJTGwl30cFX4qr7GptUbd6oixMq3aQP5 GfYItarRtIR2dUNC+CKHTGErork+p07vAbyS0+87mVNilGGD9HoiCuLKD853DLbxuEVz wNIPvYGZ+v3I1Y6udMoyUnPB1EAdsyTr2Drf3hc0//ssXuGDNXrCVPji7nkGHjpqYwrA xdNuZRdZ+m3i6ooVq1nWnRXOg2hBwqGBmEmHQYsLAoe4ggZyWdAEF1A8aGoW9KEHjjPj qLhY+b6+8uRTmKcpkvVPO+ZAMt2l22FBoaAmhuWsga1j94RpWy7RJ7Kgb/SJNvuPFbom dJSQ== 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=PmkN7hwvga6b6nOJQkMBtxiaPHT0wTUKDIjYfaC+JlM=; b=Na37cDC+mUIMbzZEgw9OpWDxUwV0QOY1rM3wYDBSvcy9pXW5tYe6yHSnNcJizW7IWY ghSXqrd1VYmjb+z2vW6OI+rCZ1imhvlF7KVQSWcv1NbSgtqy1l2FgAMSEwI0QMlQj3P8 fS38JK47vvLMUAxJIy0V3ZSKh3+LOynESCMKWvNlCZ2JgRqkosY4vA6gGQcxQoUA5X++ /GwIa1qkv9TDrSIpUklPj8Ml27OTbogVw/3DJaizlU6TQQ1YUqrniq/bsIDSaJioT5Ul 2GvhyWRoS4xK+ZjkJOggWRpUMFHSUjfZomNbltv/gnimIQ+b3f1SPj5oxMivMc1AggkK wIjg== X-Gm-Message-State: ANhLgQ32VkmoPw0I5IVNpHcaYOfxUbCy+UwVWlUEM+dihl8sJ5C7hkVT f1svqlH2fNNDuittrFPNtSrmb58aWGqfUzel5mUNYA== X-Received: by 2002:adf:ffc4:: with SMTP id x4mr3245947wrs.306.1583314113705; Wed, 04 Mar 2020 01:28:33 -0800 (PST) MIME-Version: 1.0 References: <20200303163228.52741-1-john.stultz@linaro.org> In-Reply-To: <20200303163228.52741-1-john.stultz@linaro.org> From: Xinliang Liu Date: Wed, 4 Mar 2020 17:28:18 +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 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 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 >