dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Linux PWM List" <linux-pwm@vger.kernel.org>,
	"Linux Fbdev development list" <linux-fbdev@vger.kernel.org>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Maxime Ripard" <maxime@cerno.tech>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Sam Ravnborg" <sam@ravnborg.org>
Subject: Re: [PATCH 0/4] drm/tiny: Add driver for Solomon SSD1307 OLED displays
Date: Tue, 1 Feb 2022 16:03:30 +0100	[thread overview]
Message-ID: <abf63995-a529-1e80-18c3-df473a3e7a9c@redhat.com> (raw)
In-Reply-To: <CAMuHMdVwUfv7pXhPazsgG6t=X=aVtDQkFUk_=mUuFH8Fscx8wg@mail.gmail.com>

Hello Geert,

On 2/1/22 15:14, Geert Uytterhoeven wrote:
> Hi Javier,
> 
> On Tue, Feb 1, 2022 at 2:09 PM Javier Martinez Canillas
> <javierm@redhat.com> wrote:
>> On 2/1/22 12:38, Geert Uytterhoeven wrote:
>>>> Since the current binding has a compatible "ssd1305fb-i2c", we could make the
>>>> new one "ssd1305drm-i2c" or better, just "ssd1305-i2c".
>>>
>>> DT describes hardware, not software policy.
>>> If the hardware is the same, the DT bindings should stay the same.
>>>
>>
>> Yes I know that but the thing is that the current binding don't describe
>> the hardware correctly. For instance, don't use a backlight DT node as a
>> property of the panel and have this "fb" suffix in the compatible strings.
>>
>> Having said that, my opinion is that we should just keep with the existing
>> bindings and make compatible to that even if isn't completely correct.
>>
>> Since that will ease adoption of the new DRM driver and allow users to use
>> it without the need to update their DTBs.
> 
> To me it looks like the pwms property is not related to the backlight
> at all, and only needed for some variants?
>

I was reading the datasheets of the ssd1305, ssd1306 and ssd1307. Only the
first one mentions anything about a PWM and says:

  In phase 3, the OLED driver switches to use current source to drive the
  OLED pixels and this is the current drive stage. SSD1305 employs PWM
  (Pulse Width Modulation) method to control the brightness of area color
  A, B, C, D color individually. The longer the waveform in current drive
  stage is, the brighter is the pixel and vice versa.

  After finishing phase 3, the driver IC will go back to phase 1 to display
  the next row image data. This threestep cycle is run continuously to refresh
  image display on OLED panel. 

The way I understand this is that the PWM isn't used for the backlight
but instead to power the IC and allow to display the actual pixels ?

And this matches what Maxime mentioned in this patch:

https://linux-arm-kernel.infradead.narkive.com/5i44FnQ8/patch-1-2-video-ssd1307fb-add-support-for-ssd1306-oled-controller

  The Solomon SSD1306 OLED controller is very similar to the SSD1307,
  except for the fact that the power is given through an external PWM for
  the 1307, and while the 1306 can generate its own power without any PWM. 

> And the actual backlight code seems to be about internal contrast
> adjustment?
> 
> So if the pwms usage is OK, what other reasons are there to break
> DT compatibility? IMHO just the "fb" suffix is not a good reason.
>

Absolutely agreed with you on this. It seems we should just use the existing
binding and make the driver compatible with that. The only value is that the
drm_panel infrastructure could be used, but making it backward compatible is
more worthy IMO.

Best regards, -- 
Javier Martinez Canillas
Linux Engineering
Red Hat


  reply	other threads:[~2022-02-01 15:03 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 20:12 [PATCH 0/4] drm/tiny: Add driver for Solomon SSD1307 OLED displays Javier Martinez Canillas
2022-01-31 20:12 ` [PATCH 1/4] drm: Add I2C connector type Javier Martinez Canillas
2022-01-31 20:52   ` Sam Ravnborg
2022-01-31 23:26     ` Javier Martinez Canillas
2022-02-01 12:58     ` Noralf Trønnes
2022-02-01 13:06       ` Javier Martinez Canillas
2022-02-01 13:20         ` Noralf Trønnes
2022-02-01 13:55           ` Javier Martinez Canillas
2022-02-01 13:38       ` Simon Ser
2022-02-01 14:20         ` Noralf Trønnes
2022-02-01 20:57       ` Sam Ravnborg
2022-02-01 22:29         ` Simon Ser
2022-02-02  8:46           ` Javier Martinez Canillas
2022-02-02  9:14       ` Thomas Zimmermann
2022-02-02  9:45         ` Noralf Trønnes
2022-02-02 15:04           ` Pekka Paalanen
2022-02-02 16:00             ` Noralf Trønnes
2022-01-31 20:12 ` [PATCH 2/4] drm/format-helper: Add drm_fb_gray8_to_mono_reversed() Javier Martinez Canillas
2022-02-01  9:59   ` Thomas Zimmermann
2022-02-01 11:13     ` Pekka Paalanen
2022-02-01 11:48     ` Javier Martinez Canillas
2022-03-14 13:40   ` Geert Uytterhoeven
2022-03-14 14:07     ` Javier Martinez Canillas
2022-01-31 20:36 ` [PATCH 0/4] drm/tiny: Add driver for Solomon SSD1307 OLED displays Simon Ser
2022-01-31 20:39   ` Simon Ser
2022-01-31 23:21     ` Javier Martinez Canillas
2022-02-01  8:26     ` Geert Uytterhoeven
2022-02-01  8:34       ` Simon Ser
2022-02-01  8:36         ` Geert Uytterhoeven
2022-02-01 10:08           ` Thomas Zimmermann
2022-02-01 10:11             ` Simon Ser
2022-02-01 10:17               ` Thomas Zimmermann
2022-02-01  8:38         ` Daniel Vetter
2022-02-01  9:49           ` Javier Martinez Canillas
2022-02-01 10:42             ` Pekka Paalanen
2022-02-01 11:07               ` Geert Uytterhoeven
2022-02-02  9:19                 ` Pekka Paalanen
2022-02-02 10:55                   ` Geert Uytterhoeven
2022-01-31 20:56 ` Sam Ravnborg
2022-01-31 23:37   ` Javier Martinez Canillas
2022-02-01  9:37   ` Andy Shevchenko
2022-02-01 11:31     ` Javier Martinez Canillas
2022-02-01 11:38       ` Geert Uytterhoeven
2022-02-01 13:09         ` Javier Martinez Canillas
2022-02-01 14:14           ` Geert Uytterhoeven
2022-02-01 15:03             ` Javier Martinez Canillas [this message]
2022-02-01 20:40               ` Sam Ravnborg
2022-02-02  8:38                 ` Javier Martinez Canillas
2022-02-02 11:06                   ` Andy Shevchenko
2022-02-02 11:39                     ` Javier Martinez Canillas
2022-02-02 11:50                       ` Andy Shevchenko
2022-02-02 11:54                         ` Javier Martinez Canillas
2022-02-02 12:21                           ` Andy Shevchenko
2022-02-01  8:43 ` Geert Uytterhoeven
2022-02-01  9:27   ` Simon Ser
2022-02-01 10:36   ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abf63995-a529-1e80-18c3-df473a3e7a9c@redhat.com \
    --to=javierm@redhat.com \
    --cc=airlied@linux.ie \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=noralf@tronnes.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).