From patchwork Thu Feb 15 17:54:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 10222927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CD53D601D7 for ; Thu, 15 Feb 2018 17:56:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDC5B29143 for ; Thu, 15 Feb 2018 17:56:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B00E72949F; Thu, 15 Feb 2018 17:56:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6079529143 for ; Thu, 15 Feb 2018 17:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=gOx/ugzuezpRtcluGjlci/whOhbRUbKnPkrojKQ1Cb0=; b=ZKe Dr1Ost0g2RMFdmFkv5S2B8YX/DBBWblnTVyxWCkJL/U7hqVq2ExWLJwRocKEOim1HGurEWWU2VnRS 8IGJwneqyidoCjACwYnCdRjQly9E0MaqtSYJ9/DLsDa+AurSfSmVPWJWe2q59AM3fyOtSBkd8B04y Nph1PFs837INgIbvU0tUBt/Q9amDClBjL79sT1eAmKX/aOd2dwJO5ProkrlwHbbRswcJ9ak8VCxEf cAuQKLAP1YWjeVuKnKVbgangFVTGa7sFUglI1hX1vdRRg3sYXahzpF1+feWGR67lKFZChft1x8ELi FByIsAfctUJR+Z6snsRuyc5blsgo+6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1emNlC-0004V1-Aa; Thu, 15 Feb 2018 17:55:54 +0000 Received: from mail.micronovasrl.com ([212.103.203.10]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1emNl7-0004QW-2B for linux-arm-kernel@lists.infradead.org; Thu, 15 Feb 2018 17:55:50 +0000 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 69C90B00D31 for ; Thu, 15 Feb 2018 18:55:36 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=x-mailer:message-id:date:date:subject:subject:to:from:from; s=dkim; t=1518717335; x=1519581336; bh=RnVex9bvf3erfwAt5N5TaKUw /Jn7uSJ2iRT/rGDsXe4=; b=fomH4/9NLydN8xIZK4njAK3GCnkNuRbCCp/qKxlN OxBo43eAm/ryPwAglhaljaqENXw685WRwh2MGdWGLKdw5tS8po1vltkXShhtVtHO b145CEl4trupMKnlKhLxRXZd7cDzxCsuNFF5cmkE37GJN7GGBq3gLIjCD8BOd2UY trk= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4ndw2C_TOc0a for ; Thu, 15 Feb 2018 18:55:35 +0100 (CET) Received: from localhost.localdomain (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id B2C0AB001D9; Thu, 15 Feb 2018 18:55:34 +0100 (CET) From: Giulio Benetti To: Maxime Ripard Subject: [PATCH] drm/sun4i: fix HSYNC and VSYNC polarity Date: Thu, 15 Feb 2018 18:54:48 +0100 Message-Id: <1518717288-123578-1-git-send-email-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180215_095549_320465_587BC2F6 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen-Yu Tsai , Giulio Benetti , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Differently from other Lcd signals, HSYNC and VSYNC signals result inverted if their bits are cleared to 0. Invert their settings of IO_POL register. Signed-off-by: Giulio Benetti --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 3c15cf2..aaf911a 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -389,10 +389,10 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, SUN4I_TCON0_BASIC3_H_SYNC(hsync)); /* Setup the polarity of the various signals */ - if (!(mode->flags & DRM_MODE_FLAG_PHSYNC)) + if (mode->flags & DRM_MODE_FLAG_PHSYNC) val |= SUN4I_TCON0_IO_POL_HSYNC_POSITIVE; - if (!(mode->flags & DRM_MODE_FLAG_PVSYNC)) + if (mode->flags & DRM_MODE_FLAG_PVSYNC) val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE; regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG,