Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2427821imj; Mon, 18 Feb 2019 05:56:36 -0800 (PST) X-Google-Smtp-Source: AHgI3IYyHppSCIX8obanOxzO1fvkFSLkbZ7imqtJ4FwpdaxLJ7oLGdCxl4EA6jNugWwEY5IeMIgY X-Received: by 2002:a62:f5c8:: with SMTP id b69mr18911783pfm.128.1550498196113; Mon, 18 Feb 2019 05:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550498196; cv=none; d=google.com; s=arc-20160816; b=Ovk4wlPHLd9efAdYPZCxVakw9uLuBNUl7PnlcLyviw16/GrEt6tANHOQjzq9dynI4u WnD22DtzBcTnVcT8kiWTPMoY9302xE8nydfjGBWS155Y7mtlvP7LYOGK+6tBe2XLIRfm qTxpPGh5Ige+awuWJWxEIRSAGrCZ47FQyez9wStNStinjp3hQqLrvqwPEu9xvfYF/Ka4 V0Z4MDCFeeJ0UD4/uyWzWHjU3SJ6hB7q6rZfwssumn9wNzrLNFo6ao4jt2FDBSU8dBBn leynrRZKiw1RS2Ip+bWvqQRJT4Q1bkyRRL6xVV0QCoZstbssb6Zcaf0eohg0sr+qIsrr BQbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=u67L0eu8876jYfdK/sFw5yahEDnjK1cNPcQI2ROmajk=; b=ZNTetYotEp+AzWQwWUHAfgSJKQrd42AsX5lkABrw4rBb3L37liKdEcsd7KD8N6cXsu dIBK0NIrmLTo33+umewl3m7k4sqg4TOfiwuW4FbBQ6UqYbCL9UQ9r6IZiudLo1f3bEIz +23gECYHbdjOXz1rGlJ/18iRFkxw25akEuhxoaAv9Fdr5TfEKzkq3P5i/z5SGXhD+gbC W9ilVmtUHbSpsLEYNJQDzG4e7GebXq55GJM6aJLqNV3Hs4hU1ZlDExi5f48u6RuW6hnv HdTKwH0pMiCbGsQjNFjBUkCP+ukQiIV7nKa15Mm4mnG/rW+21ct4F8xbBDL+RfeSun7K p4uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k2fVR1Q8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si13865295pfg.280.2019.02.18.05.56.20; Mon, 18 Feb 2019 05:56:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k2fVR1Q8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387526AbfBRNz0 (ORCPT + 99 others); Mon, 18 Feb 2019 08:55:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:35438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387519AbfBRNzY (ORCPT ); Mon, 18 Feb 2019 08:55:24 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E82D2077B; Mon, 18 Feb 2019 13:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550498123; bh=HvywHUCZYG/4LJ+naJoD/GvaSV3oAH2GwBd2eB9WbmM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k2fVR1Q8K9kfmNszK0d6p0KtidUgGlXevt4Eiy66hDAXQHC1AmCpAHsFh/BIcb9Jm 3Rcmf3eImsjM04L/yRFiDipZGwzQXDH9TxtCO0BMfFYLrvqpaJ7yQtx23ikGCa5z4O N6SX4mqyFUJ0S1Hyp6AvWwUhGjDPdkbdfkLQ5Mgk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Andrzej Hajda , Sasha Levin Subject: [PATCH 4.14 31/62] drm/bridge: tc358767: fix output H/V syncs Date: Mon, 18 Feb 2019 14:43:37 +0100 Message-Id: <20190218133508.628978409@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133505.801423074@linuxfoundation.org> References: <20190218133505.801423074@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 7923e09c7a766e2d58de7fc395bb84c18e5bc625 ] The H and V syncs of the DP output are always set to active high. This patch fixes the syncs by configuring them according to the videomode. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-7-tomi.valkeinen@ti.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/tc358767.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 792a2548d3bb..6eebd8ad0c52 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -96,6 +96,8 @@ #define DP0_STARTVAL 0x064c #define DP0_ACTIVEVAL 0x0650 #define DP0_SYNCVAL 0x0654 +#define SYNCVAL_HS_POL_ACTIVE_LOW (1 << 15) +#define SYNCVAL_VS_POL_ACTIVE_LOW (1 << 31) #define DP0_MISC 0x0658 #define TU_SIZE_RECOMMENDED (63) /* LSCLK cycles per TU */ #define BPC_6 (0 << 5) @@ -724,7 +726,9 @@ static int tc_set_video_mode(struct tc_data *tc, struct drm_display_mode *mode) tc_write(DP0_ACTIVEVAL, (mode->vdisplay << 16) | (mode->hdisplay)); - tc_write(DP0_SYNCVAL, (vsync_len << 16) | (hsync_len << 0)); + tc_write(DP0_SYNCVAL, (vsync_len << 16) | (hsync_len << 0) | + ((mode->flags & DRM_MODE_FLAG_NHSYNC) ? SYNCVAL_HS_POL_ACTIVE_LOW : 0) | + ((mode->flags & DRM_MODE_FLAG_NVSYNC) ? SYNCVAL_VS_POL_ACTIVE_LOW : 0)); tc_write(DPIPXLFMT, VS_POL_ACTIVE_LOW | HS_POL_ACTIVE_LOW | DE_POL_ACTIVE_HIGH | SUB_CFG_TYPE_CONFIG1 | DPI_BPP_RGB888); -- 2.19.1