From patchwork Mon Oct 29 11:47:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 149657 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4026213ljp; Mon, 29 Oct 2018 04:47:36 -0700 (PDT) X-Google-Smtp-Source: AJdET5fFIa3e7AeM1c3ZGNBuOMUCRYOKTyi5ZJKOK5Hz4QiQBMw5WsTSn8yubtCfOV7G/xKpm4Qn X-Received: by 2002:a63:ed09:: with SMTP id d9-v6mr13284009pgi.305.1540813655997; Mon, 29 Oct 2018 04:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540813655; cv=none; d=google.com; s=arc-20160816; b=AUrsBBbvwsJCihjfUozw+0yR7IkTwkzRgtndpDv2hOYnJcs42zZUyJh7df1C5j6u6c q44ldHFA9F+NcwoJMrv+JKl96TeB1+zBbDII/YnEglDWEOzsnf1G2UYELrpHMx+ewQCx g097ICSC9aFcHLH1/XiY1Pw4aJAHk3Nd8kr5hmGe9to7jDrVAzJqW+M+hLunKOGsq8AA ERXbFPRbXydESViQrmKIX8lcG007mudlpGhlOpELJjblTlfEHrc9rnRReW7I5RreFvJt L4qk7MssvKsqQSPRlFONvB7Cp9DyhjYGNrJ59IySytf4v3PTzoRbxqxPIci5MXfGrIKN Pk6A== 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:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=8vEaq9RWu3kKk06/5ngME5O2xRel9/9gjkinJiIkcUI=; b=ECXhwl4zr5FObdfgzRSHQOmzTANRAuw0fsoDK/7kq21MqqtpN/fFw0u0y/MEMNgJO/ WibmRwDTHOZRepvWIprXLc9xjmK3O1McD4ekB2tBrX8m8yQ+JUuj3aD7U36vdo55DQsi iwZIhYpe/O4Dj1w0ernme42YpF0om4FAodzLWhYNaAS7l2tIWGCac1yvFTHPN4Gx+SsC +yspfc1gKgs5Mvz5YZGnkcwJ015hPA08iNDqpuJ4bCo6+USewVxvLw/S0TmqSCBefnAD 9ziYqISmrpoJ6OW0sDR9sYBc6cCQil1g/84E3IIRkxg5ZGt4rsIghMOeGQnS7YHq8BZ5 Sj7Q== 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 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id ca17-v6si20652511plb.406.2018.10.29.04.47.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 04:47:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FB7C89E06; Mon, 29 Oct 2018 11:47:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 885D189E05 for ; Mon, 29 Oct 2018 11:47:24 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9TBlLEe095249; Mon, 29 Oct 2018 06:47:21 -0500 Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id w9TBlLI6013826 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 29 Oct 2018 06:47:21 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 29 Oct 2018 06:47:19 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 29 Oct 2018 06:47:19 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9TBl70J007729; Mon, 29 Oct 2018 06:47:17 -0500 From: Tomi Valkeinen To: Archit Taneja , Andrzej Hajda , , Andrey Gusakov Subject: [PATCH 6/7] drm/bridge: tc358767: fix output H/V syncs Date: Mon, 29 Oct 2018 13:47:00 +0200 Message-ID: <20181029114701.26409-7-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181029114701.26409-1-tomi.valkeinen@ti.com> References: <20181029114701.26409-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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: Tomi Valkeinen , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- drivers/gpu/drm/bridge/tc358767.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index b026b5ef7378..be013bd7b30b 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -726,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) ? (1 << 15) : 0) | + ((mode->flags & DRM_MODE_FLAG_NVSYNC) ? (1 << 31) : 0)); tc_write(DPIPXLFMT, VS_POL_ACTIVE_LOW | HS_POL_ACTIVE_LOW | DE_POL_ACTIVE_HIGH | SUB_CFG_TYPE_CONFIG1 | DPI_BPP_RGB888);