DP is a slur used to describe Polish in a derogatory way. "Dumb Polish," pronounced "deepee." After World War II, displaced refugees of Eastern European origin were referred as Displaced Persons, however, it stuck around even today to describe Polish immigrants.
The word DP is a racial slur that has been used historically to degrade and dehumanize polish. The word is still used by some people for this purpose, and it is seen as offensive and hurtful to polish. If you are unsure about whether or not it is appropriate to use the word DP, it is best to err on the side of caution and avoid using it in any situation.