They are two different past tenses that are -I think- unique to Turkish.
-miş indicates uncertainty, like you have heard of something, it happened while you weren't there.
-di is more certain. You are sure it happened, you have seen it with your own eyes or it is a really common fact.
The Past Perfect Indefinite is formed by adding the indefinite past tense suffix ‑miş to the past tense ‑miş form of the verb.
There is hearsay or doubt in the meaning of this tense as it is made indefinite and unspecific by the addition of the past indefinite suffix in ‑miş.
This tense signifies the indefinite Past in The Past. "(I thought) I had done it."