Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp934050lko; Tue, 13 Jul 2021 13:17:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTIcZvVMEe1+0ntY97kkSsbhdBR7jg1eHaNlIi0UNoaYoEtZUtpbWtmEWpjaxYOZXPBQU2 X-Received: by 2002:aa7:cb9a:: with SMTP id r26mr8228642edt.78.1626207445808; Tue, 13 Jul 2021 13:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626207445; cv=none; d=google.com; s=arc-20160816; b=xkSRLRVT1TZmYH/rNO1L12ZVXBzuSkHrG2MoVUxXd42DJfJ3dGQrkAMYO//pesHDlR DoImvxjQjxoQmHuOnwRL0IP+hRDCSf5m8AyjcKuWRY1/ECyL3yNdw/zOkCBezWlSo7rn yV45E2SyIkI8ZZYxnLkK67GMbp5Yczds3gkvFbNg2O4OmVwM4Rf3PsWgaRalt23wrD+M Ke/+bRPQe2Th4putJeKaImujHSE26SWYyg4lZeNEV1Wpy8AYkdJuN1jtsRN/3/uT4N68 0UyF4glKnvjeb+Va9f91rvKGbMR+Sdn0YBwTCRSV93e7LnAGpBsIL0ZEQM93z//psW19 vXBw== 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 :message-id:date:subject:cc:to:from; bh=NG8mAE33Bz0JPS9qoF/Fs1EDB+fptDuzN+HD09oj4ec=; b=HnW4yBhUhGTDOuxlXK8SRtuM74zH9vFR/F6Zu2k0NkJUBythACPfhcPZRx2GUbRNAD Xxuh/VAv6kLHaWdEeDfNZvb1u2clp1iOCjR0SDWPteJdzoX0YWN+e50j70TaRUytskR9 xA3GaECfKOmiB6FUyH3PFGMvjidP0flVT67tGd5R0y1DWsN8OJnrUjwXGHJcPcdLRe0/ AlGwgveYmEejDeIZ5YYL9Fr7VrGG8fNS1LTnVAJInX0XqVyHo3edy3HVnUgJIg+wrM65 l9HkrcGC0TBKKGbJq9l3uC1+H+d0HqCFoJhb9suq7LwHrHBjd+RrwsBbgzDAWfjGCZTo wulw== ARC-Authentication-Results: i=1; mx.google.com; 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 w11si84093ede.8.2021.07.13.13.16.55; Tue, 13 Jul 2021 13:17:25 -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; 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 S234548AbhGMUSh (ORCPT + 99 others); Tue, 13 Jul 2021 16:18:37 -0400 Received: from dliviu.plus.com ([80.229.23.120]:40030 "EHLO smtp.dudau.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbhGMUSg (ORCPT ); Tue, 13 Jul 2021 16:18:36 -0400 X-Greylist: delayed 309 seconds by postgrey-1.27 at vger.kernel.org; Tue, 13 Jul 2021 16:18:36 EDT Received: from mail.dudau.co.uk (bart.dudau.co.uk [192.168.14.2]) by smtp.dudau.co.uk (Postfix) with SMTP id 2673D4119B03; Tue, 13 Jul 2021 21:10:35 +0100 (BST) Received: by mail.dudau.co.uk (sSMTP sendmail emulation); Tue, 13 Jul 2021 21:10:35 +0100 From: Liviu Dudau To: Harry Wentland Cc: Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , Mario Kleiner , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Liviu Dudau Subject: [PATCH] drm/amd/display: Fix 10bit 4K display on CIK GPUs Date: Tue, 13 Jul 2021 21:10:19 +0100 Message-Id: <20210713201019.59107-1-liviu@dudau.co.uk> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 72a7cf0aec0c ("drm/amd/display: Keep linebuffer pixel depth at 30bpp for DCE-11.0.") doesn't seems to have fixed 10bit 4K rendering over DisplayPort for CIK GPUs. On my machine with a HAWAII GPU I get a broken image that looks like it has an effective resolution of 1920x1080 but scaled up in an irregular way. Reverting the commit or applying this patch fixes the problem on v5.14-rc1. Fixes: 72a7cf0aec0c ("drm/amd/display: Keep linebuffer pixel depth at 30bpp for DCE-11.0.") Signed-off-by: Liviu Dudau --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index a6a67244a322e..1596f6b7fed7c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1062,7 +1062,7 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx) * so use only 30 bpp on DCE_VERSION_11_0. Testing with DCE 11.2 and 8.3 * did not show such problems, so this seems to be the exception. */ - if (plane_state->ctx->dce_version != DCE_VERSION_11_0) + if (plane_state->ctx->dce_version > DCE_VERSION_11_0) pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_36BPP; else pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_30BPP; -- 2.32.0