In general, there is disparity in the system, but outright racism/discrimination isn't overly common. You'll always have a few racist cops, racist judges etc. that effect things.
The main reasons for the prison disparity are that the bulk of serious street crime is in poor, disadvantaged urban areas that happen to be largely minority.
The rates of offending thing is an interesting point, self report surveys in which people report their delinquency etc. in the past year usually find little difference for most crimes between races. Of course, these tend to focus more on minor things like drug use, shoplifting etc., as people are unlikely to be honest about reporting things like robbery despite the surveys being anonymous.
So part of the difference for things like pot and other drugs is simply that you're more likely to get caught in poor urban areas where there are a ton more police around vs. the suburbs or especially rural areas, due to police focusing on high crime areas.
That said, there are some racist policies, be it intentional or unintentional. The classic example is the 100:1 disparity for the 5 year mandatory minimum sentence for crack cocaine vs. powdee cocaine. It takes 500 grams of powder cocaine to get the mandatory sentence, vs. only 5 grams of crack cocaine.
Some say that came about due to the raging crime in the 1980s associated with crack, others say it was because rich whites used powder cocaine and poor minorities used crack. The latter would seem more pertinent to explaining why the law is still on the books long after the crack epidemic of the 1980s has abated and crime rates have dropped.
Then there's the whole marxist/conflict criminology view that we have the disparity because the rich whites with power define behaviors of the lower class as criminal (fits the above example--harder to apply to serious crimes like murder, robbery etc--the mala en se offenses--evil in themselves).
Anyway, post is kind of all over the place--that's reflective of the criminological literature on race and crime. It's a bit all over place, but the general sense is there's a lot of disparity in sentences, but probably not much outright discrimination.