drm/amd/display: fix issues with driver unload
authorjsg <jsg@openbsd.org>
Thu, 2 Feb 2023 03:51:52 +0000 (03:51 +0000)
committerjsg <jsg@openbsd.org>
Thu, 2 Feb 2023 03:51:52 +0000 (03:51 +0000)
From Hamza Mahfooz
b0b029ee04ef3dd6c7da0922204fb9e47a0b9010 in linux-6.1.y/6.1.9
e433adc60f7f847e734c56246b09291532f29b6d in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

index 0e1a775..10b1443 100644 (file)
@@ -1739,10 +1739,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
                adev->dm.vblank_control_workqueue = NULL;
        }
 
-       for (i = 0; i < adev->dm.display_indexes_num; i++) {
-               drm_encoder_cleanup(&adev->dm.mst_encoders[i].base);
-       }
-
        amdgpu_dm_destroy_drm_device(&adev->dm);
 
 #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
index 6483ba2..b7369c7 100644 (file)
@@ -468,7 +468,6 @@ static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs
 static void amdgpu_dm_encoder_destroy(struct drm_encoder *encoder)
 {
        drm_encoder_cleanup(encoder);
-       kfree(encoder);
 }
 
 static const struct drm_encoder_funcs amdgpu_dm_encoder_funcs = {