public inbox for amd-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Initialize num_pkrs on VANGOGH.
@ 2020-10-20 22:31 Bas Nieuwenhuizen
  2020-10-20 23:47 ` Marek Olšák
  2020-10-21 16:09 ` [PATCH] drm/amd/display: Interpret log_2(0) as 0 Harry Wentland
  0 siblings, 2 replies; 6+ messages in thread
From: Bas Nieuwenhuizen @ 2020-10-20 22:31 UTC (permalink / raw)
  To: amd-gfx; +Cc: alexander.deucher, Roman.Li, Bas Nieuwenhuizen

As far a I can tell uses a variant of DCN3xx which uses num_pkrs.

If we do not initialize the variable we will set the register field
to ilog2(0) = -1, though the mask will reduce that to 7. Pretty sure
7 is not the value we want here.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
---

Found while rebasing my modifiers series. Not tested on HW.

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 6855aad7f312..2713caac4f2a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4074,7 +4074,8 @@ fill_plane_buffer_attributes(struct amdgpu_device *adev,
 #ifdef CONFIG_DRM_AMD_DC_DCN3_0
 		if (adev->asic_type == CHIP_SIENNA_CICHLID ||
 		    adev->asic_type == CHIP_NAVY_FLOUNDER ||
-		    adev->asic_type == CHIP_DIMGREY_CAVEFISH)
+		    adev->asic_type == CHIP_DIMGREY_CAVEFISH ||
+		    adev->asic_type == CHIP_VANGOGH)
 			tiling_info->gfx9.num_pkrs = adev->gfx.config.gb_addr_config_fields.num_pkrs;
 #endif
 		ret = fill_plane_dcc_attributes(adev, afb, format, rotation,
-- 
2.28.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-21 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20 22:31 [PATCH] drm/amd/display: Initialize num_pkrs on VANGOGH Bas Nieuwenhuizen
2020-10-20 23:47 ` Marek Olšák
2020-10-21  2:48   ` Huang Rui
2020-10-21 16:09 ` [PATCH] drm/amd/display: Interpret log_2(0) as 0 Harry Wentland
2020-10-21 16:39   ` Bas Nieuwenhuizen
2020-10-21 20:10     ` Marek Olšák

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox