From patchwork Wed Nov 10 15:58:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 12612449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D07A7C433F5 for ; Wed, 10 Nov 2021 15:58:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7463060E98 for ; Wed, 10 Nov 2021 15:58:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7463060E98 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 42F496E84B; Wed, 10 Nov 2021 15:58:49 +0000 (UTC) Received: from lb1-smtp-cloud9.xs4all.net (lb1-smtp-cloud9.xs4all.net [IPv6:2001:888:0:108::1c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 71FE16E84B; Wed, 10 Nov 2021 15:58:47 +0000 (UTC) Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud9.xs4all.net with ESMTPA id kpzmmnnpVfwDFkpzpmGQKY; Wed, 10 Nov 2021 16:58:45 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1636559925; bh=a0KEUXG4kbUaTglyp2MERFNiBlvDH3XGhSysQImZGwk=; h=To:From:Subject:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=CL1Q6nE2ths4q6xVRxWfqSX5KPhBcdoO53+FaspKTGgqZEtAo5n5Ma3dQawUsqQto 8iJikFrBvxGrqdjfHyhwW9n5d+cgFqp1l3/YOxr6TY12duIYc+zvkwYgSrU+wyu2CB sYRlSyGQKzeHEQZMnOIYNXHRodRogXrjNFLj2xF0cNiqJ8kubi/1sD6XLekiq8KyuQ cn4al8rvpDB66RonoxUSJ4AZwsLWeprv4zIGfqr0MBajHsAPLmTmYNOccrnmP6ocew KG2k8Vy+0oHpyHeT6pBzm5J4biMWKPKReMSryWzNbteYTNPcxtj8beMrpsswpk+qlS AgwxkNEWYf60w== To: Maling list - DRI developers From: Hans Verkuil Subject: [PATCH] drm/nouveau: set RGB quantization range to FULL Message-ID: Date: Wed, 10 Nov 2021 16:58:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.14.0 MIME-Version: 1.0 Content-Language: en-US X-CMAE-Envelope: MS4xfGiRbg3hMUiObh+UFuE35rmpYdbN+JpUvIvwSfM2eRS83ERUzbqcTrzCw6UKtrelglzVlaFiT7iyGneQg5f8IoOzEUhPDAPh6+WuXYMhlBxfy6vDqpJT TQN0iV2xa7L7MmaOXMRkF6OxnBeS3zFKvxIT3HYN2yR1ymBYC7tr5bYrT3dM4v8qiFWmluApsTM7dw23SQ+Ago3y6gSoK+9A6wNS9T4Hv85Uc4jtT389yDkE 7rk6+orIEERIwLbh8VyxOgjsm7Aa6pf2PgcfPr0O+21+w54VNtJy1BSSJPaogirz X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nouveau@lists.freedesktop.org, Ben Skeggs Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The nouveau driver outputs full range RGB, but the AVI InfoFrame just says 'Default' instead of 'Full'. Call drm_hdmi_avi_infoframe_quant_range to fill in the quantization field of the AVI InfoFrame correctly. Now displays that advertise RGB Selectable Quantization Range in their EDID will understand that full range is transmitted by the HDMI output. This is consistent to how the Nvidia's driver behaves. Signed-off-by: Hans Verkuil Reviewed-by: Ben Skeggs diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index d7b9f7f8c9e3..b05c01927fe6 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -852,6 +852,9 @@ nv50_hdmi_enable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc, ret = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame.avi, &nv_connector->base, mode); if (!ret) { + drm_hdmi_avi_infoframe_quant_range(&avi_frame.avi, + &nv_connector->base, mode, + HDMI_QUANTIZATION_RANGE_FULL); /* We have an AVI InfoFrame, populate it to the display */ args.pwr.avi_infoframe_length = hdmi_infoframe_pack(&avi_frame, args.infoframes, 17);