Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp176746pxv; Wed, 14 Jul 2021 01:08:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPsTNBXHX57h2QISPaXErgPH5JCGe2wX0isdlTc/+zLXNCl9tlHKjXm2pWJWmVT+JX+G54 X-Received: by 2002:a05:6602:2145:: with SMTP id y5mr6588056ioy.10.1626250107675; Wed, 14 Jul 2021 01:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626250107; cv=none; d=google.com; s=arc-20160816; b=Zdx+mlmCzm9K+uE387s6Zq0NIsP6C/SWvzoMuC+s6fF2eg8fu1bTg7e6t9XiXeRI2E hkoiEXewKdvnxyPdDmDhY1MqX5I75nC+e9cE5hlwUNjYcTZuPzek64gua9vvZXtkFK1N JisHgiUTJIUpxHMMKEdpNpGmT8ZmtMs7jUjyw0OdaFvl0MzWSBUKpFBRBOIDHP/dLGPp FLl3OF66yAVWNRfjJxRRaRvsaiK4yGHBttHajn8x86GgEcKVmlK6hDDt9ngLMawDM9pW tNATEzS27JViH0SE80hsXoL0KWgQkArnh3eqSMfubO6fc8u/7GIdh0CLXdQvCPPrn5Ql trDQ== 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=nJjm1uDqc8k5V8f7wfwTHp1Et9y0HeyKsgM3oBSMa0ffNTvYnSEmFxr171D0cXR5DQ FKq/7edj2q7eEMHQXfZf9JS0/JCSLW0tkm6MiKIdtlUiJWXlUPwzAXK4FyrZWc7EpUYb rU/I6Wiinh/nuHy3U56cgOVcRejRhe4ahNgGMBRZeROt/zDBpYhdzNO0byovo1827Pvq 1+gLFtZl/Z4z17DlI1TPJfYA0n0zs2++HBTIRwlkGZalOBRP34jlbFEIa7WZhxJRFS3H 4X1OrIMlCFVyXqllEYus4GN8fmMb6YOv9DMJ5pTy18SmCBeQLGkaxr/z8dzQXUZLkWCY AGtQ== 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 n2si2049672jaj.36.2021.07.14.01.08.16; Wed, 14 Jul 2021 01:08:27 -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 S238432AbhGNIJr (ORCPT + 99 others); Wed, 14 Jul 2021 04:09:47 -0400 Received: from dliviu.plus.com ([80.229.23.120]:40038 "EHLO smtp.dudau.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238427AbhGNIJr (ORCPT ); Wed, 14 Jul 2021 04:09:47 -0400 Received: from mail.dudau.co.uk (bart.dudau.co.uk [192.168.14.2]) by smtp.dudau.co.uk (Postfix) with SMTP id E18A64111345; Wed, 14 Jul 2021 09:06:53 +0100 (BST) Received: by mail.dudau.co.uk (sSMTP sendmail emulation); Wed, 14 Jul 2021 09:06:53 +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: Wed, 14 Jul 2021 09:06:52 +0100 Message-Id: <20210714080652.113381-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