Avoid doing things that make it hurt, do not raise arms above the shoulder. Rest is very important. (I am currently weathering out a 5 month shoulder impingement and it is no fun). Shoulder impingement is used for tendonitis and bursitis in the shoulder.
Nonsteroidal anti-inflammatory medications such as Aleve, Ibuprophen, etc. will help relieve the inflammation. In your case check with the doctor and see if anti-inflammatory meds are compatible with whatever you may be taking after your knee surgery.
Try ice for a while and later use heat. There are exercises specifically for the shoulder, search for shoulder impingment and you will find them.