Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1517654pxv; Fri, 16 Jul 2021 11:03:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2Nvq7LaysXh/FG1bXpR+GT0ZAYBzfyeQqq2WLd3CPuHQqA+tsepSMUUhFuUsC9X8x5+dU X-Received: by 2002:a6b:b287:: with SMTP id b129mr8253253iof.209.1626458608054; Fri, 16 Jul 2021 11:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626458608; cv=none; d=google.com; s=arc-20160816; b=EzeIjVtaxcPdV1v9McT/1kYeiMkHMPKyccmRewfjeWsEz1amJsaJilTBLjZKt0kIvO j9y7D7J751KFgF59h90vsPzDvR0wBQ6toyxfUb56CpI+pqNEWK1f+2h6TDBcuFVIp2yr 00dF/8M2zjLu01A/lNC8iJfJIqeePst73Sc6PM5/Uo66WjLTaJ3K3hVUTdewkahGBRn9 0OL2w+kuJKlsj1NtHf54Uf0viDsCyltU91alpjVsk+8R+wU8GwiZ8vE9xTq7daWsFOeE 1ENhTv+Q2Wb01V0F/gWFcy4KUhsftE9JtRaWD6BD74/2qWmPPeZGckqgN79Gj0IMtnn3 HHIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/QNY2blxAdCEPTokXzn1gzUhQ67Qo360Y4y39zHNsQE=; b=A/xkXarZErmFaKU2GoegkqeRnx6kY1Xy/moKcMqGzTG54MJj1jsGborr2g3bmr9u8u AWPYKa/jPtiisxAEEAON1CgI2EH1z5jFpGat4WjhSPzOiOHhk1OaGupf8QMV6RMH7qwG oVxkgl0/ZIoNDZl+gbI/hKzxbojPYpPHrbHI+eTmPv9TaY7JAb1MJHh7AaRBLEeZjWY1 6qeYxaFwU711sBOsbwIWVc/t3oFeamUYv+Y5EHWejr/ish8bXeAY7qg1ggO3OSgVMkH8 6bP+AIwDtgMRJ6KarZaU0PCjHKylVNxk93cqtxgNouwCTdWZc025ZPlh5UopxX57uxU1 WApQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D7DYXEpB; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si9373135ilv.136.2021.07.16.11.03.15; Fri, 16 Jul 2021 11:03:28 -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=@linuxfoundation.org header.s=korg header.b=D7DYXEpB; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231633AbhGPSEn (ORCPT + 99 others); Fri, 16 Jul 2021 14:04:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:46170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbhGPSEm (ORCPT ); Fri, 16 Jul 2021 14:04:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A8FC60FE7; Fri, 16 Jul 2021 18:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626458503; bh=s7Fd477VakCUQjlVc/6FDwPgTBCmpR8IO7i1M1IhGIM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D7DYXEpBO2oR63kbWefC3IFT6JbYuKPv+jf9seJzHWId9w4hL0cGMkcIroESVy0wT Kqky9ii1RylYsE5DRWTohfxfkbvqtqIO7wNQxWVtovmYH5gcc+SKhMvv3kv8WSq6HI 7r5lXVqdXTKrGKp5d1a2BzX7NrFb7hPkTJyB8OQ4= Date: Fri, 16 Jul 2021 20:01:32 +0200 From: Greg Kroah-Hartman To: Stefan Lippers-Hollmann Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Wesley Chalmers , Dmytro Laktyushkin , Anson Jacob , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: Re: [PATCH 5.13 106/266] drm/amd/display: Cover edge-case when changing DISPCLK WDIVIDER Message-ID: References: <20210715182613.933608881@linuxfoundation.org> <20210715182632.619513356@linuxfoundation.org> <20210715231255.38f8442b@mir> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715231255.38f8442b@mir> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 11:12:55PM +0200, Stefan Lippers-Hollmann wrote: > Hi > > On 2021-07-15, Greg Kroah-Hartman wrote: > > From: Wesley Chalmers > > > > [ Upstream commit 78ebca321999699f30ea19029726d1a3908b395f ] > > > > [WHY] > > When changing the DISPCLK_WDIVIDER value from 126 to 127, the change in > > clock rate is too great for the FIFOs to handle. This can cause visible > > corruption during clock change. > > > > HW has handed down this register sequence to fix the issue. > > > > [HOW] > > The sequence, from HW: > > a. 127 -> 126 > > Read DIG_FIFO_CAL_AVERAGE_LEVEL > > FIFO level N = DIG_FIFO_CAL_AVERAGE_LEVEL / 4 > > Set DCCG_FIFO_ERRDET_OVR_EN = 1 > > Write 1 to OTGx_DROP_PIXEL for (N-4) times > > Set DCCG_FIFO_ERRDET_OVR_EN = 0 > > Write DENTIST_DISPCLK_RDIVIDER = 126 > > > > Because of frequency stepping, sequence a can be executed to change the > > divider from 127 to any other divider value. > > > > b. 126 -> 127 > > Read DIG_FIFO_CAL_AVERAGE_LEVEL > > FIFO level N = DIG_FIFO_CAL_AVERAGE_LEVEL / 4 > > Set DCCG_FIFO_ERRDET_OVR_EN = 1 > > Write 1 to OTGx_ADD_PIXEL for (12-N) times > > Set DCCG_FIFO_ERRDET_OVR_EN = 0 > > Write DENTIST_DISPCLK_RDIVIDER = 127 > > > > Because of frequency stepping, divider must first be set from any other > > divider value to 126 before executing sequence b. > [...] > > This patch seem to introduce a build regression for x86_64: > > CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.o > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c: In function 'dcn20_update_clocks_update_dentist': > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:154:26: error: 'const struct stream_encoder_funcs' has no member named 'get_fifo_cal_average_level' > 154 | if (!stream_enc->funcs->get_fifo_cal_average_level) > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:156:34: error: 'const struct stream_encoder_funcs' has no member named 'get_fifo_cal_average_level' > 156 | fifo_level = stream_enc->funcs->get_fifo_cal_average_level( > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:159:15: error: 'const struct dccg_funcs' has no member named 'set_fifo_errdet_ovr_en' > 159 | dccg->funcs->set_fifo_errdet_ovr_en( > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:163:16: error: 'const struct dccg_funcs' has no member named 'otg_drop_pixel' > 163 | dccg->funcs->otg_drop_pixel( > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:166:15: error: 'const struct dccg_funcs' has no member named 'set_fifo_errdet_ovr_en' > 166 | dccg->funcs->set_fifo_errdet_ovr_en( > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:185:26: error: 'const struct stream_encoder_funcs' has no member named 'get_fifo_cal_average_level' > 185 | if (!stream_enc->funcs->get_fifo_cal_average_level) > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:187:34: error: 'const struct stream_encoder_funcs' has no member named 'get_fifo_cal_average_level' > 187 | fifo_level = stream_enc->funcs->get_fifo_cal_average_level( > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:190:15: error: 'const struct dccg_funcs' has no member named 'set_fifo_errdet_ovr_en' > 190 | dccg->funcs->set_fifo_errdet_ovr_en(dccg, true); > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:192:16: error: 'const struct dccg_funcs' has no member named 'otg_add_pixel' > 192 | dccg->funcs->otg_add_pixel(dccg, > | ^~ > /build/linux-5.13/drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c:194:15: error: 'const struct dccg_funcs' has no member named 'set_fifo_errdet_ovr_en' > 194 | dccg->funcs->set_fifo_errdet_ovr_en(dccg, false); > | ^~ > make[5]: *** [/build/linux-aptosid-5.13/scripts/Makefile.build:273: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.o] Error 1 > make[4]: *** [/build/linux-aptosid-5.13/scripts/Makefile.build:516: drivers/gpu/drm/amd/amdgpu] Error 2 > make[3]: *** [/build/linux-aptosid-5.13/scripts/Makefile.build:516: drivers/gpu/drm] Error 2 > make[2]: *** [/build/linux-aptosid-5.13/scripts/Makefile.build:516: drivers/gpu] Error 2 > make[1]: *** [/build/linux-aptosid-5.13/Makefile:1864: drivers] Error 2 > make: *** [/build/linux-aptosid-5.13/Makefile:215: __sub-make] Error 2 > > Regards > Stefan Lippers-Hollmann Now dropped, thanks! greg k-h