Roger Federer resumes his injury comeback on Swiss home soil in Geneva next week with the 39-year-old legend insisting: "We're on this train until Wimbledon".

Federer returned to the courts in March, having been out for more than a year following two knee surgeries, winning his first match in Qatar before losing his second.

Doha was his first appearance since January 2020 and an Australian Open semi-final defeat to Novak Djokovic.

Federer was due to play in the May 2-9 Madrid Open, but made a late decision to switch to the lower-profile Geneva event where he should have a better chance of getting on a roll.

"Doha was just a little test of how I was doing," 20-time Grand Slam title winner Federer told Leman Bleu television.

"Geneva is more than just a little test, to see if I can play several matches in a row. I know the danger of losing early is always there."

Geneva should test what sort of shape Federer is in ahead of the May 30-June 13 French Open before he targets his two major goals -- a ninth Wimbledon title and a singles gold medal at the Tokyo Olympics.

"He is not coming to say hello," Geneva tournament director Thierry Grin told the Swiss magazine L'Illustre.

"He is coming to win matches before his big goal: Wimbledon."

Even though his 40th birthday approaching in August, Federer said he was still passionate about tennis and had missed the touring life.

"It's difficult to abandon all that without trying to come back again," he said.

"The year has been ultra-long for me, with the double operation and the pandemic.

"We're on this train until Wimbledon, we're just going to concentrate on that, and the rest afterwards, see what happens. The comeback is the priority."

Eyes on Wimbledon for Roger Federer
Eyes on Wimbledon for Roger Federer POOL / Laurence Griffiths

Federer looked comfortable during his first training session on the courts overlooking Lake Geneva on Friday, hitting with Hungary's Marton Fucsovics, who won the 2018 title at the Eaux-Vives club.

The tournament was not held last year due to the coronavirus pandemic and is being played this time without spectators.

The players are tested every two days, with Federer, who has had the Pfizer-BioNTech Covid-19 vaccine, testing negative on Friday.

World number eight Federer faces top-30 competition in Geneva from Denis Shapovalov, late wild card Grigor Dimitrov, Christian Garin, rising star Casper Ruud and Fabio Fognini.

The 2014 US Open winner Marin Cilic is also in the 28-man tournament on clay -- Federer's least favourite surface.

Top seed Federer receives a bye into the second round and will play his first match on Tuesday, against either Australia's Jordan Thompson or Spain's Pablo Andujar.

If he gets through his first match, Federer has Garin and Cilic as potential opponents in the quarter-finals, Ruud in the semis and Shapovalov in the final.

However, the biggest test ahead of the Wimbledon grass and the hard courts of Tokyo will come on the French Open clay where he was champion back in 2009.

His last outing at Roland Garros in Paris was his 2019 semi-final defeat to old rival Rafael Nadal, with whom he now shares the record of 20 Grand Slam singles titles.

Federer said he had "no plans" to retire any time soon.

"It's the knees and the family which will decide that," he told Leman Bleu.

"For the moment, it's the thought of coming back and see what level I will reach, and after we will see how long I can keep going with it, with all the stress, all the demands."