linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Courbot <acourbot@nvidia.com>
To: Thierry Reding
	<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Cc: Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC 0/4] Use the Common Display Framework in tegra-drm
Date: Wed, 30 Jan 2013 08:23:01 +0000	[thread overview]
Message-ID: <5108D865.3070301@nvidia.com> (raw)
In-Reply-To: <20130130074020.GA17547-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>

On 01/30/2013 04:40 PM, Thierry Reding wrote:
> Thanks *a lot* for taking care of this Alexandre! From a quick look at
> the patches they seem generally fine. I'll go over them in a bit more
> detail though.

Glad you like it better than my previous attempts at controlling Tegra's 
panels and backlights. ;)

>> 1) The CDF has a get_modes() hook, but this is already implemented by
>> tegra_connector_get_modes(). Ideally everything should be moved to the CDF hook,
>> but Tegra's implementation uses DRM functions to retrieve the EDID and CDF
>> should, AFAIK, remain DRM-agnostic.
>
> Maybe a good option would be to just not implement get_modes() if the
> same information can be retrieved via EDID. That is, the DRM driver
> could just go and fetch EDID when the nvidia,ddc-i2c-bus is available
> (or parse the nvidia,edid blob) and only rely on CDF otherwise.

Since EDID information is per-panel I'd intuitively say it should be 
provided by the panel driver.

> So for Ventana the only reason why we need CDF is basically the power
> sequencing, right?

As of now, yes.

> I definitely think that we should aim for correct panel and backlight
> interaction. Perhaps this could work by looking up the real backlight
> via it's phandle and have the CDF driver use the backlight API to
> disable or enable the backlight as part of the power sequencing.

I have just written a bit of code that does that. It works well and 
seems like a natural way to operate the backlight. However...

> I'm not sure what you mean by "cannot ignore FB events"? Can you provide
> a concrete problematic use-case?

... that's where thing stop looking nice. The backlight framework 
forcibly registers a framebuffer notifier callback and switches the 
backlight on and off on blank/unblank events, effectively duplicating 
what the panel driver does. There is no way to disable this behavior at 
the moment.

This could be solved by introducing a new function for controlling the 
"ownership" of the backlight that would unregister the notifier when the 
panel driver takes its reference to the backlight.

> Hijacking .update_status() sounds a bit risky. But perhaps you could
> wrap the real backlight in a CDF backlight to receive notifications.
> Obviously you'd get two backlight devices in sysfs, but that turn out
> not to be a problem.

For cosmetic reasons I'd prefer to avoid having two backlight devices 
(which ended up in that terrible PWM backlight subdriver thing). Maybe 
we can engineer the backlight framework to make such customizations easier?

Alex.


  parent reply	other threads:[~2013-01-30  8:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30  3:02 [RFC 0/4] Use the Common Display Framework in tegra-drm Alexandre Courbot
2013-01-30  3:02 ` [RFC 1/4] video: panel: add CLAA101WA01A panel support Alexandre Courbot
2013-01-30  7:20   ` Mark Zhang
     [not found]     ` <5108C9C1.1090707-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-30  7:27       ` Alex Courbot
     [not found]         ` <5108CB4F.7000103-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-30  7:48           ` Thierry Reding
2013-01-30  8:08             ` Mark Zhang
     [not found]             ` <20130130074852.GB17547-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-01-30  8:28               ` Alex Courbot
2013-01-30 20:19       ` Stephen Warren
     [not found]         ` <51098064.7030902-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-31  3:51           ` Mark Zhang
     [not found]             ` <5109EA2A.8020204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-31  4:24               ` Alexandre Courbot
2013-01-31  4:54                 ` Mark Zhang
2013-01-31  6:36                   ` Alexandre Courbot
     [not found]                     ` <CAAVeFuL_a1aAEDCFdhjMzZG40QuK3dcZqsWqfVpwmQbZsfiHRg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31  7:30                       ` Mark Zhang
     [not found]                         ` <510A1DAC.1070106-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-31 17:25                           ` Stephen Warren
2013-01-31 17:20             ` Stephen Warren
     [not found]               ` <510AA7F8.7070000-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-02-01  4:19                 ` Mark Zhang
     [not found]   ` <1359514939-15653-2-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-30 20:27     ` Stephen Warren
     [not found]       ` <51098229.7080508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-31  4:14         ` Alexandre Courbot
     [not found]           ` <CAAVeFuJkJ4cftWvSvt1YJa6c48JyJPVTu=i18yMHptZMi3DAzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31 17:23             ` Stephen Warren
2013-01-30 20:30     ` Stephen Warren
2013-01-30  3:02 ` [RFC 2/4] tegra: ventana: add display and backlight DT nodes Alexandre Courbot
2013-01-30  3:02 ` [RFC 4/4] tegra: enable CDF and claa101 panel Alexandre Courbot
     [not found] ` <1359514939-15653-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-30  3:02   ` [RFC 3/4] drm: tegra: use the Common Display Framework Alexandre Courbot
     [not found]     ` <1359514939-15653-4-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-30  6:50       ` Mark Zhang
2013-01-30  7:01         ` Alex Courbot
     [not found]           ` <5108C55C.30104-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-30  7:24             ` Thierry Reding
     [not found]               ` <20130130072406.GA17128-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-01-30  7:30                 ` Alex Courbot
2013-01-30  7:46             ` Mark Zhang
2013-01-30  7:40   ` [RFC 0/4] Use the Common Display Framework in tegra-drm Thierry Reding
     [not found]     ` <20130130074020.GA17547-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2013-01-30  8:23       ` Alex Courbot [this message]
2013-01-30  8:38         ` Sascha Hauer

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=5108D865.3070301@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org \
    /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).