All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-fbdev@vger.kernel.org,
	"Sebastien Guiriec" <s-guiriec@ti.com>,
	dri-devel@lists.freedesktop.org,
	"Jesse Barnes" <jesse.barnes@intel.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Tom Gall" <tom.gall@linaro.org>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	linux-media@vger.kernel.org,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Mark Zhang" <markz@nvidia.com>,
	"Thierry Reding" <thierry.reding@avionic-desi.gn.de>,
	linaro-mm-sig@lists.linaro.org,
	"Stéphane Marchesin" <stephane.marchesin@gmail.com>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Ragesh Radhakrishnan" <Ragesh.R@linaro.org>,
	"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
	"Sunil Joshi" <joshi@samsung.com>,
	"Maxime Ripard" <maxime.ripard@free-electrons.com>,
	"Vikas Sajjan" <vikas.sajjan@linaro.org>
Subject: Re: CDF meeting @FOSDEM report
Date: Wed, 6 Feb 2013 14:54:42 +0200	[thread overview]
Message-ID: <51125292.5000409@ti.com> (raw)
In-Reply-To: <876225prq7.fsf@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 2761 bytes --]

On 2013-02-06 14:11, Jani Nikula wrote:
> On Wed, 06 Feb 2013, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>>> 6. Miscellaneous
>>> ----------------
>>>
>>> - If the OMAP3 DSS driver is used as a model for the DSI support 
>>> implementation, Daniel Vetter requested the DSI bus lock semaphore to be 
>>> killed as it prevents lockdep from working correctly (reference needed ;-)).
> 
> [...]
> 
>> As for the semaphore, sure, it can be removed, although I'm not aware of
>> this lockdep problem. If there's a problem it should be fixed in any case.
> 
> The problem is that lockdep does not support semaphores out of the
> box. I'm not sure how hard it would be to manually lockdep annotate the
> bus lock, and whether it would really work. In any case, as I think we
> learned in the past, getting locking right in a DSI command mode panel
> driver with an asynchronous update callback, DSI bus lock, and a driver
> data specific mutex can be a PITA. Lockdep would be extremely useful
> there.
> 
> AFAICS simply replacing the semaphore with a mutex would work for all
> other cases except DSI command mode display update, unless you're
> prepared to wait in the call until the next tearing effect interrupt
> plus framedone. Which would suck. I think you and I have talked about
> this part in the past...

Mutex requires locking and unlocking to happen from the same thread. But
I guess that's what you meant that the problem would be with display
update, where the framedone callback is used to release the bus lock.

The semaphore could probably be changed to use wait queues, but isn't
that more or less what a semaphore already does?

And I want to point out to those not familiar with omapdss, that the DSI
bus lock in question does not protect any data in memory, but is an
indication that the DSI bus is currently in use. The bus lock can be
used to wait until the bus is free again.

I guess one option would be to disallow any waiting for the bus lock. If
the panel driver would try acquire bus lock, and the lock is already
taken, the call would fail. This would move the handling of exclusivity
to the user of the panel (drm driver, I guess), which already should
handle the framedone event.

The above would require that everything the panel does should be managed
by the drm driver. Currently this is not the case for OMAP, as the panel
driver can get calls via sysfs, or via backlight driver, or via (gpio)
interrupts.

I don't really know what would be the best option here. On one hand
requiring all panel calls to be managed by drm would be nice and simple.
But it is a bit limiting when thinking about complex display chips. Will
that work for all cases? I'm not sure.

 Tomi



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2013-02-06 12:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 22:27 CDF meeting @FOSDEM report Laurent Pinchart
2013-02-06 11:11 ` Tomi Valkeinen
2013-02-06 12:11   ` Jani Nikula
2013-02-06 12:54     ` Tomi Valkeinen [this message]
2013-02-06 14:44   ` Alex Deucher
2013-02-06 14:44     ` Alex Deucher
2013-02-06 14:44     ` Alex Deucher
2013-02-06 15:00     ` Tomi Valkeinen
2013-02-06 15:00       ` Tomi Valkeinen
2013-02-06 15:00       ` Tomi Valkeinen
2013-02-06 16:14       ` [Linaro-mm-sig] " Daniel Vetter
2013-02-06 16:14         ` Daniel Vetter
2013-02-12 22:45 ` Stéphane Marchesin
2013-02-13  9:25   ` Marcus Lorentzon
2013-02-14  9:35   ` Tomi Valkeinen

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=51125292.5000409@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=Ragesh.R@linaro.org \
    --cc=acourbot@nvidia.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jesse.barnes@intel.com \
    --cc=joshi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=markz@nvidia.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=s-guiriec@ti.com \
    --cc=stephane.marchesin@gmail.com \
    --cc=sumit.semwal@linaro.org \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@avionic-desi.gn.de \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tom.gall@linaro.org \
    --cc=vikas.sajjan@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.