mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
drm/amd/display: Fix GFX12 family constant checks
Using >=, <= for checking the family is not always correct. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Matthew Stewart <Matthew.Stewart2@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4a42133584
commit
bdad086702
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user