From patchwork Fri Feb 24 12:55:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 9590113 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 09E78601AE for ; Fri, 24 Feb 2017 12:57:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0F8328756 for ; Fri, 24 Feb 2017 12:57:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1FC82875C; Fri, 24 Feb 2017 12:57:52 +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 [65.50.211.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 3FD0528756 for ; Fri, 24 Feb 2017 12:57:52 +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:References: In-Reply-To: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:List-Owner; bh=fjXuuNRzxvWNAZC32guGx4EZPURV7FmLZXd5Xdn8Iac=; b=hJCqv1ZtmTDJ7bRtkaRy863vGG OxeYmadkrRSn+TS5Wk1JYZN5EdEff4uwXPABn13iXfschB8+gXl4saOlzifZFH8tWcrMSdbx//+/I B/MWmLZw7wQ+TlXGDYdV65yTfBzdCHznE+wN6P3HiWxqnWg77kpK7YvcPv3Czx3eT3SdmlfzdghW/ O9EKp0oVbmphi1xQ/IwDUuAdYdqMaUq7hCi2G/k1CD3ULB6jf4iHmtW3uw8vTwp1Nf+eTxVvZF2XC SdtvJsVw4fXXLcte/I2N0DbmN47mO4zk9dmhQGkWpaFZKnrvDhQzOHiW/5kzJ8zK6is6etubpYg64 F9g3a/DA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1chFRW-0007Wy-Fr; Fri, 24 Feb 2017 12:57:50 +0000 Received: from dougal.metanate.com ([90.155.101.14] helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1chFPY-0006Qn-Aa; Fri, 24 Feb 2017 12:55:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=VS7cPabpcn0aumYI2Hn+MlLY/rW6eMfuUwS3DtCH/d4=; b=e5z38al5RZgm7GKk5cuyD0MUur6rl0C/z740d9QEa4WIqsfO/MqysknlPAFYQ8b7pFXy70LVza3qeoO2Dk/26iXwb5MzaYWzD97JZ5N+aijigeq6nfju2YE9T9JghIJyMiz5FsAJfVGTyZktIiLq3wxeHh3SuIB5OS8re0WNGcKTL+wlKWjN7VlWqXfWr9ti8/m70zvom2ZahzC97IlpqbfhoIhsnbdiuFYrblFmJHg1pBWBM3G7c2e5W9HBTNRlyZnawyLbjWosedql+VzqtJEhbtAMVEmp5Ih5dqkUD72aXA1KfoHs4JOviLQpAcxPgFlo0p3bkDkc+3Aisp0CwA==; Received: from brian ([192.168.88.1] helo=leela.metanate.com) by shrek.metanate.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-GCM-SHA256:128) (Exim 4.83_RC2) (envelope-from ) id 1chFP2-0006ml-QQ; Fri, 24 Feb 2017 12:55:16 +0000 From: John Keeping To: Mark Yao Subject: [PATCH v4 20/23] drm/rockchip: vop: test for P{H,V}SYNC Date: Fri, 24 Feb 2017 12:55:03 +0000 Message-Id: <20170224125506.21533-21-john@metanate.com> X-Mailer: git-send-email 2.12.0.rc0.230.gf625d4cdb9.dirty In-Reply-To: <20170224125506.21533-1-john@metanate.com> References: <20170224125506.21533-1-john@metanate.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170224_045548_631500_04E21C06 X-CRM114-Status: UNSURE ( 7.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Sean Paul , Chris Zhong , John Keeping , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When connected to the MIPI DSI output, we need to use N{H,V}SYNC for the internal connection but these flags are meaningless for DSI panels. Switch the test so that we do not set the P{H,V}SYNC bits unless the mode requires it. Signed-off-by: John Keeping Reviewed-by: Mark Yao Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Mark's Reviewed-by Unchanged in v2 --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index c7eba305c488..67aefc6d4e9a 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -933,8 +933,8 @@ static void vop_crtc_enable(struct drm_crtc *crtc) } pin_pol = 0x8; - pin_pol |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 0 : 1; - pin_pol |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? 0 : (1 << 1); + pin_pol |= (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC) ? 1 : 0; + pin_pol |= (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC) ? (1 << 1) : 0; VOP_CTRL_SET(vop, pin_pol, pin_pol); switch (s->output_type) {