In 5G, is Beamforming done based on srs or csi-rs?

Hello Experts.

In 5G, is Beamforming done based on srs or csi-rs?

If answer is srs, so what function of csi-rs in beamgorming weight calculation?

Admin note: this post was updated with image below.

It is possible based on both.

Actually gNodeB switch between one and another based on UL SINR of SRS:

When UL SINR is good in TDD it used SRS weights for beamforming.

When UL SINR of SRS is based or on FDD it uses PMI weights.

So that means if working on srs, so no need for csi-rs at all, right?

pmi needs csi-rs.

It is needed because switching between pmi and srs weight is done fast.