From patchwork Wed Feb 19 04:37:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183623 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp34369ile; Tue, 18 Feb 2020 20:38:02 -0800 (PST) X-Received: by 2002:a17:902:5a0c:: with SMTP id q12mr24204357pli.301.1582087081862; Tue, 18 Feb 2020 20:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582087081; cv=none; d=google.com; s=arc-20160816; b=X1N1CmcAXzc/74Z5wHHvZ4Eb+7Ba3jOCJIreKKIpil8WMH7rduoSqwYeC7E7IGMEVc S9IZZRaussYq3wKe1JPrw22EwYRErSt+PbuS+Xe3Sm0E95JcrZ2nKZ5KU+BWVOSY0sF+ YD+iY8BHv2VebCqXZka0eZZlyuyN8HM2pKY1I7SwUKRS4XlHYQrU00uTGaX4l9Vojtyz 3EgUnQkn7rOFDAMFKivM2Tr0+M7lVeI0vzHxsyvIEFiCfcAbJWwA7yHMTUhPMc9zptBT 2DZmv5dzja4h6aMQt+EcZLLVRW7LUJk05FuUVhRWZLaq9IntUFsQWbN8JzxtWbXJmi5f r5dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=wyqz/1IxHBeAeMfC2NP6oUGVH86hCvXiXyWJMK0KcrY=; b=kNCWXabZcdGnTwGZ+6j0/cBU1Qiebr3eoMb/8+q867eS7/nbr1aASiJxWmEButO4aN uPEGyokNcbNpxTo7y/Y3bZ/idZr4Oct4sZZh/R7ATYUWSctnRR96c7c1kIdi3pTPLkmW Uw3IQTmrWl0i/nmFJIEV/WzE7CFE9+eB0nf+WOfat+Hura4n4MRg0XrcxwEddWlcexkV OpJRdcbRwGi+9HEbQbPv+u0RieYRpW3mtAz30sWsZvISRlS58hPA5YwVVod0TDMpXaJq NMQ5rItvNc3HGhDRQPXTQgTqCVUsgBFXBsmlmuEGerq6ZE+2SllJgVBdG7wQ/YLKYQKB vh2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWvoQLwD; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s24sor5518369pjp.21.2020.02.18.20.38.01 for (Google Transport Security); Tue, 18 Feb 2020 20:38:01 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWvoQLwD; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=wyqz/1IxHBeAeMfC2NP6oUGVH86hCvXiXyWJMK0KcrY=; b=cWvoQLwDZ+lWVPPmRYI9nVWMMlZ7CGifcoAQ9rv/5NmgVMEEKrfC28QzEtsdEHbats scchNfc/jSkLlsxp9F/hvAEJ8BOkEhWTlIU/OxPGH+eRhT3Yg7NE/v+XZ9DmYsOWvHof veKmi10YcracWLwofnliFA7o6hD8aNpeU7liqHPPXcwrw5hB6/EU87fCxT+5s8rwNMIy O7f5NvHDDFGkRyjhh4P/hQ7pxCIfVGZ2TLvdA+7M1VqJ4hFJKtwfLIpdSfrS6a6LAd18 hhhzaDkEXDtjl7JcAo3ygC6GGtLkHX/NfkYqbUoCe58X5RqeKQzjM7Di51rGapmY0GLu oriw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wyqz/1IxHBeAeMfC2NP6oUGVH86hCvXiXyWJMK0KcrY=; b=e5UA/MWUBKQCuAmEGwfRnzuGchES3jGz2OKQ3eZ6FEiH8SF+AOxl4NKQWf4h/JOBNE xng12Ri08CK2aZIskMLFCCHDyNkGuLpCQhQPPLmfD+TCsL4vgg0ooe3kZb2N52Eu3dvH BWPXEfa4G+k7iJLfT0hdooEk4pQAoa81o+mIKRn4192O5V6xbVoxuoW7xZ/RUCEWCvr/ KSZBj0cv6Ruo9Kzt0Waa4I9BGHZLszgZjxTNZ0FwM8Crfpzk7Jawur2GT6g0PRxRHONw hmCgbs36G30u+SZUfn/D2dW5fe+/HiKBo74xleP34y9Oggq+K+GZ8isxF31S6IzX3sqN B9bw== X-Gm-Message-State: APjAAAUG8RCjS0BnCVdkvykRS7hCOHq/Xt3xooMFOwx75sjdOvPVsvmK 6N2OJU24HXb8QnqtGzkIh/NL6A/R X-Google-Smtp-Source: APXvYqz9W2eWUB/i10L9fsdaVYRvioFGo1JZXiDNgfJ4E9+wACPDewnsUa1aStp6I6VdrrjgoNcmPQ== X-Received: by 2002:a17:90a:d990:: with SMTP id d16mr6800277pjv.143.1582087081356; Tue, 18 Feb 2020 20:38:01 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id o73sm536053pje.7.2020.02.18.20.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 20:38:00 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Xinliang Liu , Rongrong Zou , Xinwei Kong , Chen Feng , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel Subject: [PATCH] drm: kirin: Revert "Fix for hikey620 display offset problem" Date: Wed, 19 Feb 2020 04:37:58 +0000 Message-Id: <20200219043758.122552-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 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. 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(-) -- 2.17.1 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;