lkml.org 
[lkml]   [2013]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] tegra: pwm-backlight: add tegra pwm-bl driver
Date
> I'm confused. Why would you want to call into pwm_bl directly? If we're
> going to split this up into separate platform devices, why not look up a
> given backlight device and use the backlight API on that? The pieces of
> the puzzle are all there: you can use of_find_backlight_by_node() to
> obtain a backlight device from a device tree node, so I'd expect the DT
> to look something like this:
>
> backlight: backlight {
> compatible = "pwm-backlight";
> ...
> };

This would still prevent any power control from the backlight driver. I.e. if
someone sets the brightness to 0 through sysfs, we cannot power the backlight
off as pwm-backlight cannot control more than the PWM without platform
callbacks. Backlight could only be powered off as a result of a fb blank event.

> panel: panel {
> compatible = "...";
> ...
> backlight = <&backlight>;
> ...
> };

So all the power control of both the panel and backlight would be performed
from this device's driver. How would it plug into tegra-drm? I would see
tegra_panel as a new member of the tegra_output structure, with one callback
invoked from tegra_encoder_dpms(). Does that look sane?

> After that you can wire it up with host1x using something like:
>
> host1x {
> dc@54200000 {
> rgb {
> status = "okay";
>
> nvidia,panel = <&panel>;
> };
> };
> };

Indeed. So if we do that, the DRM DPMS functions would take care of the
panel/backlight powering and the backlight driver will control the PWM after
this, through the FB notifier. This is a little bit different from the "official"
power sequence, but I just tested controlling the PWM at the very end of the
sequence and it works just as well. If you think this looks better I don't
mind doing it that way, it is actually a good excuse for me to dive into the
DRM code.

Anyway, this will only be a temporary solution, CDF is the only way to do this
right.

Alex.



\
 
 \ /
  Last update: 2013-01-23 11:45    [W:0.063 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site