<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">smatch found this problem on amd-staging-drm-next:<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1443
amdgpu_discovery_get_vcn_info() error: buffer overflow
'adev->vcn.vcn_codec_disable_mask' 2 <= 3</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">This is caused by:<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#define AMDGPU_MAX_VCN_INSTANCES 2</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">#define VCN_INFO_TABLE_MAX_NUM_INSTANCES 4</div><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Can we just drop VCN_INFO_TABLE_MAX_NUM_INSTANCES completely and use AMDGPU_MAX_VCN_INSTANCES everywhere instead (and bump it to 4)?</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">//E<br></div><br></div></div>