Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp950602ybm; Wed, 27 May 2020 12:00:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK8Dx6/q5lnXP1Eu3CUMz4DtyWr9tTq9vEq4bQ1c35zikxBFFwLxQRjlB7AnM+GKb60hbc X-Received: by 2002:a50:9e6a:: with SMTP id z97mr24276400ede.375.1590606015697; Wed, 27 May 2020 12:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590606015; cv=none; d=google.com; s=arc-20160816; b=hgiwDjOrl7/ZT+RiKi4JwYaRh74JmzdQ4o3pse3VGK/GJ6p/oQD5Dkvpf+CYZZvhLZ hHLQ0YRON0DGMpQ76bXde+giSafE1kUkNiz5s3PSscajaeXPJCos5vIMIOOML1Xqcm7s AtVBNu+KCHC9SboXYGj8hsJcaRoqScfrgRRyO+Cr6jmaYsbk3gbJ9SkdVb2dA5ksHyJN d0W3lP3KFK00o7/sNGlYLnY4SUK8ofzamztyg4lsGbLb2TEOVj/CWuf5eo1wadQDSRSb 3MExMA4i6dm04XA0EiWFr7IOq8tdh5gzt1Lf0VaHpUb5/wtqNVVWbA6H5AAyOTSjTbZ6 SKHA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=lkqM2xbnr6859I47DszBEIGnHB6r75iZBgHsyq+PyPY=; b=IIvPQ+c6njagCi6yvAMm64UvOkGi/A0Mk9n20FpQ+I4O+soiOUfNG8KU5IU2VICKjd nL5Emqt5e2OeBCrqOe+yFvVMJf5v6HyI+1deOMAP5Gip8GR+gmN2RWOtqKcFzId9j64Q ABQNTmIJkawhsFRU1VfHHjrcanZTSBbkpOL7sfF5ltw4OU7vbGYFKfw9OWyVE1lPqGqB NNG+Jwb4hhondQ232kRA9CYsS//5Z1Bz0ESt7WNp0t0ohgiWq1v3dc6icsN+6X/7nq/o 19CcNPlS4G4Pa93zyEmcWs6EBlAuBG7U3SD6s37m8WE09vWZPuczz2qsb3CPyAd2CEZI 4Scw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=rDhN1+Pn; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=cHWsanhs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w20si2433978ejn.439.2020.05.27.11.59.53; Wed, 27 May 2020 12:00:15 -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 header.i=@cerno.tech header.s=fm2 header.b=rDhN1+Pn; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=cHWsanhs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730584AbgE0Pum (ORCPT + 98 others); Wed, 27 May 2020 11:50:42 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:54737 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbgE0PuU (ORCPT ); Wed, 27 May 2020 11:50:20 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id A3C39582078; Wed, 27 May 2020 11:50:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 27 May 2020 11:50:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=lkqM2xbnr6859 I47DszBEIGnHB6r75iZBgHsyq+PyPY=; b=rDhN1+Pn5L6vCIlmXcelnWvZM6Cz5 VxtVhu9RxVX+0c6Z814e0eVAxTcR7qDzpARO6OOl89GgtHSqYpBF2oyft41WVowI AuKpwLa+KKFa+FbbuMmifpv1S6jW78SBOMaagmQ59oS8fAC6KyvJdlH4JkNgYP9K 3g6dwKhTf8e0Afiz67NZvD68sw1uQfK6IJsLgra5zBhJ95776rkkOfpkWFjyMpjl /qvYc0ZuUW+tXLGAyL7ZBoGZwTH/C5umbFF/E5/Ms6hmwB4CB6qhC0a2t3WHcPrT na98ma11NTKvmfURYCucOrPbugUKCp/4xt6FTqJ1QtUi1bZQytVhEmV7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=lkqM2xbnr6859I47DszBEIGnHB6r75iZBgHsyq+PyPY=; b=cHWsanhs 7z2xdCjher/Bu9/eoNfhCB3AQZbBrYhHHadU0CoalxJ4OlYE3SBFqPJK0v8zLaak BfQguebsr94K1YH0YrwZd4Xxv3I113FrOv0PPZWpqRjfQyvscgWwtyZc4h0689u7 +kKCRdiK3oicPs4FZo4su4qynqRmaG6Hxr7Vvoll0KNSQfgyF3ZS4oOzqiiUmGDx RR8isACpdjrA+ENpU8y3MekDryoIxYCHm5iURce1cRjQMqzdpzpvdFnQoMa8ueak ipYRWpjeqd633/2hOurdQ3yt7+GDRS8pEZyFv+icN1GbgoDUNNFfVIP4ceTvo4WM WXRuC+RXulnAQA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepvddune curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 58A2D3061856; Wed, 27 May 2020 11:50:19 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell , Maxime Ripard Subject: [PATCH v3 039/105] drm/vc4: crtc: Disable color management for HVS5 Date: Wed, 27 May 2020 17:48:09 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The HVS5 uses different color matrices. Disable color management support for now. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 8a3fe4d39847..9ec345254808 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -441,7 +441,7 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc) HVS_WRITE(SCALER_DISPBKGNDX(vc4_state->assigned_channel), SCALER_DISPBKGND_AUTOHS | - SCALER_DISPBKGND_GAMMA | + ((!vc4->hvs->hvs5) ? SCALER_DISPBKGND_GAMMA : 0) | (interlace ? SCALER_DISPBKGND_INTERLACE : 0)); /* Reload the LUT, since the SRAMs would have been disabled if @@ -1157,6 +1157,7 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) { struct platform_device *pdev = to_platform_device(dev); struct drm_device *drm = dev_get_drvdata(master); + struct vc4_dev *vc4 = to_vc4_dev(drm); const struct vc4_crtc_data *pv_data; struct vc4_crtc *vc4_crtc; struct drm_crtc *crtc; @@ -1198,12 +1199,16 @@ static int vc4_crtc_bind(struct device *dev, struct device *master, void *data) drm_crtc_init_with_planes(drm, crtc, primary_plane, NULL, &vc4_crtc_funcs, NULL); drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs); - drm_mode_crtc_set_gamma_size(crtc, ARRAY_SIZE(vc4_crtc->lut_r)); - /* We support CTM, but only for one CRTC at a time. It's therefore - * implemented as private driver state in vc4_kms, not here. - */ - drm_crtc_enable_color_mgmt(crtc, 0, true, crtc->gamma_size); + if (!vc4->hvs->hvs5) { + drm_mode_crtc_set_gamma_size(crtc, ARRAY_SIZE(vc4_crtc->lut_r)); + + /* We support CTM, but only for one CRTC at a + * time. It's therefore implemented as private driver + * state in vc4_kms, not here. + */ + drm_crtc_enable_color_mgmt(crtc, 0, true, crtc->gamma_size); + } CRTC_WRITE(PV_INTEN, 0); CRTC_WRITE(PV_INTSTAT, PV_INT_VFP_START); -- git-series 0.9.1