Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp90377pxb; Wed, 22 Sep 2021 16:50:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz2oEfupQ0oGeGQCADIyaRy2YY9dQSOPAuRpX8bMsYTxzilXcQl3nvtWt+/UP6RQLnBlpM X-Received: by 2002:a02:c7d0:: with SMTP id s16mr1414203jao.135.1632354601195; Wed, 22 Sep 2021 16:50:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632354601; cv=none; d=google.com; s=arc-20160816; b=035tb2KnaWAdnvtPYYBCPWmJQKc8TclDSZkk0EBZumEra0G6JI2f6hpP7RfWL3z3Gl UFCUTbAxTSqCzot4YkJs7eMN8MZIT7opLo6hVEZVH9b1lecbb4AT9K4zzld/W1fOI74G 6K/DRC5SoH0v1LcHUWHhvbCqNKzdNbDgF3OxoLOC4gfORAwJW0SyEAQmKLSQAe3MrouK 36JnhsUSJ0yBWR+nMS/iXewE7+FZQ3GV2AoU9ljH4L8wmW4LXfwYI6xxqeIlcL152CX6 Bibg3RFiledBNSatMBQjvFtIJERs4md6ce8LYUl4p+5oY0xTmsN7PS1c+M+/HH+7eaie QI5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bYaZdeLO4JC/L3A/SQLv0X0p1bD9f6oJ3A9p2Sx3sNg=; b=ItnCTIZy8rP/SYeXvA4n3vbVZGBuR9nfuM/3wDFqISm3Ye1jdOre+Gv6Av4QZUYYO5 74DrdQIbLii55MuEhT9DNXkPqhhx6x24hoaMwGGeg//SOHAi4bmBJ3Wl01wNmrE3z7Ty Lg9gB+7V7GQha2gSsOoEUaN4nTbwVEgQQjfVojICCJOMXq6W+G0xAygGRucQO7HWFy17 zgfuElLo6thUlzp+T7naEhRA8UkCFhMo9gl9cInPFFIt3LAhhBqAeTkCMKT6vj29JIV1 xnJ0Dqhurimf9Oux1ONFxay3MDwLLijT4pjrdWD9F2aFjBJvPDtEM8G9MNEkA88aXUa8 wvew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vWQUBbHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c25si4112451ioz.73.2021.09.22.16.49.46; Wed, 22 Sep 2021 16:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=vWQUBbHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238558AbhIVXtI (ORCPT + 99 others); Wed, 22 Sep 2021 19:49:08 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:33100 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238535AbhIVXtE (ORCPT ); Wed, 22 Sep 2021 19:49:04 -0400 Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F38EB1544; Thu, 23 Sep 2021 01:47:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632354452; bh=CJER95kuqVQg+IWr5D3fMe8U43dXHsjjYXDswSJYd88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vWQUBbHCX+o8KFwzIGhNz1YT7X73SHO6cBbtlSbH5dXZrV9XPDuWskcbpk0MuGzni Omklkc4SIlReS/oj7e0XYUQrc7yTjvr1fyqgYC66WJ89xX6/6NrYTdJ6OHVqgTkNbP ZqkDVMKg98taoCYa38mJY+H30jCHQ4I4enuMilyk= From: Kieran Bingham To: linux-renesas-soc@vger.kernel.org, Laurent Pinchart Cc: Kieran Bingham , Kieran Bingham , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS FOR RENESAS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/6] drm: rcar-du: Only initialise TVM_TVSYNC mode when supported Date: Thu, 23 Sep 2021 00:47:23 +0100 Message-Id: <20210922234726.3337265-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210922234726.3337265-1-kieran.bingham@ideasonboard.com> References: <20210922234726.3337265-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The R-Car DU as found on the D3, E3, and V3U do not have support for an external synchronisation method. In these cases, the dsysr cached register should not be initialised in DSYSR_TVM_TVSYNC, but instead should be left clear to configure as DSYSR_TVM_MASTER by default. Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- v2: - Remove parenthesis drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index ea7e39d03545..a0f837e8243a 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -1243,7 +1243,10 @@ int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int swindex, rcrtc->group = rgrp; rcrtc->mmio_offset = mmio_offsets[hwindex]; rcrtc->index = hwindex; - rcrtc->dsysr = (rcrtc->index % 2 ? 0 : DSYSR_DRES) | DSYSR_TVM_TVSYNC; + rcrtc->dsysr = rcrtc->index % 2 ? 0 : DSYSR_DRES; + + if (rcar_du_has(rcdu, RCAR_DU_FEATURE_TVM_SYNC)) + rcrtc->dsysr |= DSYSR_TVM_TVSYNC; if (rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE)) primary = &rcrtc->vsp->planes[rcrtc->vsp_pipe].plane; -- 2.30.2