[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yf511hhojzIXcNXp@smile.fi.intel.com>
Date: Sat, 5 Feb 2022 15:04:22 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Javier Martinez Canillas <javierm@...hat.com>
Cc: linux-kernel@...r.kernel.org,
Daniel Vetter <daniel.vetter@...ll.ch>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-fbdev@...r.kernel.org, Sam Ravnborg <sam@...nborg.org>,
dri-devel@...ts.freedesktop.org,
Noralf Trønnes <noralf@...nnes.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Maxime Ripard <maxime@...no.tech>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-pwm@...r.kernel.org
Subject: Re: [PATCH v2 2/4] drm/tiny: Add driver for Solomon SSD130X OLED
displays
On Fri, Feb 04, 2022 at 08:19:12PM +0100, Javier Martinez Canillas wrote:
> On 2/4/22 15:26, Andy Shevchenko wrote:
> > On Fri, Feb 04, 2022 at 02:43:45PM +0100, Javier Martinez Canillas wrote:
...
> >> +struct ssd130x_device {
> >> + struct drm_device drm;
> >> + struct drm_simple_display_pipe pipe;
> >> + struct drm_display_mode mode;
> >> + struct drm_connector connector;
> >
> >
> >> + struct i2c_client *client;
> >
> > Can we logically separate hw protocol vs hw interface from day 1, please?
> > This will allow to add SPI support for this panel much easier.
> >
> > Technically I would like to see here
> >
> > struct device *dev;
> >
> > and probably (I haven't looked into design)
> >
> > struct ssd130x_ops *ops;
> >
> > or something alike.
>
> Sure. I wanted to keep the driver simple, making the writes bus agnostic and
> adding a level of indirection would make it more complex. But I agree that
> it will also make easier to add more buses later. I will do that for v3.
I have SSD1306 display with SPI interface and I'm not able to test your series.
With the above it at least gives me a point to consider helping (coding and
testing) with SPI one.
...
> >> + if (!fb)
> >> + return;
> >
> > Can it happen?
>
> I don't know, but saw that the handler of other drivers checked for this so
> preferred to play safe and do the same.
So, either cargo-cult or indeed it may happen. Somebody may conduct a research
on this...
...
> >> + drm_mode_probed_add(connector, mode);
> >> + drm_set_preferred_mode(connector, mode->hdisplay, mode->vdisplay);
> >> +
> >> + return 1;
> >
> > Positive code, what is the meaning of it?
>
> It's the number of connector modes. The driver only supports 1.
A comment then?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists