Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1459686pxv; Fri, 16 Jul 2021 09:48:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMuf+CP4+bOiWJ56iTXt/F1O3SCRGzm0RMl0zmGHgGVRtnPNtd5gwliSlNSpCxYr+neV// X-Received: by 2002:a05:6638:22f:: with SMTP id f15mr9567498jaq.141.1626454094368; Fri, 16 Jul 2021 09:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626454094; cv=none; d=google.com; s=arc-20160816; b=XvBxTrLaEJ72L2QoZEwCjELvVc8qzyJd7BjuamJRLUyzp5Sy3ZEK4Ofh+Lbo+wdxPw jirHzdU6GVedr0XEXA5vqBDiK8WxF01oy80gELVMPa4tEN6oHO/5wgFfGud5i5XXhEQI cfCiW5cAQda/ZHJytsO5RR6zhWa15tsqijCaLHTcbLIPsX3ZZS6xdzLD2GVjdchI8id1 bQiJnxWPJTm4qlMDDWQbslE9U71vlT10UgGXa1uR7KJWuS1oCYkll6Ix4ZHY63Kqfna0 23Mxi3O7Co8iGpaV71MoWpwBbM/o6nGke02Gbom1Pd4T2blntSX1rBWlmvb208y3E9Qp 12Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oh7B6qOHJQLQ6+INHEXYWjtOIQ2UOCfXFqFA/OXfYPI=; b=VZMsBHLlvlV6oCMw8pVJByjpCnL7UXLsjQdX17vStQMKqGStUjgI4Z7XezCV0cwZlf ywDKRbp5a1+L3O9HNqWA9880nswKSNhHltZJd0ISUan8N+7vJ43o9woK7Zk2IBMf1rvj HOfkKYf5LSXc2+OvLRJ4dI8GjeAaVoFHMm+qYaEinKyTqutZftoR2nohJzlpOLZBuJqR oGVYue8icYbPxfhivU1+zfYefQt8iggaz2RzLy98iLaeUiEGGNVZXEm5d2t+o72fMPtS L1+uFg1n/q3R/IEvbjmzf9yydFt7t0aA5w525K9xyWQTPmLPLImqDar+HsImWj8qpBPF Y7qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O8xIqSR6; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si10514474ila.97.2021.07.16.09.47.59; Fri, 16 Jul 2021 09:48:14 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O8xIqSR6; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbhGPQsz (ORCPT + 99 others); Fri, 16 Jul 2021 12:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbhGPQsy (ORCPT ); Fri, 16 Jul 2021 12:48:54 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D34DEC06175F for ; Fri, 16 Jul 2021 09:45:57 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id v32-20020a0568300920b02904b90fde9029so10474531ott.7 for ; Fri, 16 Jul 2021 09:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oh7B6qOHJQLQ6+INHEXYWjtOIQ2UOCfXFqFA/OXfYPI=; b=O8xIqSR6UI188/ckW83ntnyI7R9KkV4/TFufwwMR3Suenw+hd30OLyXgNfPL5oQb4D KZzkAwvoj24wHKIJwyzH7963LW19rFCUCilqpATpLpRIUQ6TJuOiJyFoK3KU7orzpqTg BGU+5/qmoKTSju2RWekmWyD7m09Uwu/8QWv6K5G1sam2Elmmtu+U0xrFlzdTiO0Uf+H+ 2XyIGiAoLPe0QSrwyHQze2o+JMcE0ArvWms03ALhnySnsJdSTWiuuK7hf1R4b5hur6GK KVbCRp6oVKqWqlB6JJmumA4PRplqd75zeHo4w0n8ubPt9wKZ6I7hZjsQXQ0X8qeJrWkT ZrvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oh7B6qOHJQLQ6+INHEXYWjtOIQ2UOCfXFqFA/OXfYPI=; b=oMb+tc8dYuaAlNqIs+g3kw5JMerhAMHMfbDWIeM9gUn1S/k8/SYoNZdIw5xl/4rQYm WAzmkDw8ivJJs3w/QC75KayRfR2ktBQZrnWDHkG6FEtbsZw9p1zhnDJa2i3EBFWnpLL2 2L4Umbs9lAKss9pbATDygv0VgU2/vAPMGn4Rj6xWknl+bzQw8wm5EV7OBSfXCYfz6Oiy cFBlip5i/m7sojpHG705gWSU3Iv1aOgcsEI8JJC3gEyMdi0nM6VMSRKt4rbOm91sk+ov c+yXlrLcNXOzG9X/jyRF/kM42bzbrOlD/5MrLmMZvpeGtBMcT4OQrr+2VTwwr20t+gPt 5hIQ== X-Gm-Message-State: AOAM531jSRaAYL1lHoTcSPUoK2FYOlqMGqOpLwMUvqa6/U6G6yefKF9q SdbTQ8FSMSw+X6i4zaO8SSQaVzps8xiHvVqRasI= X-Received: by 2002:a05:6830:2683:: with SMTP id l3mr3098702otu.23.1626453957274; Fri, 16 Jul 2021 09:45:57 -0700 (PDT) MIME-Version: 1.0 References: <20210714080652.113381-1-liviu@dudau.co.uk> In-Reply-To: From: Alex Deucher Date: Fri, 16 Jul 2021 12:45:46 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: Fix 10bit 4K display on CIK GPUs To: Harry Wentland Cc: Mario Kleiner , Liviu Dudau , Leo Li , "Pan, Xinhui" , LKML , amd-gfx list , Maling list - DRI developers , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Thu, Jul 15, 2021 at 3:40 PM Harry Wentland wrote: > > > > On 2021-07-15 3:19 p.m., Mario Kleiner wrote: > > On Thu, Jul 15, 2021 at 6:10 PM Alex Deucher wrote: > >> > >> On Wed, Jul 14, 2021 at 4:15 AM Liviu Dudau wrote: > >>> > >>> 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 > >> > >> Harry or Mario any ideas? Maybe we need finer grained DCE version > >> checking? I don't remember all of the caveats of this stuff. DCE11 > >> and older is getting to be pretty old at this point. I can just apply > >> this if you don't have any insights. > >> > >> Alex > >> > > > > Hi Alex > > > > I'd be fine with applying this. As my original commit says, photometer > > measurements showed that increasing the line buffer depth was only > > needed for my DCN-1 RavenRidge, not for my DCE-11.2 Polaris11 or a > > DCE-8.3 cik, so this should probably not cause harm to the increased > > precision modes. > > > > Note that given the hardware and USB-C/DP-HDMI adapters i have, I only > > tested this on a 2560x1440@144 Hz DP monitor with DCN-1, DCE-11.2, and > > a 2560x1440@100 Hz HDMI monitor iirc with DCN-1, DCE-8.3, and i think > > on a 2880x1800@60 Hz MBP Retina eDP panel with DCE-11.2. These are the > > highest resolution/framerate monitors I have atm.I don't have access > > to any 4k monitors, so maybe the problem is somehow specific to such > > high resolutions? Maybe somewhere else in the code something would > > need to be adapted? Lacking actual hw docs, my coding here is by > > pattern matching against existing DC code, guessing and testing on my > > limited hw samples. > > > > Acked-by: Mario Kleiner > > Makes sense. > > Reviewed-by: Harry Wentland > > Harry > > > > > -mario > > > >>> --- > >>> 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 > >>> > >>> _______________________________________________ > >>> amd-gfx mailing list > >>> amd-gfx@lists.freedesktop.org > >>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx>