Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3117417pxm; Mon, 28 Feb 2022 12:23:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyk0DUAsDVG0B9WQeUidwo68Dj0+vs7dwEpWGKbr2AnBG9jyKNb9eorhS80gEp5w1ZqUoc6 X-Received: by 2002:a17:902:bd85:b0:14d:c29b:d534 with SMTP id q5-20020a170902bd8500b0014dc29bd534mr22217917pls.99.1646079792902; Mon, 28 Feb 2022 12:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079792; cv=none; d=google.com; s=arc-20160816; b=H9gxqaIbtlkev2KRnOeTPa9UBE/ClTPgsYFiOPEEz6xVpYug45MRMzVnB8enCn/e6o sN4V1sWpxN358ladEqmhKPSxQ5w9pvbwkrhOoAO7yNv2JqcbXMQ3jnQWLgMm8IyuHoM3 7KmAd0S/X+VqDt1VW4ZSMQnZT+yJdz/esVbmxAYTD3+/dI0CVrCAPgIB7bjN/8hhKhD1 vB4hQdMRJiNpJVmxkF+uTqvtwVRzZHUqfr/PaXrKHiLcmQoyZlGPrx1nAi6wQ9CEBlOT d/iZkaxRudxtGSDXtLwBKIW4h/jf8KYBDbjk9zKNZARFbfBV5F6MJr4910+hnGds+sty /pdw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=okngCgAbemxnGW5BdpRodUcRQt5ZhuKdRtxoRtclGi0=; b=rdBdnsjqQtNDlcPaEcvXpn//3gBgaQxY2BEnXBUxcWRSq0V4YoGFleTRxPf2mLlowJ BcvmVIAKZx+Qs4FQXRwMJy/ruzmd2vgv0RqhluEqrWJsmXDWuhk7Wgu1fHezgnYFMnBK /+lKB7wUJM/joQXYlLW9prXTV+tlHoSeoF5AmjdGaxSYZTz2hWhg+OWKumQNwXkPcfan EXC5aM+zJfwgf49ry6qfQyYC3q0e6lqgf8jCAjLdnEjTcbQlQ1DkFu/nDt+xJQd/KZlb XAgxiyuk7gYHK5iOZ7Hw9kTN2iLPyn0qhhrhoPKK3AIG8T4pmyex84loDUphzkxXX5Ud VzXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UQ3Yk9mT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a15-20020a63e40f000000b00373ac53c72bsi10496467pgi.801.2022.02.28.12.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:23:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UQ3Yk9mT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B497A1CD9C4; Mon, 28 Feb 2022 11:42:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239583AbiB1RxM (ORCPT + 99 others); Mon, 28 Feb 2022 12:53:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234827AbiB1Rs0 (ORCPT ); Mon, 28 Feb 2022 12:48:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C3DA1BDF; Mon, 28 Feb 2022 09:38:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0093861357; Mon, 28 Feb 2022 17:38:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14055C340F0; Mon, 28 Feb 2022 17:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646069924; bh=QB10XE3gR5BJEWW3EM4cJA7nfq9MGQ5WwU/sqBhunZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UQ3Yk9mT2MpKQh7BaXhZMILVMGQ3s9HNQAdgU444NipzplPnBbG1gi7z1KuccRbUh T7ea4ZCU3Xy3C1RU/boo3QV8lNTQ0lIl+1EPm7K/EC1mVnsHZIJk3x2a3GkP17fLow yeV38EwAaF/KEVXH9VuNJiqy/d38AcIbCg0KUgWg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Matthias Reichl , Maxime Ripard Subject: [PATCH 5.15 062/139] drm/edid: Always set RGB444 Date: Mon, 28 Feb 2022 18:23:56 +0100 Message-Id: <20220228172354.213295656@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172347.614588246@linuxfoundation.org> References: <20220228172347.614588246@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard commit ecbd4912a693b862e25cba0a6990a8c95b00721e upstream. In order to fill the drm_display_info structure each time an EDID is read, the code currently will call drm_add_display_info with the parsed EDID. drm_add_display_info will then call drm_reset_display_info to reset all the fields to 0, and then set them to the proper value depending on the EDID. In the color_formats case, we will thus report that we don't support any color format, and then fill it back with RGB444 plus the additional formats described in the EDID Feature Support byte. However, since that byte only contains format-related bits since the 1.4 specification, this doesn't happen if the EDID is following an earlier specification. In turn, it means that for one of these EDID, we end up with color_formats set to 0. The EDID 1.3 specification never really specifies what it means by RGB exactly, but since both HDMI and DVI will use RGB444, it's fairly safe to assume it's supposed to be RGB444. Let's move the addition of RGB444 to color_formats earlier in drm_add_display_info() so that it's always set for a digital display. Fixes: da05a5a71ad8 ("drm: parse color format support for digital displays") Cc: Ville Syrjälä Reported-by: Matthias Reichl Signed-off-by: Maxime Ripard Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220203115416.1137308-1-maxime@cerno.tech Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -5205,6 +5205,7 @@ u32 drm_add_display_info(struct drm_conn if (!(edid->input & DRM_EDID_INPUT_DIGITAL)) return quirks; + info->color_formats |= DRM_COLOR_FORMAT_RGB444; drm_parse_cea_ext(connector, edid); /* @@ -5253,7 +5254,6 @@ u32 drm_add_display_info(struct drm_conn DRM_DEBUG("%s: Assigning EDID-1.4 digital sink color depth as %d bpc.\n", connector->name, info->bpc); - info->color_formats |= DRM_COLOR_FORMAT_RGB444; if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB444) info->color_formats |= DRM_COLOR_FORMAT_YCRCB444; if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB422)