This ultimately ends up as a very situational issue, depending on culture, professor, individual, and past experience. I generally wouldn't consider it automatically a bad thing - and I tend to do it myself.
The main issue is not so much the phone, as how you use it and interact with it in the context of a class. I had a professor who explicitly asked for no electronic devices to be out in class, so in that case obviously they were clear that they didn't like to have phones out, so you'd generally want to abide by that. I, on the other hand, made a point of pulling out my phone quite visibly when a due date or assignment was announced to put it in my digital calendar, or if someone asked a question the professor was unsure of, or if the professor said something I doubted the correctness of I'd squint and tilt my head, and then Google it on my phone to confirm or clarify (and would offer to share what I found if something interesting resulted).
In theory, I blatantly violated the rule, and this would be considered something you shouldn't do. On the other hand, I am A) older, and less likely to be accused of being hooked on Facebook, B) someone who had already established themselves as a good student, and C) I made a point to make it clear I was using my electronic device in a pro-social, pro-education, productive way, which added to the class in a positive manner. The result was the professor actually changed their policy to be explicit about not wanting devices to be used as a distraction or unrelated to class, instead of a blanket ban.
If you use any device in way that makes it clear you are not paying attention, engaging with the class, or generally are not respectful of the time and work being done by people you are present with, that is going to be correctly interpreted as rude and disrespectful. I don't particularly recommend having it out just to have it out, though - if you aren't going to use it in some way, just put it away because it's a waste of work space. But if you are indeed going to use it in class in an appropriate, productive way - and make sure it isn't going to make noise, even by vibrating on the table - there is nothing wrong with having the phone on the desk in most modern classroom environments. If the professor explicitly has a no device policy, then you can politely defer to it any put it away unless you want to make a point in some way.