Re: [PATCH 5.13 106/266] drm/amd/display: Cover edge-case when changing DISPCLK WDIVIDER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <Wesley.Chalmers@xxxxxxx>
> > 
> > [ 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



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux