]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu: fix hpd range check in dce_v8_0_hpd_irq()
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 11 Jun 2015 15:26:03 +0000 (11:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jun 2015 15:21:38 +0000 (11:21 -0400)
Spotted by Dan Carpenter.  This is a slight variant of
his fix.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c

index 72c27ac915f2a8681f35db4d15e232918405eb95..aaca8d663f2c60e97921e0c06a69a1c7a4549322 100644 (file)
@@ -3379,7 +3379,7 @@ static int dce_v8_0_hpd_irq(struct amdgpu_device *adev,
        uint32_t disp_int, mask, int_control, tmp;
        unsigned hpd;
 
-       if (entry->src_data > 6) {
+       if (entry->src_data >= adev->mode_info.num_hpd) {
                DRM_DEBUG("Unhandled interrupt: %d %d\n", entry->src_id, entry->src_data);
                return 0;
        }