From patchwork Mon Dec 2 13:47:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11269149 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C77C139A for ; Mon, 2 Dec 2019 13:47:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 450282084F for ; Mon, 2 Dec 2019 13:47:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 450282084F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 28FE06E1E8; Mon, 2 Dec 2019 13:47:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 22C296E1E8 for ; Mon, 2 Dec 2019 13:47:24 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id v201so26966286lfa.11 for ; Mon, 02 Dec 2019 05:47:24 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=A0Ch9GdyhFeE+gfd6Z5DWf7KGKT8iNUVse8tB117Zm4=; b=T/QUwbbD9ZL2M7SK1FCy0MSH0lz9a3DY14q7adxSLnftfBd2PyusrBW2/vuGyQgq+1 PgEZCNxQp0HAxCffDAmRaC86odRkHSyvA6FyOYt28b6s+ZjDzvHiC1cX+GH2odCwDZ+F b2rQNhGQhrQHWDINIcXnlgyIG8DVVDqqp/HCP8GcyxcCseU12zJkcICKH2yjdzLNXEt1 Rqd8Wfk6eTAncU5a/B29QSSSGCM4qnElykCZNMeg4i9NKlABj1Tur/3aIhy7hpsbG3Bs jpnPH3Ff5fvhfI1+widgVt8am3aHQ1Upi9d9B3IZGBBJALNP0A03xyek3uVUlzlXfMu7 C42Q== X-Gm-Message-State: APjAAAUMkWUj3m6GoX4yhOsos6np98uEnzvguElyV6UNVZqKR6fRuzsp eNv4ZEVTllXPDqPSww+Yh9WP06G26Y979g== X-Google-Smtp-Source: APXvYqy2ksseeVDtg2mfDRQsT5XPfHoavrEqU0v8PMf5ffOQBVXHHD4yI3j7KerJMjUbpfuclf2gXA== X-Received: by 2002:a19:645b:: with SMTP id b27mr32647592lfj.117.1575294442357; Mon, 02 Dec 2019 05:47:22 -0800 (PST) Received: from localhost.bredbandsbolaget (c-21cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.33]) by smtp.gmail.com with ESMTPSA id f13sm5904912ljp.104.2019.12.02.05.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 05:47:21 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH] drm/mcde: Fix vertical resolution bugs Date: Mon, 2 Dec 2019 14:47:17 +0100 Message-Id: <20191202134717.30760-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A0Ch9GdyhFeE+gfd6Z5DWf7KGKT8iNUVse8tB117Zm4=; b=XCas24bn2q3q7q/Ck8Vw55vrahamI50QxSIfJquu9Qq9RlJHjHSY1fEMzst5h45z7u t3ea8hn2UdCumfw4fmUjiBcn977whMTxKNOrgpzlmdN354Vgd+vdblSJjEZG6HoJXoJm ZEoPrqhnPTn3QpT/uyd6X1atqIIX5v8h9aNawvDyVZjjpB8xEJNzzvzkdg99rLoz3sla /R7dyxP5m7NOZvCe0c1c56hPCrvQe+uY8K2jMxEcvSQUYMVC3LGtmi1eyRciMFXLeVDy lwEHFFjhLx7WwJo4MDhEADeVyb4+4JwVmq/7UnocmSIlPo/tnHMNj/ukTiHy2UDWR43v /Xpg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephan Gerhold , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In video mode the VACT (video active) and VSA (vertical sync active) got swapped. Fix it up. The result was compared to a register dump from the Golden (Samsung GT-I8190). Cc: Stephan Gerhold Signed-off-by: Linus Walleij Reported-by: kbuild test robot Reported-by: kbuild test robot --- drivers/gpu/drm/mcde/mcde_dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 21cee4d9d2fd..8f6ce1557e3f 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -431,16 +431,16 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d, /* Recovery mode 1 */ val |= 1 << DSI_VID_MAIN_CTL_RECOVERY_MODE_SHIFT; /* All other fields zero */ - writel(val, d->regs + DSI_VID_MAIN_CTL); + writel_dsi(d, val, DSI_VID_MAIN_CTL); /* Vertical frame parameters are pretty straight-forward */ - val = mode->vdisplay << DSI_VID_VSIZE_VSA_LENGTH_SHIFT; + val = mode->vdisplay << DSI_VID_VSIZE_VACT_LENGTH_SHIFT; /* vertical front porch */ val |= (mode->vsync_start - mode->vdisplay) << DSI_VID_VSIZE_VFP_LENGTH_SHIFT; /* vertical sync active */ val |= (mode->vsync_end - mode->vsync_start) - << DSI_VID_VSIZE_VACT_LENGTH_SHIFT; + << DSI_VID_VSIZE_VSA_LENGTH_SHIFT; /* vertical back porch */ val |= (mode->vtotal - mode->vsync_end) << DSI_VID_VSIZE_VBP_LENGTH_SHIFT;