Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp877019pxb; Tue, 1 Feb 2022 12:15:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJypGKp+vOUDMcaatTXWx9UR3yYJu1JA0Cav6CKGpaUSL6I9Syr1uHqK2Y9SKxBT+fXrB2Tm X-Received: by 2002:a63:87c3:: with SMTP id i186mr13319338pge.311.1643746525609; Tue, 01 Feb 2022 12:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643746525; cv=none; d=google.com; s=arc-20160816; b=URDkDAReMUfKoYFW7ME2au02XwyER9S9OJkMJ9KMIg4om4C+Bhqmbiygfux2JF07XX Bb4jCsMc8numvBCuEgjyOrEg12YTLqSwcf55KYmjHc/MkMtSgpekmSlH88svLNgtw/fZ Bnr5RVhOFvcW9Jlp5kVoOXo+p1WNmQbSKIpKoRhOChSk/+t5LDtcdMAYmz/1tVffXz6l PF8Tkh+jZwNOqCPjZcfXoAZGHrOgAQwSwXBGk898xSffoc7pQGJ5XoE47uYcKJc33KWv T50aGXpkpkfo2eABuhMd8Zf5LU5htzaVeKEFD0bY1NUYSDA4SRAFrolaff6h9cvXILxz ps9Q== 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=Qc45+SOWiHQsSwqJWHKd4NUWcMBcTy0RmkvrlEWuGrE=; b=jZcYTUOEPfEmjfsI1QwRvMEW5qirviiQd3khAPvWQfa/fCn83ra1l5dRa8U1EnfyLU 04A5bjobasCSS0gIyuM0/lasaFja/aPGRpzKK6IZXS2LwMJJTgb+DJH26HqsGAjaM1qq rjoTXUpRczf8T1ddkt6TyekQvI18N3pgbsye4U7LFjUBNzZ+WESTzR/IFS9Ap//RgIf2 46Q/v9CQUA0jw8CY+r4rEnhwQ6SZBD5YHgWymmS+vL4z0gBeWXFmFmvV9u419GuiX4dW T1B6dBLzU7kEp8scSSAoD6BU5NICLaV5/sHfgrBEpGNDLWWUbAIgAiuEszMPzBXwK8Gy 4NbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=YE8HqG56; 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 l69si13781902pgd.729.2022.02.01.12.15.12; Tue, 01 Feb 2022 12:15:25 -0800 (PST) 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=@goldelico.com header.s=strato-dkim-0002 header.b=YE8HqG56; 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 S1377810AbiAaM1o (ORCPT + 99 others); Mon, 31 Jan 2022 07:27:44 -0500 Received: from mo4-p04-ob.smtp.rzone.de ([85.215.255.122]:34225 "EHLO mo4-p04-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377151AbiAaM1d (ORCPT ); Mon, 31 Jan 2022 07:27:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1643632023; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=Qc45+SOWiHQsSwqJWHKd4NUWcMBcTy0RmkvrlEWuGrE=; b=YE8HqG56/6mJ9y18ecX3+QUZyl3GTRfWYnRJeiy1z5i8aoA6eSLoqGqezqSR+GrjXl /QJTE+oXejAhIL0u0qOy3Vn0AoEpAcQ/3aMTE3TpJV3cAfli6jrkUNtd3omhYaYD6C+U tkNM5+R6gYQTXCDMLL7SXhsAoSjpA9NFR4VxHocO2PsHQsUxZCoW/+/cE0v9cVz1thSt f1qZIMyKivlg6m11vGII388jNO7/WDhA6QkbAyHggWIrqz+0XtKI7FGSPfkSicL8Dcyg GqJ3x1y40X096o84irq0gZE03AM/JKsP4+uA5JreUQNL4G/N1cKXOI05ci32udY/drlc A1iw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o12DNOsPj0lByOdcK1L0" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 47.38.0 DYNA|AUTH) with ESMTPSA id j5fc80y0VCR2u8o (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 31 Jan 2022 13:27:02 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Mark Rutland , Thomas Bogendoerfer , "H. Nikolaus Schaller" , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , Paul Boddie , Andrzej Hajda , Kieran Bingham Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jonas Karlman , dri-devel@lists.freedesktop.org Subject: [PATCH v12 6/9] dw-hdmi/ingenic-dw-hdmi: repair interworking with hdmi-connector Date: Mon, 31 Jan 2022 13:26:52 +0100 Message-Id: X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 7cd70656d1285b ("drm/bridge: display-connector: implement bus fmts callbacks") introduced a new mechanism to negotiate bus formats between hdmi connector and the synopsys hdmi driver inside the jz4780. By this, the dw-hdmi is no longer the only bridge and sets up a list of formats in dw_hdmi_bridge_atomic_get_output_bus_fmts(). This includes MEDIA_BUS_FMT_UYVY8_1X16 which is chosen for the jz4780 but only produces a black screen. This fix is based on the observation that max_bpc = 0 when running this function while info->bpc = 8. Since the formats checks before this always test for max_bpc >= info->pbc indirectly my assumption is that we must check it here as well. Adding the proposed patch makes the CI20/jz4780 panel work again in MEDIA_BUS_FMT_RGB888_1X24 mode. Fixes: 7cd70656d1285b ("drm/bridge: display-connector: implement bus fmts callbacks") Signed-off-by: H. Nikolaus Schaller --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 52e7cd2e020d3..34703a15ee4ff 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2620,10 +2620,10 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge, output_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30; } - if (info->color_formats & DRM_COLOR_FORMAT_YCRCB422) + if (max_bpc >= info->bpc && info->color_formats & DRM_COLOR_FORMAT_YCRCB422) output_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16; - if (info->color_formats & DRM_COLOR_FORMAT_YCRCB444) + if (max_bpc >= info->bpc && info->color_formats & DRM_COLOR_FORMAT_YCRCB444) output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24; /* Default 8bit RGB fallback */ -- 2.33.0