Commit bdad0867 authored by Matthew Stewart's avatar Matthew Stewart Committed by Alex Deucher
Browse files

drm/amd/display: Fix GFX12 family constant checks



Using >=, <= for checking the family is not always correct.

Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarMatthew Stewart <Matthew.Stewart2@amd.com>
Tested-by: default avatarDan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4a421335
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11867,7 +11867,7 @@ static int dm_check_cursor_fb(struct amdgpu_crtc *new_acrtc,
	 * check tiling flags when the FB doesn't have a modifier.
	 */
	if (!(fb->flags & DRM_MODE_FB_MODIFIERS)) {
		if (adev->family >= AMDGPU_FAMILY_GC_12_0_0) {
		if (adev->family == AMDGPU_FAMILY_GC_12_0_0) {
			linear = AMDGPU_TILING_GET(afb->tiling_flags, GFX12_SWIZZLE_MODE) == 0;
		} else if (adev->family >= AMDGPU_FAMILY_AI) {
			linear = AMDGPU_TILING_GET(afb->tiling_flags, SWIZZLE_MODE) == 0;
+2 −2
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ static int amdgpu_dm_plane_validate_dcc(struct amdgpu_device *adev,
	if (!dcc->enable)
		return 0;

	if (adev->family < AMDGPU_FAMILY_GC_12_0_0 &&
	if (adev->family != AMDGPU_FAMILY_GC_12_0_0 &&
	    format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
		return -EINVAL;

@@ -901,7 +901,7 @@ int amdgpu_dm_plane_fill_plane_buffer_attributes(struct amdgpu_device *adev,
			upper_32_bits(chroma_addr);
	}

	if (adev->family >= AMDGPU_FAMILY_GC_12_0_0) {
	if (adev->family == AMDGPU_FAMILY_GC_12_0_0) {
		ret = amdgpu_dm_plane_fill_gfx12_plane_attributes_from_modifiers(adev, afb, format,
										 rotation, plane_size,
										 tiling_info, dcc,