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: 180606 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5253877ile; Mon, 2 Dec 2019 05:47:28 -0800 (PST) X-Google-Smtp-Source: APXvYqyz0u8OoBIpPhs1wHeDk6B1l1ii6IdeWReMPEfcPA4ODJuS3LHa6qFoUqIDwBJyyTvAZO84 X-Received: by 2002:a63:f551:: with SMTP id e17mr6818636pgk.162.1575294448042; Mon, 02 Dec 2019 05:47:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575294448; cv=none; d=google.com; s=arc-20160816; b=PDY/SvOAgGJwMMmxpHJ3su3Ln/fo80q3+HkQc8br+apU6+/Z9+BmDPEEYJnA5rDyUd kE6XEQ6fAT8OR78+UFd6LDee8n1/kNv6LQt5B6Y9X5sXy9no+VtcmfmbF4K9GE4B1exb QqHHeXoXlAwBOyzf9qPGBggpfbinyX+IXsgO0uamBEQFoaSTf9cTTBT8jwtNnbylQ1mV BZXq8AeB7SxgKkolpX1TcQErmSU7y0pDu9PBB2A7n5HVQ4HUttaX96Hh5ua85M/Wqk+t zlnYqGoYkPHdCB26C947EzUYqmYamTv3I8J1mVbK88m/vHSiIB/mLYmvfm477z+0sjm+ 840Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=cjnhcbHNKbgUcZ6GF1dAmWMq5/cEhSOZJRUuPS2+D0w=; b=EkAAO6Z4GsZdvlkBtAzD+laKKX9u5G5CRia582UeqmMBsq8NP1UywJ8HrzakGua3hX KcR5eF9g4xKJnGnNnRlC+Gj38/hzJ3hwMZCTCGVGWRFBWB/1JHOaBRhN8gnCPNpRtvW0 SpCYbNbumCEdla5haW+UyT/yCw7QC7tuCWtGnaoW8NsvhCXoh/Knst7wVyfvB1G4LGDD VYwFH9rA2Tw0ewpYFMo42RrSWjQZw6xSrsp57OR6GqQj31cnVPdJyBW/nveumIB24iba MKixqR8SrAGP/v71pBGIoGVhsIonyfSKcTAew5mxIv+NLGrvcAomhDJFq6OWUkkcoFkw fFRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id s11si1274870plq.225.2019.12.02.05.47.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Dec 2019 05:47:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.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-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;