Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp938579lko; Tue, 13 Jul 2021 13:23:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxnoSMfzbZnMWjUI6Ob5p1IYoxAXSJYTuur0fDaz+yr7mouPa2kpOdgMYfpUVSISlngChb X-Received: by 2002:a17:906:b0d1:: with SMTP id bk17mr3621849ejb.59.1626207833459; Tue, 13 Jul 2021 13:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626207833; cv=none; d=google.com; s=arc-20160816; b=sxtCS0Y3UwOIIsb3Bbkn2X4kEBKl6Ui5QAWCOhsslv0D2tZnLfnqZuc2peymVUszjB ukItQf9JE+Y1Q1c0BDW5uczIWIJsN3dVNvuax6blHjEa99Bh+yNRkPMG8txP40xBTG4j t7vyWbt6BlwRXpTtnBuZ+xh9eKoYYBzSZiL2SklIOC3F0fjMcYTUGpXcTLQIq3b/n+Xj 1i6j4PiAbG7CkJHwB2bzYU5D7a95E1DGRi41g8SM60iPWkLhgAuZ7tJOL7hlARRMsFyL ljLmI8uENVaFWd5DAXbSNAzYOkOeuPRTEGRv+M1KaKGp/u9Ecl+6xv4pIv4jl//gyeB1 5puA== 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=krpu9IkDAm0VH0bBlgpegwJvLDZMCOxEQTh52ipfQ2dNDCtGePePStwrw9LzUPDdkd bSl4BYWXkbXM+s9vwVz8nxTjReYaj3AEhcljkvgW4dIyzgf9Gy7SuF/cLSpN35rkEvfP zmxEzTy1OymmDHIC+DDUCXmPhVLKI1YS3NtlL/zHFu18bOhO3lhLzRr+SL8Xy/zm7vHG W4FFg82Bpq7N9zQvjal0PoiuxOhffZZynleCTijH7GJlE3NPCy5EBeemDDeOnSkNc2gm rddOr/qkSI09Rn8IywfTix/0brILPV9sT/AChSG+o4YN/37cQN7vVbEVNyi2BDodkLWj E+yg== 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 p20si21224491edq.601.2021.07.13.13.23.08; Tue, 13 Jul 2021 13:23:53 -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 S234548AbhGMUVq (ORCPT + 99 others); Tue, 13 Jul 2021 16:21:46 -0400 Received: from dliviu.plus.com ([80.229.23.120]:40032 "EHLO smtp.dudau.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbhGMUVp (ORCPT ); Tue, 13 Jul 2021 16:21:45 -0400 Received: from mail.dudau.co.uk (bart.dudau.co.uk [192.168.14.2]) by smtp.dudau.co.uk (Postfix) with SMTP id 919384119B03; Tue, 13 Jul 2021 21:18:53 +0100 (BST) Received: by mail.dudau.co.uk (sSMTP sendmail emulation); Tue, 13 Jul 2021 21:18: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: Tue, 13 Jul 2021 21:18:51 +0100 Message-Id: <20210713201851.60359-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